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 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
include /usr/share/dpatch/dpatch.make
configure: configure-stamp
configure-stamp: patch-stamp
dh_testdir
# move old tpmultiinc.tar out of the way
-mkdir old.tpmultiinc
mv contrib/tpmultiinc.tar old.tpmultiinc
# put new tpmultiinc.tar in
uudecode $(CURDIR)/debian/tpmultiinc.tar.uu \
-o contrib/tpmultiinc.tar
# move not building documentation out of the way
-mkdir not.buildable
-mv doc/fancystep.tex doc/FAQ-display.tex doc/FAQ-printout.tex \
doc/foilsdemo.tex doc/ifmslidemo.tex doc/paneldemo.tex \
doc/pdfslidemo.tex doc/pp4sldemo.tex doc/prosperdemo.tex \
doc/seminardemo.tex doc/slifontsexample.tex \
doc/__TPFAQ.tex not.buildable
touch configure-stamp
build-arch: configure-stamp build-arch-stamp
build-arch-stamp:
dh_testdir
touch build-arch-stamp
build-indep: configure-stamp build-indep-stamp
build-indep-stamp:
dh_testdir
# supplement documentation directory with the style files needed
# and "lying around" in texpower's tree (symbolic links)
# Otherwise wee need the packages we build as Build-Dependency
# which is sh*
cd doc; \
ln -s ../texpower.sty texpower.sty; \
ln -s ../powersem.cls powersem.cls; \
ln -s ../tpoptions.cfg tpoptions.cfg; \
ln -s ../tpcolors.cfg tpcolors.cfg; \
ln -s ../tpsettings.cfg tpsettings.cfg; \
ln -s ../addons/automata.sty automata.sty; \
ln -s ../addons/fixseminar.sty fixseminar.sty; \
ln -s ../addons/tppstcol.sty tppstcol.sty; \
ln -s ../addons/tpslifonts.sty tpslifonts.sty
$(MAKE)
touch build-indep-stamp
build: build-arch build-indep
clean: unpatch
dh_testdir
dh_testroot
rm -f build-arch-stamp build-indep-stamp configure-stamp
-cp doc/yoda.* doc/unihaken-color.pdf doc/unido-kopf.pdf \
doc/FAQ*.pdf .
-make clean
-rm doc/*.pdf
-mv yoda.* unihaken-color.pdf unido-kopf.pdf FAQ*pdf doc/
# remove symlinks in doc/
-cd doc; find . -type l | xargs rm
# remove files of tpmultiinc
for file in tpmultiinc.sty mptest.tex multitest.fig multitest.mmp \
readme; do rm -f contrib/$$file; done
# move the non-buildling documentation back
-mv not.buildable/* doc/
rm -rf not.buildable
# restore old tpmultiinc.tar
-mv old.tpmultiinc/tpmultiinc.tar contrib/
rm -rf old.tpmultiinc
dh_clean
install: DH_OPTIONS=
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# install texpower
$(MAKE) install
install -m644 addons/tpslifonts.sty \
$(CURDIR)/debian/texpower/usr/share/texmf/tex/latex/tpslifonts
install -m644 addons/fixseminar.sty \
$(CURDIR)/debian/texpower/usr/share/texmf/tex/latex/fixseminar
mv \
$(CURDIR)/debian/texpower/usr/share/texmf/tex/latex/texpower/powersem* \
$(CURDIR)/debian/texpower/usr/share/texmf/tex/latex/powersem
# install the "framework" ...
for file in `cd doc; ls __TPpb*`; do \
install -m644 doc/$$file \
$(CURDIR)/debian/texpower/usr/share/texpower; \
done
install -m644 debian/texpower_preamble.tex \
$(CURDIR)/debian/texpower/usr/share/texpower
# ... and fix paths; we must do it here and cannot do it with
# "normal" patches because we ned the unmodified files for building
# the documentation...
cd $(CURDIR)/debian/texpower/usr/share/texmf/tex/latex/texpower && \
cat texpower.sty \
| sed -e s^tpoptions.cfg^/etc/texpower/tpoptions.cfg^ \
| sed -e s^tpsettings.cfg^/etc/texpower/tpsettings.cfg^ \
| sed -e s^tpcolors.cfg^/etc/texpower/tpcolors.cfg^ \
> out && mv out texpower.sty
cd $(CURDIR)/debian/texpower/usr/share/texpower && \
cat __TPpble.tex \
| sed -e s^__TPpbla^/usr/share/texpower/__TPpbla.tex^ \
| sed -e s^__TPpblb^/usr/share/texpower/__TPpblb.tex^ > out && \
mv out __TPpble.tex && \
cat __TPpblb.tex | sed -e s^__TP.cfg^/etc/texpower/__TP.cfg^ \
> out && mv out __TPpblb.tex
# ... and the config
install -m644 doc/__TP.cfg $(CURDIR)/debian/texpower/etc/texpower
# install texpower-manual
for file in doc/manual.tex doc/manual.pdf; do \
install -m644 $$file \
$(CURDIR)/debian/texpower-manual/usr/share/doc/texpower/manual;\
done
cd $(CURDIR)/debian/texpower-manual/usr/share/doc/texpower-manual && \
ln -s ../texpower/manual manual
# install tpmultiinc
cd contrib; tar xfv tpmultiinc.tar
install -m644 contrib/tpmultiinc.sty \
$(CURDIR)/debian/texpower/usr/share/texmf/tex/latex/tpmultiinc
install -m644 contrib/readme \
$(CURDIR)/debian/texpower/usr/share/doc/texpower/README.tpmultiinc
# install dvips-landscapeplus
install -m644 contrib/config.landscapeplus \
$(CURDIR)/debian/texpower/etc/texmf/dvips
# install latex-automata
install -m644 addons/automata.sty \
$(CURDIR)/debian/texpower/usr/share/texmf/tex/latex/automata
install -m644 addons/tppstcol.sty \
$(CURDIR)/debian/texpower/usr/share/texmf/tex/latex/tppstcol
# install lintian overrides
install -m644 $(CURDIR)/debian/texpower.overrides \
$(CURDIR)/debian/texpower/usr/share/lintian/overrides/texpower
binary-indep: build install
dh_testdir
dh_testroot
dh_installdocs 00readme.txt
# install the examples ...
dh_installexamples -ptexpower-examples \
doc/*.tex doc/*.pdf doc/*.eps *.cfg contrib/multitest.* \
contrib/mptest.tex
# ... and move them to the right place
cd $(CURDIR)/debian/texpower-examples/usr/share/doc/texpower-examples/ \
&& rm examples/manual.* && mv examples ../texpower && \
ln -s ../texpower/examples examples
dh_installchangelogs 0changes.txt
dh_compress
dh_fixperms
# correct the perms in examples/ because dh_fixpersm doesn't
chmod 644 \
$(CURDIR)/debian/texpower-examples/usr/share/doc/texpower/examples/*
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary-arch: build install
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
|