File: rules

package info (click to toggle)
gsl-doc 2.7.1-1
  • links: PTS
  • area: non-free
  • in suites: bookworm, forky, sid, trixie
  • size: 30,572 kB
  • sloc: ansic: 259,459; sh: 4,568; makefile: 1,136; python: 69
file content (181 lines) | stat: -rwxr-xr-x 5,714 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
181
#!/usr/bin/make -f
#                                                       -*- makefile -*-
# debian/rules file for the Debian/GNU Linux gsl-doc package
# Copyright (C) 1999 - 2013  Dirk Eddelbuettel <edd@debian.org>

source  := $(shell head -1 debian/changelog | awk '{print $$1}')
docpack := $(source)-pdf
infpack := $(source)-info
debtmp	:= $(CURDIR)/debian/$(docpack)
debdoc	:= $(CURDIR)/debian/$(docpack)

#export DH_VERBOSE=1

## needed for texi2pdf / tetex as document has larger-than-normal indices
#export pool_size=2500000

upstream: get-orig-source
get-orig-source:
        #lynx ftp://sources.redhat.com/pub/gsl
        #lynx http://mirrors.rcn.net/pub/sourceware/gsl
	lynx http://www.network-theory.co.uk/download/gsl

configure: configure-stamp
configure-stamp:
	dh_testdir
	dh_testdir

	ln -sf /usr/share/misc/config.sub .
	ln -sf /usr/share/misc/config.guess .
	rm -f config.cache

        # only running so that we can get to do 'make; make install' in doc
	./configure 	CFLAGS="$(CFLAGS)" 		\
			--prefix=/usr

	touch configure-stamp

build: configure build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
	dh_testdir
        # $(MAKE)
	touch build-stamp

build-doc: build-doc-stamp
build-doc-stamp: configure-stamp
	dh_testdir
        # make ps files -- skip as we ship the upstream one in gsl-ref-psdoc
        #cd doc && $(MAKE) ps
        # make pdf
        ## edd 10 Apr 2005  added patch by Guiseppe Bonacci for #303757
	#cd doc && \
	#   cp -p randist.texi randist.texi.orig && \
	#   sed 's/^.*\\input \(rand.*\)\.tex.*$$/@end tex\n@center @image{\1}\n@tex/' \
	#     randist.texi.orig > randist.texi && \
	#   for i in rand-*.tex random-walk.tex ; do \
	#     echo Converting $$i to eps; \
	#     j=`basename $$i .tex`; \
	#     tex "\batchmode\nopagenumbers\input $$j\bye"; \
	#     dvips $$j; \
	#     ps2eps -f $$j.ps; \
	#   done && \
	#   for i in *.eps; do \
	#     echo Converting $$i to pdf... && epstopdf $$i ; \
	#   done && $(MAKE) ps && ps2pdf gsl-ref.ps
        # edd 23 Mar 2006  'make pdf' is now inactive upstream
	# (cd doc && $(MAKE))
	# edd 08 Oct 2019 upstream uses rst, we can use 'make latexpdf' but need tex adjustment
	(cd doc && $(MAKE) latexpdf)
	(cd doc && $(MAKE) texinfo)
	touch build-doc-stamp

test:	build test-stamp
test-stamp:
        #-$(MAKE) check CFLAGS="$(CFLAGSnog)" | grep -C5 -v '^PASS:'
	touch test-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp test-stamp build-doc-stamp \
		configure-stamp install-doc-stamp
	rm -rf debian/static/
	-rm -f doc/*.pdf doc/*.dvi doc/*.log doc/*.ps
	dh_clean lib/*so* build/*.so*
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -vf config.sub config.guess

install: test install-stamp
install-stamp:
	$(MAKE) -f debian/rules DH_OPTIONS= install-work
install-work:
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
        #$(MAKE) prefix=$(debtmp)/usr                    \
        #        libdir=$(debtmp)/usr/lib                \
        #        infodir=$(debtmp)/usr/share/info        \
        #        includedir=$(debtmp)/usr/include        \
        #	 mandir=$(debtmp)/usr/share/man		install

	touch install-stamp

install-doc: install-doc-stamp
install-doc-stamp: build-doc
	dh_testdir
	dh_testroot

	(cd doc && $(MAKE) prefix=$(debtmp)/usr	 	\
		libdir=$(debtmp)/usr/lib		\
		infodir=$(debtmp)/usr/share/info	\
		includedir=$(debtmp)/usr/include	\
		mandir=$(debtmp)/usr/share/man		install )

        # deal with automake / install-info issue #215538
	rm -vf	$(debtmp)/usr/share/info/dir 		\
		$(debtmp)/usr/share/info/dir.old

	dh_install --sourcedir=debian/$(docpack) -p$(infpack)

	mkdir -p -m 0755 $(debdoc)/usr/share/doc/$(docpack)
	install -m 0644 doc/_build/latex/gsl-ref.pdf  $(debdoc)/usr/share/doc/$(docpack)

        # remove manual pages (in the dfsg package) and info from the pdf pkg tree
	rm -frv debian/gsl-doc-pdf/usr/share/man
	rm -frv debian/gsl-doc-pdf/usr/share/info
	touch install-doc-stamp

# This single target is used to build all the packages, all at once, or
# one at a time. So keep in mind: any options passed to commands here will
# affect _all_ packages. Anything you want to only affect one package
# should be put in another target, such as the install target.
binary-common: build-doc install-doc
	echo "Running binary-common ($$DH_OPTIONS)"
        #dh_testversion 2.0
	dh_testdir
	dh_testroot
        #dh_installdebconf
	dh_link
	dh_installdocs		#-p$(libpack)	AUTHORS NEWS README TODO BUGS THANKS SUPPORT
        #dh_installexamples
        #dh_installmenu
        #dh_installemacsen
        #dh_installpam
        #dh_installinit
        #dh_installcron
	dh_installinfo		-p$(infpack)
        #dh_undocumented	-p$(binpack)	gsl-histogram.1 gsl-randist.1
	dh_installchangelogs			ChangeLog
	dh_compress
	dh_fixperms
#	dh_strip		-N$(devpack)
#	dh_strip	--sourcedir=debian/tmp	--dbg-package=libgsl0-dbg
        #dh_suidregister
#	dh_makeshlibs
	dh_installdeb
        #dh_perl
#	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture independant packages using the common target.
binary-indep: build-doc install-doc
	echo "Running binary-indep"
	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common

# Build architecture dependant packages using the common target.
binary-arch: build install
        #$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common

# Any other binary targets build just one binary package at a time.
#binary-%: build install
#	make -f debian/rules binary-common DH_OPTIONS=-p$*

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