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 59 60 61 62 63 64 65
|
#!/usr/bin/make -f
#
# Debian build rules for s5 using debhelper
# Variables also used in the get-orig-source script - keep them in sync!
B=$(CURDIR)/build
S=$B/s5
C=$B/cmd
D=$(CURDIR)/debian/s5
DD=$D/usr/share/doc/s5
DJ=$(CURDIR)/debian/libjs-s5
J=$(DJ)/usr/share/javascript/s5
# Variables only used in the rules file
REBASE= s,/usr/local/etc,/etc,g;s,/usr/local,/usr,g
get-orig-source:
. debian/get-orig-source.sh
override_dh_auto_build:
mkdir -p $C $S
tar -cf - --exclude=.DS_Store --exclude=s5-blank.html *.html pix primer ui | tar -C $S -xf -
cd $S && env TZ=UTC unzip -x $(CURDIR)/s5-blank.zip
for p in `cat $(CURDIR)/debian/patches/series`; do \
(cd $S/s5-blank; patch -p1 < $(CURDIR)/debian/patches/$$p); \
done
find $S -name __MACOSX -or -name .DS_Store | xargs rm -rf
find $S -regextype posix-extended -type f -iregex '.*\.(css|htc|html|js|txt)' -print0 | xargs -0 sed -i.debbuild -e 's/
$$//'
find $S -type f -name '*.debbuild' -delete
sed -e "${REBASE}" debian/s5.sh > $C/s5
chmod 0755 $C/s5
sed -e "${REBASE}" debian/s5.conf > $C/s5.conf
sed -e "${REBASE}" debian/s5.1 > $C/s5.1
override_dh_auto_test:
mkdir "$B/test"
env S5="$C/s5" S5_DIR="$S" TMPDIR="$B/test" debian/tests/blank
override_dh_auto_clean:
rm -rf $B
override_dh_auto_install:
# The actual content of the templates goes into libjs-s5.
#
mkdir -p $J/default
mv $S/ui $J/default/
mv $S/s5-blank $J/
#
# Everything else is actually documentation.
#
mkdir -p $(DD)
(cd $B && tar -cf - s5) | tar -C $(DD)/.. -xf -
#
# OK, we're almost done...
#
find $D $(DJ) -type d | xargs chown root:root
find $D $(DJ) -type d | xargs chmod 755
find $D $(DJ) -type f | xargs chown root:root
find $D $(DJ) -type f | xargs chmod 644
%:
dh $@
|