File: rules

package info (click to toggle)
texinfo 6.3.0.dfsg.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 83,208 kB
  • ctags: 20,378
  • sloc: perl: 909,030; ansic: 52,283; sh: 18,975; xml: 5,697; awk: 1,844; makefile: 1,441; pascal: 243; lisp: 213; sed: 78
file content (137 lines) | stat: -rwxr-xr-x 3,931 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
#!/usr/bin/make -f

#export DH_VERBOSE=1
export DH_OPTIONS

DEB_CFLAGS_MAINT_APPEND=-Wall
# needed for correct building of new texinfo
DEB_CFLAGS_MAINT_STRIP=-Werror=format-security

DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

texinfo := $(CURDIR)/debian/texinfo
ii := $(CURDIR)/debian/install-info
tmpdir := $(CURDIR)/debian/tmp

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

# The Debian provided libintl-perl breaks several tests and probably
# also some of the behaviour. Disable it until these problems are fixed
# on either side.
#	  --with-external-libintl-perl=yes \


build-stamp:
	dh_testdir
	dh_autotools-dev_updateconfig
	AWK=awk ./configure $(shell dpkg-buildflags --export=configure) \
	  --with-external-Text-Unidecode=yes \
	  --prefix=/usr \
	  --libexecdir='$${prefix}/lib' \
	  --infodir='$${prefix}/share/info' --mandir='$${prefix}/share/man' \
	  --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
	# after dh_autotools-dev_updateconfig the man pages would
	# be rebuild, but we don't have tex installed (and don't want
	# to add texlive-binaries to build-deps, too big and not used)
	# so the check we patched in would break the man page generation
	# see BTS#740343
	# backup the generated man page texi2dvi.1 and restore it
	cp man/texi2dvi.1 debian
	$(MAKE)
	mv debian/texi2dvi.1 man/
	touch man/texi2dvi.1
	# finished
	touch $@

check-stamp: build-stamp
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) check ALL_TESTS=yes
endif
	touch $@

clean:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) distclean
	dh_autotools-dev_restoreconfig
	dh_clean install-stamp build-stamp check-stamp \
		intl/libintl.h config.log

install: install-stamp

install-stamp: DH_OPTIONS=
install-stamp: build-stamp check-stamp
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	$(MAKE) install install-tex prefix=$(tmpdir)/usr \
                                    TEXMF=$(tmpdir)/usr/share/texmf
	find $(tmpdir) -type f -name dir | xargs rm -f
	#
	# clean out .la files as they contain references to libperl 
	# which is not necessary
	sed -i "/dependency_libs/ s/'.*'/''/" `find $(tmpdir) -name '*.la'`
	#
	# epsf.tex is in texlive
	rm -rf $(tmpdir)/usr/share/texmf/tex/generic
	# install all the files
	dh_install --fail-missing --sourcedir=debian/tmp -X share/info
	#
	# install additional files that are not installed by default
	install -m 0755 util/txixml2texi $(texinfo)/usr/bin/txixml2texi
	#
	# we ship ginstall-info as link to install-info, it is long enough
	dh_link
	dh_link -p install-info \
		usr/share/man/man1/install-info.1 	\
		usr/share/man/man1/ginstall-info.1	\
		usr/bin/install-info 			\
		usr/bin/ginstall-info
	#
	# other scripts to be installed
	install -m 0755 debian/update-info-dir $(ii)/usr/sbin/update-info-dir
	mkdir -p $(ii)/usr/share/man/man8
	install -m 0644 debian/update-info-dir.8 $(ii)/usr/share/man/man8/update-info-dir.8
	# we don't do the cyrtexinfo dance anymore
	#cp debian/conf/50cyrtexinfo.cnf $(texinfo)/etc/texmf/fmt.d
	#echo "50cyrtexinfo" > $(texinfo)/var/lib/tex-common/fmtutil-cnf/texinfo.list
	touch install-stamp

binary-indep:
# There aren't any architecture independent packages here.

binary-arch: DH_OPTIONS=-a
binary-arch: install
	dh_testdir
	dh_testroot
	dh_installdocs -A AUTHORS README NEWS TODO
	dh_installdocs -p texinfo debian/README.cyrtexinfo \
		doc/refcard/txirefcard*.pdf
		
	dh_installmenu
	dh_installmime
	dh_installchangelogs ChangeLog
ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
	dh_strip
endif
endif
	dh_compress
	dh_perl /usr/lib/texinfo
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

# other targets
update-texinfo.tex:
	wget -O $(CURDIR)/debian/texinfo.tex ftp://tug.org/tex/texinfo.tex

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