File: rules

package info (click to toggle)
texfam 1.1-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 13,628 kB
  • ctags: 3,925
  • sloc: ansic: 26,423; sh: 3,909; perl: 2,928; makefile: 1,990; yacc: 1,252; pascal: 772; lex: 213; asm: 139; awk: 35; sed: 34
file content (180 lines) | stat: -rwxr-xr-x 5,064 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
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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper. 
# GNU copyright 1997 by Joey Hess.
#
# This version is for a hypothetical package that builds an
# architecture-dependant package, as well as an architecture-independent
# package.

DEBVER := $(shell dpkg-parsechangelog | awk -F- '/^Version:/ {print $$NF}')
JTEXVER := 1.8-$(DEBVER)
MULTEXVER := 0.7-$(DEBVER)

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

# This is the debhelper compatability version to use.
export DH_COMPAT=1

# This has to be exported to make some magic below work.
export DH_OPTIONS

build: build-stamp
build-stamp:
	dh_testdir

	#./configure --prefix=/usr
	# Add here commands to compile the package.
	#$(MAKE)

	cd web2c; \
		./configure --prefix=/usr ; \
		cp ../debian/config.h config.h ; \
		make CFLAGE="-O2 -fomit-frame-pointer" LDFLAGS=-s tangle
	cd web2c-j; \
		./configure --prefix=/usr ; \
		cp ../debian/config.h-j config.h ; \
		make CFLAGE="-O2 -fomit-frame-pointer" LDFLAGS=-s jtex
	cd web2c-m; \
		./configure --prefix=/usr ; \
		make CFLAGE="-O2 -fomit-frame-pointer" LDFLAGS=-s programs

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp

	# Add here commands to clean up after the build process.
	#-$(MAKE) distclean
	-$(MAKE) -f debian/Makefile clean

	dh_clean

install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/tmp.
	#$(MAKE) install prefix=`pwd`/debian/tmp/usr

	install -m 755 debian/jtexconfig debian/tmp/usr/sbin
	install -m 755 debian/multexconfig debian/tmp/usr/sbin
	make -f debian/Makefile install DESTDIR=`pwd`/debian/tmp
	install -m 644 README \
		debian/tmp/usr/share/doc/jtex-bin/README.web2c
	install -m 644 ChangeLog \
		debian/tmp/usr/share/doc/jtex-bin/changelog.web2c
	install -m 644 web2c-j/ChangeLog \
		debian/tmp/usr/share/doc/jtex-bin/changelog
	install -m 644 README \
		debian/multex-bin/usr/share/doc/multex-bin/README.web2c
	install -m 644 ChangeLog \
		debian/multex-bin/usr/share/doc/multex-bin/changelog.web2c
	install -m 644 web2c-m/ChangeLog \
		debian/multex-bin/usr/share/doc/multex-bin/changelog
	install -m 644 debian/README.Debian \
		debian/multex-bin/usr/share/doc/multex-bin/README.Debian
	ln -s ../man7/undocumented.7.gz \
		debian/multex-bin/usr/share/man/man8/multexconfig.8.gz
	ln -s ../man7/undocumented.7.gz \
		debian/multex-bin/usr/share/man/man1/mtex.1.gz
	ln -s ../man7/undocumented.7.gz \
		debian/multex-bin/usr/share/man/man1/multex.1.gz
	ln -s ../man7/undocumented.7.gz \
		debian/multex-bin/usr/share/man/man1/amsmultex.1.gz
#	ln -s ../man7/undocumented.7.gz \
#		debian/multex-bin/usr/share/man/man1/inimultex.1.gz
	ln -s ../man7/undocumented.7.gz \
		debian/multex-bin/usr/share/man/man1/mullatex.1.gz
	ln -s ../man7/undocumented.7.gz \
		debian/multex-bin/usr/share/man/man1/virmultex.1.gz

	dh_movefiles

	chmod +x debian/2euc
	debian/2euc	debian/tmp/usr/share/doc/jtex-bin/changelog
	gzip -9		debian/tmp/usr/share/doc/jtex-bin/changelog
	debian/2euc	debian/multex-bin/usr/share/doc/multex-bin/changelog
	gzip -9		debian/multex-bin/usr/share/doc/multex-bin/changelog

	touch install-stamp

# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: DH_OPTIONS=-i
binary-indep: build install
	# Need this version of debhelper for DH_OPTIONS to work.
#	dh_testversion 1.1.17
#	dh_testdir
#	dh_testroot
##	dh_installdebconf
#	dh_installdocs
#	dh_installexamples
#	dh_installmenu
##	dh_installemacsen
##	dh_installpam
##	dh_installinit
#	dh_installcron
##	dh_installmanpages
#	dh_installinfo
##	dh_undocumented
#	dh_installchangelogs ChangeLog
#	dh_link
#	dh_compress
#	dh_fixperms
#	# You may want to make some executables suid here.
#	dh_suidregister
#	dh_installdeb
##	dh_perl
#	dh_gencontrol
#	dh_md5sums
#	dh_builddeb

# Build architecture-dependent files here.
# Pass -a to all debhelper commands in this target to reduce clutter.
binary-arch: DH_OPTIONS=-a
binary-arch: build install
	# Need this version of debhelper for DH_OPTIONS to work.
	dh_testversion 1.1.17
	dh_testdir
	dh_testroot
#	dh_installdebconf
	dh_installdocs
	debian/2euc	debian/tmp/usr/share/doc/jtex-bin/*.jp
	debian/2euc	debian/multex-bin/usr/share/doc/multex-bin/*.jp
	dh_installexamples
	dh_installmenu
#	dh_installemacsen
#	dh_installpam
#	dh_installinit
	dh_installcron
#	dh_installmanpages
	dh_installinfo
#	dh_undocumented
	dh_undocumented amsjtex.1 inijtex.1 jlatex.1 virjtex.1 jlatex209.1
	dh_undocumented jtex.1 jtexconfig.8
#	dh_installchangelogs ChangeLog
	dh_installchangelogs 
	dh_strip
	dh_link
	dh_compress
	dh_fixperms
	# You may want to make some executables suid here.
	dh_suidregister
	dh_installdeb
#	dh_makeshlibs
#	dh_perl
	dh_shlibdeps
#	dh_gencontrol
	dh_gencontrol -pjtex-bin -Nmultex-bin -u-v$(JTEXVER)
	dh_gencontrol -pmultex-bin -Njtex-bin -u-v$(MULTEXVER)
	dh_md5sums
	dh_builddeb

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