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 92 93 94 95
|
#!/usr/bin/make -f
# Debian rules file for jadetex
package := jadetex
# directory abstraction
prefix := debian/tmp
bindir := $(prefix)/usr/bin
docdir := $(prefix)/usr/share/doc/$(package)
mandir := $(prefix)/usr/share/man
texdir := $(prefix)/usr/share/texmf/tex/$(package)
templdir := $(texdir)/config-templates
confdir := $(prefix)/etc/texmf/$(package)
# tool abstraction
install_file := install -o root -g root -m 644 -p
install_program := install -o root -g root -m 755 -p
make_dir := install -d -o root -g root -m 755
compress := gzip -9f
build:
$(checkdir)
$(MAKE) basic
pdflatex '\nonstopmode\input{jadetex.dtx}' > latex.log
pdflatex '\nonstopmode\input{jadetex.dtx}' >> latex.log
touch build
clean:
$(checkdir)
-$(MAKE) realclean
rm -f jadetex.ps
rm -f build binary debian/conffiles
dh_clean
binary: binary-indep binary-arch
.PHONY: test
test:
$(checkdir)
sh -n debian/postinst
sh -n debian/prerm
sh -n debian/postrm
binary-indep: build test
$(checkdir)
$(checkroot)
rm -rf $(prefix)
$(make_dir) $(bindir) $(docdir) $(mandir)/man1 \
$(texdir)/base $(confdir) $(templdir)
# conffile handling
ln -sf /etc/texmf/jadetex $(texdir)/config
$(install_file) jadetex.ini pdfjadetex.ini $(confdir)/
: > debian/conffiles
echo $(subst $(prefix),,$(confdir))/jadetex.ini >> debian/conffiles
echo $(subst $(prefix),,$(confdir))/pdfjadetex.ini >> debian/conffiles
# the fmtutil snippet is managed in the postinst
# (we might also wanna put all the jadetex texmf.cnf stuff in there too)
$(install_file) debian/fmtutil.cnf $(templdir)/
$(install_file) jadetex.1 pdfjadetex.1 $(mandir)/man1/
$(install_file) jadetex.ltx $(texdir)/base/
$(install_file) dsssl.def *.sty *.fd $(texdir)/base/
ln -s tex $(bindir)/jadetex
ln -s pdftex $(bindir)/pdfjadetex
dh_installdocs debian/README.* jadetex.pdf doc/releasenotes.ps doc/releasenotes.xml
dh_installchangelogs ChangeLog
dh_compress -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
binary-arch: build
# nothing to do
define checkdir
test -f debian/rules
test -f jadetex.dtx
endef
define checkroot
test `id -u` = 0
endef
.PHONY: clean binary-indep binary-arch binary
|