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 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
|
#!/usr/bin/make -f
#
# do not edit this file, instead edit rules.in!
# $Id: rules.in 2034 2006-12-11 07:19:37Z frank $
# The debian/rules(.in) file was nearly completely rewritten by
# Frank Kster frank@debian.org in 2004, with patches by
# Florent Rougon <f.rougon@free.fr>, 2005,
#
# who share the copyright.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
EPERL_FILES := debian/preinst debian/postinst debian/postrm \
debian/tetex-base.dirs \
debian/tetex-extra.postinst debian/tetex-extra.preinst \
debian/tetex-extra.postrm debian/tetex-extra.dirs \
debian/setup-conflinks \
debian/common.functions debian/sarge/changelog.sed
eperl_sourcefiles=debian/variables debian/COPYRIGHT.scripts \
debian/common.variables debian/common.functions
eperl_pwd = $(shell pwd)/debian
tex_common_dir = ../../tex-common/tex-common
real_common_variables=$(tex_common_dir)/debian/common.variables
real_common_functions_in=$(tex_common_dir)/debian/common.functions.in
SHELL = /bin/bash
package=tetex-base
extra=tetex-extra
docpack=tetex-doc
txmfdir=debian/$(package)/usr/share/texmf-tetex
extxmfdir=debian/$(extra)/usr/share/texmf-tetex
vardir=debian/$(package)/var/lib/texmf
pkgdir=debian/$(package)/usr/share/tetex-base
etcdir=/etc/texmf
debetc=debian/$(package)/etc/texmf
script_in_texmf_scriptdir = $(txmfdir)/scripts/thumbpdf/thumbpdf.pl $(txmfdir)/scripts/uniqleaf/uniqleaf.pl
### helper targets for the install target
stampdir=stampdir
include debian/rules.d/filelists.mk
include debian/rules.d/install.mk
# needed for quilt:
export QUILT_PATCHES=./debian/patches
### variables from eperl that need to be passed to the static helper makefiles
FONTMAP_MEMORY_DIR=/var/lib/tex-common/fontmap-cfg
###############
# Main targets
###############
# Eperl is simply great: thanks, Davide!
% :: %.in $(eperl_sourcefiles)
eperl -k -I $(eperl_pwd) -P -o $@ $<
-head -1 $@ | grep '^#!/' >/dev/null && chmod a+x $@
# Override this rule for debian/rules, which needs an additional command
debian/rules: debian/rules.in $(eperl_sourcefiles)
# Refresh debian/common.variables and debian/common.functions.in every
# time the rules file is going to be regenerated
$(update_commonstuff)
# Regenerate the rules file
eperl -k -P -o $@ $<
# Override the general rule for eperl-generated files in order to avoid a
# circular dependency (debian/common.functions is listed in
# $(eperl_sourcefiles)).
debian/common.functions: debian/common.functions.in debian/common.variables
eperl -k -P -o $@ $<
build: $(stampdir)/build-stamp
install: $(stampdir)/eperl-stamp $(stampdir)/install-stamp
binary: binary-indep binary-arch
sarge: debian/sarge-stamp
sid: debian/sid-stamp
##############################
# Subtargets that do the work
##############################
# common.variables and common.functions are shared between the
# tetex-base and tetex-bin source packages. On a normal build, the
# versions included in the individual source packages are used.
# Developers can use the most recent version from tex-commons svn
# repository. If you want to use this mechanism, check out the trunk
# of the tetex-common tree and pass the variable $(tex_common_dir) to
# make, indicating its location relative to the build dir. The
# default is ../../tex-common/tex-common/.
define update_commonstuff
test -e $(real_common_variables) && \
test $(real_common_variables) -nt debian/common.variables && \
cp $(real_common_variables) debian/ || true
test -e $(real_common_functions_in) && \
test $(real_common_functions_in) -nt debian/common.functions.in && \
cp $(real_common_functions_in) debian/ && \
eperl -k -P -o debian/common.functions debian/common.functions.in || true
endef
# For command-line use
commonstuff_update:
$(update_commonstuff)
$(stampdir):
-mkdir $(stampdir)
$(stampdir)/eperl-stamp: $(EPERL_FILES) | $(stampdir)
touch $@
$(stampdir)/build-stamp: $(stampdir)/patch-stamp
$(check-svn)
dh_testdir
# Make sure that our build scripts are executable.
# (only needed after upstream changes)
# chmod +x debian/remove-bad-license-files
# remove non-free documentation. This is needed until they are
# removed from the tarball
chmod a+x debian/remove-nonfreedocs
debian/remove-nonfreedocs
touch $(stampdir)/build-stamp
# quilt patch targets
clean-patches: debian/missingfiles.tar.gz
# quilt returns 2 if no patch is applied, but 1 if the topmost patch needs refreshing
quilt pop -a || test $$? = 2
# remove ordinary files (not dirs) from missingfiles.tar.gz
for file in `tar -tzf debian/missingfiles.tar.gz`; do \
test -f $$file && rm -f $$file || true; \
done
rm -f debian/missingfiles.tar.gz
rm -f $(stampdir)/patch-stamp
$(stampdir)/patch-stamp: debian/missingfiles.tar.gz | $(stampdir)
quilt push -a
tar -xzf debian/missingfiles.tar.gz
touch $@
debian/missingfiles.tar.gz:
uudecode -o debian/missingfiles.tar.gz debian/patches/missingfiles.tar.gz.uu
# for refreshing the uuencoded file after the tar.gz has been manually changed
debian/patches/missingfiles.tar.gz.uu: debian/missingfiles.tar.gz
uuencode < debian/missingfiles.tar.gz missingfiles.tar.gz.uu > debian/patches/missingfiles.tar.gz.uu
### Clean up the source tree.
clean: clean-patches
dh_testdir
dh_testroot
$(update_commonstuff)
dh_testdir
dh_testroot
# Make sure that our build scripts are executable.
chmod +x debian/remove-bad-license-files
# Remove files that we can't distribute if they're still in the tree
# (needed only after an upstream change)
# debian/remove-bad-license-files
# Run dh_clean to clean up the source tree, and remove stamps and filelists
dh_clean -Xconfig.old ./$(stampdir)/*-stamp ./$(stampdir)/files* ./debian/*.links ./debian/*.files
# clean eperl files
rm -f $(EPERL_FILES)
# remove generated copyright file
rm -f debian/copyright
rm -f debian/missingfiles.tar.gz
### Install the files for the packages.
$(stampdir)/install-stamp: $(stampdir)/build-stamp $(stampdir)/setup-install-stamp
$(stampdir)/install-stamp: filelists install-base install-extra install-nonfree
# these targets are in debian/rules.d/{filelists.mk,install.mk}
touch $(stampdir)/install-stamp
binary-indep: build install
$(check-svn)
dh_testdir
dh_testroot
# create copyright file
cat debian/copyright.header debian/Copyright.Files > debian/copyright
dh_installdocs -i -N tetex-extra-fonts
# dh_installdocs -p tetex-extra-fonts debian/copyr.type1 debian/changelog -X copyright
# Remove the /usr/share/doc/tetex-extra directoriy and
# replace ist with a link to the /usr/share/doc/tetex-base directory
rm -rf debian/$(extra)/usr/share/doc/$(extra)
ln -s tetex-base debian/$(extra)/usr/share/doc/tetex-extra
# rm -rf debian/xfonts-tetex/usr/share/doc/xfonts-tetex
# (cd debian/xfonts-tetex/usr/share/doc/; ln -s tetex-extra-fonts xfonts-tetex)
# ln -s ../texmf debian/$(docpack)/usr/share/doc/$(docpack)/
dh_installchangelogs ChangeLog -p tetex-base -p tetex-doc
cp debian/changelog.Debian.experimental debian/$(package)/usr/share/doc/$(package)/
cp debian/changelog.Debian.experimental debian/$(docpack)/usr/share/doc/$(docpack)/
dh_compress -Xhelpfile -X.php
dh_installinfo
# Install reportbug scripts
install -D --mode=755 debian/reportbug.base debian/$(package)/usr/share/bug/tetex-base/script
install -D --mode=644 debian/reportbug-control.base debian/$(package)/usr/share/bug/tetex-base/control
install -D --mode=755 debian/reportbug.extra debian/$(extra)/usr/share/bug/tetex-extra/script
# Install lintian overrides
install -D --mode=644 debian/tetex-base.lintian.overrides debian/$(extra)/usr/share/lintian/overrides/tetex-base
dh_fixperms -i --exclude=var/cache/fonts
chmod a-x $(script_in_texmf_scriptdir)
dh_gencontrol -i
dh_installdeb -i
dh_md5sums -i
dh_builddeb -i
# Beep to let the builder know we're done.
echo -en "\a"
## There are none now, but if we fix the mkhtml situation without
## moving the script to tetex-bin, there will be need to be a manpage.
# dh_installman
binary-arch: build
# There are no architecture-dependent files generated by this package.
# If there were any they would be made here.
####################################################################
# targets to compile for sarge.
#
# Do not run this with fakeroot, in order to get your e-mail address
# into changelog.
####################################################################
CHANGED_FILES_SARGE = debian/changelog
debian/sarge-stamp: debian/sarge/changelog.sed
for file in $(CHANGED_FILES_SARGE); do \
cp $${file} debian/sarge/`basename $${file}`.sid; \
done
# needs devscripts in etch or from backports.org
debchange --distribution sarge-backports -b --newversion 3.0.dfsg.3-5etch1~bpo.1 "Recompiled for sarge."
debchange --append "No source changes."
# need to remake rules
touch debian/rules.in
rm debian/sid-stamp
echo "dummy content for dpkg-source" > debian/sarge-stamp
debian/sid-stamp:
for file in $(CHANGED_FILES_SARGE); do \
mv debian/sarge/`basename $${file}`.sid $${file}; \
done
# need to remake rules
touch debian/rules.in
rm debian/sarge-stamp
echo "dummy content for dpkg-source" > debian/sid-stamp
.PHONY: build clean binary-indep binary-arch binary install sarge sid
.PHONY: commonstuff_update
define check-svn
test -d debian/.svn && \
(echo "please clean subversion directories"; exit 1) || true
endef
# Local Variables:
# mode: Makefile
# End:
|