This repository was archived by the owner on Feb 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake-vdr
More file actions
executable file
·58 lines (47 loc) · 1.26 KB
/
Copy pathmake-vdr
File metadata and controls
executable file
·58 lines (47 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
###################
# Variables setup #
###################
vdr=VDR-NG
TC_bin=`pwd`/VDR-NG-FW/m7x0_xtc_uclibc_`uname`-`uname -m`/bin
#############
# Functions #
#############
# patches a package from a given patch-dir. all *.patch files are patched with patch -p1
# usage: patch_package <dest dir> <patchdir>
patch_package() {
for patch_file in `find $2 -type f -iname '*.patch' | sort` ; do \
patch -p1 -E -d $1 < $patch_file ; \
done
}
# Check ToolChain directory
if [ ! -d "$TC_bin" ]
then
echo "ToolChain-bin dir not found: $TC_bin" 1>&2
exit 1
else
export PATH="$TC_bin:$PATH"
fi
# Update/Checkout VDR-M7x0 from SVN-o7o
if [ -d "$vdr/.svn" ]
then
echo "Update VDR-M7x0 original"
svn update -r 366 -q "svn://open7x0.org/vdr-m7x0/branches/andreas-unstable" "$vdr"
else
echo "Checkout VDR-M7x0 original"
svn checkout -r 366 -q "svn://open7x0.org/vdr-m7x0/branches/andreas-unstable" "$vdr"
fi
# Patching VDR
if [ ! -f "$vdr/HISTORY-liemikuutio" ]
then
patch_package ./VDR-NG ./Addons/Files/pro/patches/vdr-m7x0
patch_package ./VDR-NG ./Addons/Files/common/patches/vdr-m7x0
[ "$1" = "rootfs" ] && patch_package ./VDR-NG ./Addons/Patches/vdr-rootfs
fi
# Compiling VDR
( cd $vdr; make )
if [ -x $vdr/vdr ]
then
cp -p $vdr/vdr .
sstrip vdr
fi