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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 by Joey Hess.
#
# Modified to use dbs by Federico Di Gregorio.
# Modified to change from dbs to dpatch by Norman Ramsey
export FORCE_SOURCE_DATE=1
DEB_BUILD_MAINT_OPTIONS := hardening=+all
DEB_CFLAGS_MAINT_APPEND := -Wall
include /usr/share/dpkg/buildflags.mk
ICONC=icont
MAKE_OPTIONS = LIBSRC=icon ICONC="${ICONC}" CFLAGS="${CFLAGS}"\
CPPFLAGS='$(CPPFLAGS)' \
LDFLAGS='$(LDFLAGS)' \
BIN=/usr/bin LIB=/usr/lib/noweb \
MAN=/usr/share/man \
ELISP=/usr/share/emacs/site-lisp \
TEXINPUTS=/usr/share/texmf/tex/plain/misc \
PATH=$(PATH):$(CURDIR)/debian/bin
%:
dh $@ --sourcedirectory=src --with=tex
patch-awk-stamp:
cd src && ./awkname awk
touch patch-awk-stamp
# Authors: <nr@eecs.harvard.edu>, <uhoreg@debian.org>
# Update timestamp to avoid needing noweb to build noweb
# earlier patches hit the noweb file from which these files are derived;
# by touching them, we make it possible to build noweb without already
# having noweb.
sleep 1 # so that we have at least a second difference in timestamps
touch \
src/shell/tmac.w \
src/shell/noweave \
src/shell/noroff \
src/shell/toroff \
src/tex/noweb.sty \
src/tex/nwmac.tex \
src/Makefile
.PHONY: override_dh_auto_clean
override_dh_auto_clean:
dh_auto_clean
if test -r patch-awk-stamp; then \
cd src && ./awkname nawk; \
fi
rm -f patch-awk-stamp
rm -f contrib/norman/scopehack
find . -name "*~" -name "core" -exec rm -f "{}" +
.PHONY: override_dh_auto_build
override_dh_auto_build: patch-awk-stamp
# build a version of notangle that we can use to build the man pages
mkdir -p debian/bin
sed "s@|LIBDIR|@$(CURDIR)/src/c@" src/shell/notangle > debian/bin/notangle
chmod +x debian/bin/notangle
dh_auto_build -- $(MAKE_OPTIONS)
cd contrib/norman && $(ICONC) scopehack
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
cd src/xdoc && latex guide.tex && \
while grep -s 'Rerun to get cross-references right' guide.log; \
do latex guide.tex; done && \
dvips guide.dvi -o guide.ps
cd src/xdoc && latex onepage.tex && \
while grep -s 'Rerun to get cross-references right' onepage.log; \
do latex onepage.tex; done && \
dvips onepage.dvi -o onepage.ps
cd src/xdoc && ../icon/sl2h guide.tex | \
../icon/htmltoc >guide.html
endif
.PHONY: override_dh_installexamples
override_dh_installexamples:
# removes because is in standard tetex (and other not-needed files)
dh_installexamples -Xmulticol.sty -Xprimes.b examples/*
.PHONY: override_dh_auto_install
override_dh_auto_install:
dh_auto_install -- $(MAKE_OPTIONS)
# gives tmac its name and move it to right directory
mkdir -p debian/noweb/usr/share/groff/tmac
mv debian/noweb/usr/lib/noweb/tmac.w \
debian/noweb/usr/share/groff/tmac/noweb.tmac
|