File: rules

package info (click to toggle)
texlive-base 2012.20120611-5
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 403,288 kB
  • sloc: perl: 37,753; ruby: 4,714; sh: 4,212; makefile: 3,659; xml: 2,387; ansic: 1,731; python: 1,029; tcl: 631; awk: 603; cpp: 549; lisp: 428; java: 32; sed: 8
file content (109 lines) | stat: -rwxr-xr-x 4,260 bytes parent folder | download
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
#!/usr/bin/make -f
# 
# debian/rules file for texlive-base
# $Id: rules.in 5480 2012-05-16 01:30:56Z preining $

PACKAGES=texlive-base texlive-generic-recommended texlive-latex-base texlive-latex-recommended texlive-fonts-recommended texlive-pictures texlive-luatex texlive-metapost texlive-omega texlive-xetex texlive-fonts-recommended-doc texlive-latex-base-doc texlive-latex-recommended-doc texlive-metapost-doc texlive-pictures-doc
METAPACKAGES=texlive texlive-full texlive-common

SHELL=/bin/bash

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp

build-stamp:
	touch build-stamp

clean: 
	for i in $(PACKAGES) $(METAPACKAGES) ; do \
	  rm -f debian/$$i.{README.Debian,links,links.generated} ; \
	  rm -f debian/$$i.{postinst,postrm,preinst,prerm} ; \
	  rm -f debian/$$i.{maps,hyphens,formats} ; \
	done
	rm -f debian/texlive-base.cnf
	# texlive contains some .orig files we need to keep otherwise
	# the copy will fail due to the files occurring in the tlpdb
	dh_clean -X.orig -X.bak
	rm -f configure-stamp
	rm -f build-stamp
	rm -f install-stamp

install: install-stamp

install-stamp: build-stamp
	# make sure we have texmf/web2c otherwise the media detection
	# might break (like in texlive-lang)
	mkdir -p texmf/web2c
	perl debian/tpm2deb-bin.pl --nosource $(PACKAGES) $(METAPACKAGES)
	for i in $(PACKAGES) $(METAPACKAGES) ; do \
	  if [ -d debian/$$i.root ] ; then bash debian/merge-dist-tree debian/$$i.root debian/$$i ; fi ; \
	  bash debian/generate-license-file $$i ; \
	  install -D --mode=644 debian/$$i.override debian/$$i/usr/share/lintian/overrides/$$i ; \
	  install -D --mode=755 debian/bug.script debian/$$i/usr/share/bug/$$i/script ; \
	  install -D --mode=644 debian/bug.control debian/$$i/usr/share/bug/$$i/control ; \
	  bash debian/create-doc-links $$i texlive-doc > debian/$$i.links ; \
	  if [ -r debian/$$i.links.dist ] ; then cat debian/$$i.links.dist >> debian/$$i.links ; fi ; \
	  if [ -r debian/$$i.README ] ; then cat debian/$$i.README > debian/$$i.README.Debian ; fi ; \
	  cat debian/README.Debian >> debian/$$i.README.Debian ; \
	done
	touch install-stamp

binary-arch:

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_install
	dh_installdirs
	dh_installmenu
	dh_installdocs -A debian/README.source
	dh_installdocs -p texlive-common README readme-txt.dir readme-html.dir debian/CHANGES.packaging
	dh_installtex -Ntexlive-base -A --priority=10	\
		$(patsubst %,-N%,$(METAPACKAGES))	\
		--flavor=lsr:full,tree:texlive
	dh_installtex -ptexlive-base --priority=10	\
		--flavor=format:build_all,lsr:full,tree:texlive
	# /usr/bin/mf has been created by dh_installtex as symlink to mf-nowin
	# but is also shipped by texlive-base-bin, remove it.
	rm debian/texlive-base/usr/bin/mf
	# remove updmap(-sys), they are shipped in texlive-binaries
	#rm debian/texlive-base/usr/bin/updmap
	#rm debian/texlive-base/usr/bin/updmap-sys
	# furthermore we want to have etex and pdfetex as links in 
	# texlive-base-bin and not in texlive-base, remove them here
	# and add them via dh_link in texlive-base-binaries
	rm debian/texlive-base/usr/bin/etex 
	rm debian/texlive-base/usr/bin/pdfetex
	# for the libpaper hook, install templates and
	# translations. No need to modify postrm. I hope it accepts
	# the missing config script
	dh_installdebconf -n
	cp debian/texlive-base.libpaper debian/texlive-base/etc/libpaper.d/texlive-base
	chmod a+x debian/texlive-base/etc/libpaper.d/texlive-base
	#cp debian/md5sums/* debian/texlive-base/usr/share/texlive-base/
	dh_installchangelogs
	bash debian/convert-info-files-to-unix.sh
	bash debian/fix-manpages.sh
	dh_installinfo
	# remove info files that are present in texlive-binaries
	rm debian/texlive-base/usr/share/info/dvips.info*
	rm debian/texlive-base/usr/share/info/web2c.info*
	rm debian/texlive-base/usr/share/info/kpathsea.info*
	rmdir --ignore-fail-on-non-empty debian/texlive-base/usr/share/info
	dh_installmime
	dh_link
	dh_compress -X.pdf
	dh_fixperms
	# we also have to fix the permissions of the link targets from /usr/bin
	bash debian/fix-bin-symlink-targets-permissions.sh
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb -- -Zxz

binary: binary-indep binary-arch

.PHONY: build clean binary-indep binary-arch binary install

# eof