File: rules

package info (click to toggle)
tex-common 6.15
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 240 kB
  • sloc: sh: 660; perl: 593; makefile: 60
file content (98 lines) | stat: -rwxr-xr-x 2,994 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

INSTDIR=$(CURDIR)/debian/tex-common

bin_scripts=dh_installtex
sbin_scripts=update-language update-texmf-config update-tl-stacked-conffile update-texmf
nonbin_scripts=

sbin_installfiles=$(foreach script,$(sbin_scripts), scripts/$(script))
sbin_manpages=$(foreach script,$(sbin_scripts), scripts/$(script).8)

bin_installfiles=$(foreach script,$(bin_scripts), scripts/$(script))
bin_manpages=$(foreach script,$(bin_scripts), scripts/$(script).1)

nonbin_installfiles=$(foreach script,$(nonbin_scripts), scripts/$(script)) \
	texmf/web2c/mktex.cnf

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

build-stamp:
	dh_testdir

        # Add here commands to compile the package.
	cd scripts; pod2man dh_installtex > dh_installtex.1
	cd scripts; help2man -n "generate hyphenation configuration for TeX engines" -s 8 -S Debian  -N ./update-language > update-language.8

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

        # Add here commands to clean up after the build process.
	-rm -f scripts/dh_installtex.1
	-rm -f scripts/update-language.8
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

        # Add here commands to install the package into debian/tex-common.
	cp conf/texmf.d/00debian.cnf $(INSTDIR)/etc/texmf/texmf.d/
	cp $(sbin_installfiles) $(INSTDIR)/usr/sbin/
	cp $(bin_installfiles) $(INSTDIR)/usr/bin/
	cp $(nonbin_installfiles) $(INSTDIR)/usr/share/tex-common/

        # debhelper stuff
        # dh_installtex(.1) is already installed via the bin_scripts
	grep -v '^[ \t]*# ' scripts/postrm-tex > $(INSTDIR)/usr/share/debhelper/autoscripts/postrm-tex
	grep -v '^[ \t]*# ' scripts/postinst-tex > $(INSTDIR)/usr/share/debhelper/autoscripts/postinst-tex
	cp scripts/tex.pm $(INSTDIR)/usr/share/perl5/Debian/Debhelper/Sequence/

        # fontcache stuff with proper permissions
	install -d $(INSTDIR)/etc/texmf/web2c/
	install -m 644 texmf/web2c/mktex.cnf $(INSTDIR)/etc/texmf/web2c/

        # Remove the out-of-date ls-R file from /usr/share/texmf and create a
        # link to one in /var/lib/texmf that we can update without violating
        # the FHS (symlink created by dh_link)
	rm -f debian/$(package)/usr/share/texmf/ls-R

        # Debian-specific stuff
	install -m 644 debian/reportbug-control $(INSTDIR)/usr/share/bug/tex-common/control


# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	$(check-svn)
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installexamples
	dh_installman $(sbin_manpages) $(bin_manpages)
	dh_link
	dh_compress
	dh_fixperms --exclude=var/cache/fonts
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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