build: remove use of submodule for dvb-scan data

Revert back to manually fetching, though now its a git report its somewhat
simpler and we'll avoid using a separate script.
This commit is contained in:
Adam Sutton 2013-01-11 21:34:40 +00:00
parent 1de1b68c7e
commit 7227c128eb
7 changed files with 17 additions and 48 deletions

2
.gitignore vendored
View file

@ -3,6 +3,8 @@ build.*
src/version.c
data/dvb-scan
.cproject
.project
.settings

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "data/dvb-scan"]
path = data/dvb-scan
url = git://linuxtv.org/dtv-scan-tables.git

13
configure vendored
View file

@ -174,10 +174,17 @@ fi
# DVB scan
#
if enabled linuxdvb && enabled dvbscan; then
[ ! -d ${ROOTDIR}/data/dvb-scan/.git ] && rm -rf $ROOTDIR/data/dvb-scan/*
printf "${TAB}" "fetching dvb-scan files ..."
git submodule update --init &> /dev/null\
|| die "failed (use --disable-dvbscan)"
if [ -d ${ROOTDIR}/data/dvb-scan/.git ]; then
(cd ${ROOTDIR}/data/dvb-scan; git pull) &> /dev/null
else
URL=git://linuxtv.org/dtv-scan-tables.git
git clone $URL ${ROOTDIR}/data/dvb-scan &> /dev/null
if [ $? -ne 0 ]; then
echo "fail"
die "Failed to fetch dvb-scan data (use --disable-dvbscan)"
fi
fi
echo "ok"
fi

@ -1 +0,0 @@
Subproject commit c57839aad2260306e6adecc0058fb683a8b34bc4

View file

@ -1,41 +0,0 @@
#!/bin/bash
#
# Retrieve the latest dvb-apps scan files
#
URL=http://linuxtv.org/hg/dvb-apps/archive/tip.tar.bz2
TMP=/tmp/getmuxlist.$$
TVH=$(cd $(dirname $0)/..; pwd)/data/dvb-scan
function die
{
[ ! -z "$1" ] && echo $1 || echo
rm -rf $TMP
rm -rf $TVH
exit 1
}
# Get files
rm -rf $TMP
mkdir -p $TMP
cd $TMP
echo -n "fetching scan files ... "
(wget -O - -q $URL | tar xj) 2> /dev/null ||\
(curl $URL | tar xj) 2> /dev/null
cd dvb-apps* 2> /dev/null || die "failed"
echo "done"
# Copy to TVH
echo -n "moving into tvh data/ directory ... "
rm -rf $TVH
mkdir -p $TVH
mv ./util/scan/* $TVH
echo "done"
# Cleanup
echo -n "cleaning up ... "
for f in $TVH/*; do
[ -f $f ] && rm -f $f
done
rm -rf $TMP
echo "done"

View file

@ -46,11 +46,15 @@ for path in args:
t = ents
while True:
(d,n) = rsplit(n)
if d.startswith('.'):
fs = []
break
if d not in t:
t[d] = {}
t = t[d]
if not n: break
for f in fs:
if f.startswith('.'): continue
t[f] = None
# Output a file

View file

@ -13,6 +13,7 @@ install: ${PROG} ${MAN}
cp -r $$bundle/* ${DESTDIR}${datadir}/tvheadend/$$bundle ;\
done
find ${DESTDIR} -name .git -exec rm -rf {} \;
uninstall:
rm -f ${DESTDIR}${bindir)/tvheadend