# directory abstraction
prefix := debian/tmp
docdir := $(prefix)/usr/doc/$(package)
-libdir := $(prefix)/usr/lib/$(package)
sharedir := $(prefix)/usr/share/$(package)
docbasedir := $(prefix)/usr/share/doc-base
# version abstraction
DEB_VERSION := $(shell LC_ALL=C dpkg-parsechangelog | grep '^Version: ' | sed 's/^Version: *//')
# pretty-print the date
-DATE := $(shell date --date="`dpkg-parsechangelog | grep '^Date: ' | sed 's/^Date: *//'`" '+%d %B, %Y')
+DATE := $(shell LC_ALL=C date --date="`dpkg-parsechangelog | grep '^Date: ' | sed 's/^Date: *//'`" '+%d %B, %Y')
# source depends -- check if these packages are installed
SRC_DEPENDS := debiandoc-sgml lout psutils
nsgmls -wall -s -E20 $^ # check SGML syntax
debiandoc2html $^
debiandoc2text $^
- debiandoc2latex2epdf $^ # should be -p letter, but oh well
+ debiandoc2latexpdf -p letter $^
touch build
clean:
$(checkroot)
rm -rf $(prefix)
$(make_directory) $(prefix)/DEBIAN
- $(make_directory) $(docdir) $(libdir) $(sharedir) $(docbasedir)
+ $(make_directory) $(docdir) $(sharedir) $(docbasedir)
$(make_directory) $(docdir)/developers-reference.html
$(install_file) developers-reference.html/* \
# make sure control files are good
sh -n debian/postinst
sh -n debian/prerm
-# install the control files
- $(install_script) debian/control debian/postinst debian/prerm \
- $(prefix)/DEBIAN/
+ $(install_script) debian/postinst debian/prerm $(prefix)/DEBIAN/
# compress docdir (policy)
find $(docdir) -type f \( -size +4k -or -iname "change*" \) \
! -name "copyright" | xargs $(compress)
dpkg-gencontrol -isp
+# be tricky about putting the TOC sections into the description of the package
+ perl -ne '/^\d+\.\s/ && print " $$_";' < developers-reference.txt \
+ >> $(prefix)/DEBIAN/control
+
dpkg --build $(prefix) ..
# some extra-package files