File: rules

package info (click to toggle)
context 2012.05.30.20120611-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 53,828 kB
  • sloc: xml: 104,137; ruby: 15,598; perl: 1,893; ansic: 146; makefile: 145; sh: 69
file content (85 lines) | stat: -rwxr-xr-x 2,618 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
#! /usr/bin/make -f

package        := context
instbase       := debian/$(package)

build: build-indep

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

build-indep-stamp:
	touch build-indep-stamp

clean:
	dh_testroot
	rm -f build-indep-stamp
	# rm -rf bibtex context doc fonts metapost scripts tex tpm web2c
	dh_clean

binary-indep: build-indep
	dh_testdir 
	dh_testroot
	dh_clean
	dh_installdirs usr/share/texmf/web2c usr/share/doc/$(package)	\
		var/lib/texmf/web2c/pdftex	\
		etc/texmf/tex/context/user
	cp -a texmf-dist/* $(instbase)/usr/share/texmf
	rm -rf $(instbase)/usr/share/texmf/tlpkg
	# move user config file to /etc
	mv $(instbase)/usr/share/texmf/tex/context/user/cont-sys.rme	\
		$(instbase)/etc/texmf/tex/context/user
	rmdir $(instbase)/usr/share/texmf/tex/context/user

	# remove koeieletters.map file, it is not needed here
	rm $(instbase)/usr/share/texmf/fonts/map/pdftex/context/koeieletters.map

	# install texmfcnf.lua file
	cp debian/texmfcnf.lua $(instbase)/usr/share/texmf/web2c

	dh_installtex --flavor=format:no_links
	dh_installdirs usr/bin

	#
	# scripts dealing
	cp bin/i386-linux/* $(instbase)/usr/bin
	rm -r $(instbase)/usr/share/texmf/scripts/context/stubs
	#
	##cp texmf-dist/scripts/context/stubs/unix/* $(instbase)/usr/bin
	(echo "#!/bin/sh"; echo "mtxrun --script pdftrimwhite \"$@\"" ) > $(instbase)/usr/bin/pdftrimwhite
	(echo "#!/bin/sh"; echo "mtxrun --script texfind \"$@\"" ) > $(instbase)/usr/bin/texfind
	(echo "#!/bin/sh"; echo "mtxrun --script texfont \"$@\"" ) > $(instbase)/usr/bin/texfont
	####(echo "#!/usr/bin/perl"; tail -n +3 texmf-dist/scripts/context/perl/pdftrimwhite.pl ) > $(instbase)/usr/bin/pdftrimwhite

	#
	# documentation
	rm -r $(instbase)/usr/share/texmf/doc
	cp -a texmf-dist/doc/context/* $(instbase)/usr/share/doc/$(package)
	# remove GFDL license text, it is referenced in copyright
	rm $(instbase)/usr/share/doc/context/manuals/reference/COPYING
	# remove the doc under texmf
	dh_installman texmf/doc/man/man1/*.1
	# disabled
	dh_installdocs debian/changelog.Debian.prerelease	\
			debian/MANIFEST.nonfree	debian/MANIFEST.doc-nonfree \
			debian/README.MarkIV debian/Release_Notes

	# lintian override for script-not-executable
	install -D --mode=644 debian/override $(instbase)/usr/share/lintian/overrides/$(package)

	dh_installmenu
	dh_installchangelogs
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch:
# We have nothing to do here but the Debian Policy says this target must
# exist.

binary: binary-indep binary-arch

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