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
|
#!/usr/bin/make -f
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# QUILT_PATCH_DIR: where the patches live
QUILT_PATCH_DIR=debian/patches
get-orig-source:
dh_testdir
chmod +x debian/update_src.sh
debian/update_src.sh
patch: patched-stamp
patched-stamp:
# quilt exits with 2 as return when there was nothing to do.
# That's not an error here (but it's usefull to break loops in crude scripts)
QUILT_PATCHES=$(QUILT_PATCH_DIR) quilt push -a || test $$? = 2
touch patched-stamp
build: build-stamp
build-stamp: patched-stamp
dh_testdir
# Add here commands to compile the package.
$(MAKE) -C src
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp install-stamp
# Add here commands to clean up after the build process.
-$(MAKE) -C src clean
# Clean up the Quilt stuff
QUILT_PATCHES=$(QUILT_PATCH_DIR) quilt pop -a -R || test $$? = 2
rm -rf .pc patched-stamp
# Remove .png files created out of uue files
rm -f debian/html/*.png
# Remove the index.html file for html documentation
rm -f debian/html/index.html
# Remove the changelogs and NEWS stuff
rm -rf debian/doc
# Remove the litbuild stuff
rm -rf dest
rm -rf debian/lit/*log
dh_clean
install: DH_OPTIONS=-A
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/tmp.
$(MAKE) -C src install DESTDIR=`pwd`/debian/tmp
install -d debian/tmp/etc/texmf/texmf.d
install -m 644 src/90tex4ht.cnf debian/tmp/etc/texmf/texmf.d
# Setup links
install -d debian/tmp/usr/share/texmf/tex4ht
ln -sf /etc/tex4ht/tex4ht.env debian/tmp/usr/share/texmf/tex4ht/
# Install documentation
(cd debian/images; for i in *.uue; do uudecode $$i; done; mv *.png ../html)
ln -s tex4ht_doc.html debian/html/index.html
mkdir -p debian/doc
(for i in bugfixes bugfixes2 bugfixes3; do html2text -nobs -style compact -ascii -width 79 -o debian/doc/$$i.txt lit/$$i.html ; done)
ln -s bugfixes2.txt debian/doc/changelog
ln -s bugfixes.txt debian/doc/NEWS
dh_install --sourcedir=debian
touch install-stamp
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# dh_testversion -i
dh_testdir -i
dh_testroot -i
dh_installdocs -i
# dh_installexamples -i
# dh_installmenu -i
# dh_installemacsen -i
# dh_installinit -i
# dh_installcron -i
# dh_installmanpages -i
dh_installchangelogs -i
dh_strip -i
dh_compress --exclude=test --exclude=demo --exclude=.png -i
dh_fixperms -i
# dh_suidregister -i
dh_installdeb -i
dh_shlibdeps -i
dh_gencontrol -i
# dh_makeshlibs -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
# dh_testversion -a
dh_testdir -a
dh_testroot -a
dh_installdocs -a
# dh_installexamples -a
# dh_installmenu -a
# dh_installemacsen -a
# dh_installinit -a
# dh_installcron -a
# dh_installmanpages -a
dh_installchangelogs -a
dh_strip -a
dh_compress --exclude=test --exclude=demo --exclude=.png -a
dh_fixperms -a
# dh_suidregister -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
# dh_makeshlibs -a
dh_md5sums -a
dh_builddeb -a
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
litbuild: clean
dh_testdir
# Apply some patches to lit/
QUILT_PATCHES=debian/lit/patches quilt push -a || test $?=2
chmod +x debian/lit/rebuild.sh
mkdir -p dest
debian/lit/rebuild.sh | tee -a debian/lit/litbuild.log
# Reverse the patches to lit/
QUILT_PATCHES=debian/lit/patches quilt pop -a || test $?=2
rm -rf .pc
# Diff ignore regular expression matching date strings
# also ignore the exit level 1 indicating that differences are found
-diff -ur -B -b -I '[[:space:]]*%.*' \
-I '.*[^0-9][0-9]\{4\}-[0-9][0-9]-[0-9][0-9][^0-9].*' \
texmf/ dest/texmf/ > debian/lit/texmf.diff.log
-diff -ur -B -b \
-I '.*[^0-9][0-9]\{4\}-[0-9][0-9]-[0-9][0-9][^0-9].*' \
src/ dest/src/ > debian/lit/src.diff.log
-diff -ur -B -b \
-I '.*[^0-9][0-9]\{4\}-[0-9][0-9]-[0-9][0-9][^0-9].*' \
bin/unix/ dest/bin/unix/ > debian/lit/scripts.diff.log
@echo "Look in debian/lit/litbuild.log for a copy of the litbuild"
@echo "output. The significant differences are in .diff.log"
@echo "files the same directory. The documentation for the"
@echo "literate source is in dest/litdoc."
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|