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 188 189 190 191 192 193 194 195
|
#!/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-arch build-indep
build-arch: build-arch-stamp
build-arch-stamp: patched-stamp
dh_testdir
$(MAKE) -C src arch
touch build-arch-stamp
build-indep: build-indep-stamp
build-indep-stamp: patched-stamp
dh_testdir
$(MAKE) -C src indep
touch build-indep-stamp
clean:
dh_testdir
dh_testroot
rm -f build-arch-stamp build-indep-stamp install-arch-stamp install-indep-stamp
# Clean up after the build process.
[ ! -f src/Makefile ] || $(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-arch: DH_OPTIONS=-a
install-arch: install-arch-stamp
install-arch-stamp: build-arch-stamp
dh_testdir
dh_testroot
dh_clean -k -d
dh_installdirs -a
$(MAKE) -C src install-arch DESTDIR=`pwd`/debian/tmp
# Install documentation
(cd debian/images; for i in *.uue; do uudecode $$i; done; mv *.png ../html)
ln -sf tex4ht_doc.html debian/html/index.html
mkdir -p debian/doc
(for i in bugfixes bugfixes2 bugfixes3 bugfixes4; do html2text -nobs -style compact -ascii -width 79 -o debian/doc/$$i.txt lit/$$i.html ; done)
ln -sf bugfixes2.txt debian/doc/changelog
ln -sf bugfixes.txt debian/doc/NEWS
dh_install --sourcedir=debian -a
touch install-arch-stamp
install-indep: DH_OPTIONS=-i
install-indep: install-indep-stamp
install-indep-stamp: build-indep-stamp
dh_testdir
dh_testroot
dh_clean -k -d
dh_installdirs -i
# Add here commands to install the package into debian/tmp.
$(MAKE) -C src install-indep DESTDIR=`pwd`/debian/tmp
install -d debian/tmp/etc/texmf/texmf.d
install -m 644 src/80tex4ht.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/
dh_install --sourcedir=debian -i
touch install-indep-stamp
binary: binary-arch binary-indep
# Build architecture-independent files here.
binary-indep: build-indep install-indep
# 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_installchangelogs -i
dh_compress --exclude=test --exclude=demo --exclude=.png -i
dh_fixperms -i
# dh_suidregister -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build-arch install-arch
# dh_testversion -a
dh_testdir -a
dh_testroot -a
dh_installdocs -a
# dh_installexamples -a
# dh_installmenu -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
# If the LITK variable is defined the avoid bootstrap
ifdef LITK
debian/lit/rebuild.sh -k | tee -a debian/lit/litbuild.log
else
debian/lit/rebuild.sh | tee -a debian/lit/litbuild.log
endif
# 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."
.PHONY: build build-indep build-arch clean binary-indep binary-arch binary install-indep install-arch
|