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
|
#!/usr/bin/make -f
PATCHFILE=`ls *diff `
BUILT_USING := $(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W sqwebmail )
ROOT=debian/sqwebmail-de
PATCHROOT=htmltree/en-us
%:
dh $@
override_dh_auto_build:
mkdir htmltree
cp -a /usr/lib/courier/sqwebmail/html/en-us/ htmltree
rm $(PATCHROOT)/ISPELLDICT
echo -n default > $(PATCHROOT)/ISPELLDICT
# patch files - except TIMEZONELIST
filterdiff -x */TIMEZONELIST -x */ISPELLDICT < $(PATCHFILE) | (cd $(PATCHROOT); patch -p1 )
# add Europe/Berlin Germany as top entry (replacing the * * entry)
sed -i -e 's/^\*.*\*/Europe\/Berlin Germany/' $(PATCHROOT)/TIMEZONELIST
# check whether TIMEZONELIST has been properly altered -
# there should now be two entries for Europe/Berlin
# otherwise fail
[ "$$(grep Europe/Berlin $(PATCHROOT)/TIMEZONELIST | wc -l)" = "2" ]
override_dh_clean:
#Remove the patched html tree
-rm -fr htmltree
dh_clean
override_dh_auto_install:
mkdir -p $(ROOT)/usr/lib/courier/sqwebmail/html/de-de
cp -a htmltree/en-us/* $(ROOT)/usr/lib/courier/sqwebmail/html/de-de
override_dh_gencontrol:
dh_gencontrol -- -VBuilt-Using="$(BUILT_USING)"
|