| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
export DH_OPTIONS |
| 8 |
|
| 9 |
include /usr/share/dpkg/default.mk |
| 10 |
LOCALES:=$(shell (cd locale;find . -mindepth 1 -maxdepth 1 -type d)|sed -e 's,^./,,') |
| 11 |
|
| 12 |
%: |
| 13 |
dh $@ |
| 14 |
|
| 15 |
override_dh_auto_build: |
| 16 |
locale/debian_translate . /usr/share/fex locale/export |
| 17 |
for file in afex asex fexget fexpack fexpush fexsend fexsync sexget sexsend;do \ |
| 18 |
if ! cmp -s bin/$$file htdocs/download/$$file;then \ |
| 19 |
echo File $$file differs in bin and htdocs! Package will contain only version from bin in both locations!; \ |
| 20 |
fi; \ |
| 21 |
done |
| 22 |
|
| 23 |
override_dh_clean: |
| 24 |
rm -rf locale/export |
| 25 |
dh_clean |
| 26 |
if [ ! -f debian/htdocs.md5/$(DEB_VERSION_UPSTREAM_REVISION) ];then \ |
| 27 |
echo -n "Missing MD5sum file, generating: " ;\ |
| 28 |
find htdocs/ -type f|grep -v -e version -e Licence -e FAQ/jquery.js -e download/ |LC_ALL=C sort|xargs -n 1 md5sum >debian/htdocs.md5/$(DEB_VERSION_UPSTREAM_REVISION) ;\ |
| 29 |
echo "done. Stopping as failed now to check file into Git."; \ |
| 30 |
exit 1 ;\ |
| 31 |
fi |
| 32 |
|
| 33 |
override_dh_auto_install: |
| 34 |
|
| 35 |
|
| 36 |
cp bin/zz debian/fex-utils/usr/bin |
| 37 |
|
| 38 |
overide_dh_installdocs: |
| 39 |
dh_installdocs |
| 40 |
cp doc/new debian/fex/usr/share/doc/fex/NEWS |
| 41 |
echo "fex_$(DEB_VERSION)" >debian/fex/usr/share/fex/htdocs/version |
| 42 |
|
| 43 |
sed -i -e 's,/home/fex/,/var/lib/fex/,g' debian/fex/usr/share/fex/htdocs/FAQ/* |
| 44 |
@(cd debian/fex/usr/share/fex/;find htdocs/ -type f|grep -v -e version -e FAQ/jquery.js -e download/ |LC_ALL=C sort|xargs -n 1 md5sum >../../../../fex.md5.check) |
| 45 |
if diff -q debian/fex.md5.check debian/htdocs.md5/$(DEB_VERSION_UPSTREAM_REVISION) >/dev/null;then \ |
| 46 |
echo "Correct htdocs md5sum found."; \ |
| 47 |
rm -f debian/fex.md5.check; \ |
| 48 |
else \ |
| 49 |
echo "htdocs contents changed! Please add the following to your md5 cache:" ; \ |
| 50 |
cat debian/fex.md5.check; \ |
| 51 |
exit 1 ; \ |
| 52 |
fi |
| 53 |
(cd debian/htdocs.md5;tar czf ../fex/usr/share/fex/.md5/htdocs.tgz *) |
| 54 |
|
| 55 |
override_dh_link: |
| 56 |
dh_link |
| 57 |
|
| 58 |
mkdir -p debian/fex/usr/share/fex/htdocs/download |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
ln -s sexget debian/fex/usr/share/fex/htdocs/download/sex.stream |