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
|
#!/usr/bin/make -f
# debian/rules for alex
# This file is public domain software, originally written by Joey Hess.
# Adapted for alex by Ian Lynagh.
# Largely rewritten for cdbs and hlibrary.mk by Joachim Breitner in 2009.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DEB_BUILD_DEPENDENCIES = build-arch
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/hlibrary.mk
clean::
[ ! -f doc/config.mk ] || $(MAKE) -C doc clean
# Remove these so setup clean doesn't remove the generated files
#rm -f src/Parser.y src/Scan.x
rm -f debian/get_version.o debian/get_version.hi debian/get_version
rm -f doc/alex.1
# Hacks:
rm -f doc/config.log doc/config.status doc/config.mk doc/configure
configure/alex::
# doc/configure is not shipped, generate it
cd doc && autoconf && rm -r autom4te.cache && ./configure --prefix=/usr
# used in build to stick version into man page
ghc6 --make debian/get_version.hs -o debian/get_version
build/alex:: build-ghc6-stamp
$(MAKE) -C doc html
sed -e "s#@LIBDIR@#/usr/lib/alex-`debian/get_version`#g" \
-e "s#@DOCDIR@#/usr/share/doc/alex#g" \
-e "s#@VERSION@#`debian/get_version`#g" \
doc/alex.1.in > doc/alex.1
install/alex:: debian/tmp-inst-ghc6
dh_installdirs usr/share/doc/alex/html
cp -a doc/alex/* `pwd`/debian/`dh_listpackages`/usr/share/doc/alex/html
|