| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
# debian/rules file for the Debian/GNU Linux gsl-doc package |
| 4 |
# Copyright (C) 1999 - 2013 Dirk Eddelbuettel <[email protected]> |
| 5 |
|
| 6 |
source := $(shell head -1 debian/changelog | awk '{print $$1}') |
| 7 |
docpack := $(source)-pdf |
| 8 |
infpack := $(source)-info |
| 9 |
debtmp := $(CURDIR)/debian/$(docpack) |
| 10 |
debdoc := $(CURDIR)/debian/$(docpack) |
| 11 |
|
| 12 |
#export DH_VERBOSE=1 |
| 13 |
|
| 14 |
## needed for texi2pdf / tetex as document has larger-than-normal indices |
| 15 |
#export pool_size=2500000 |
| 16 |
|
| 17 |
upstream: get-orig-source |
| 18 |
get-orig-source: |
| 19 |
#lynx ftp://sources.redhat.com/pub/gsl |
| 20 |
#lynx http://mirrors.rcn.net/pub/sourceware/gsl |
| 21 |
lynx http://www.network-theory.co.uk/download/gsl |
| 22 |
|
| 23 |
configure: configure-stamp |
| 24 |
configure-stamp: |
| 25 |
dh_testdir |
| 26 |
dh_testdir |
| 27 |
|
| 28 |
ln -sf /usr/share/misc/config.sub . |
| 29 |
ln -sf /usr/share/misc/config.guess . |
| 30 |
rm -f config.cache |
| 31 |
|
| 32 |
# only running so that we can get to do 'make; make install' in doc |
| 33 |
./configure CFLAGS="$(CFLAGS)" \ |
| 34 |
--prefix=/usr |
| 35 |
|
| 36 |
touch configure-stamp |
| 37 |
|
| 38 |
build: configure build-arch build-indep |
| 39 |
build-arch: build-stamp |
| 40 |
build-indep: build-stamp |
| 41 |
build-stamp: |
| 42 |
dh_testdir |
| 43 |
# $(MAKE) |
| 44 |
touch build-stamp |
| 45 |
|
| 46 |
build-doc: build-doc-stamp |
| 47 |
build-doc-stamp: configure-stamp |
| 48 |
dh_testdir |
| 49 |
# make ps files -- skip as we ship the upstream one in gsl-ref-psdoc |
| 50 |
#cd doc && $(MAKE) ps |
| 51 |
# make pdf |
| 52 |
## edd 10 Apr 2005 added patch by Guiseppe Bonacci for #303757 |
| 53 |
#cd doc && \ |
| 54 |
# cp -p randist.texi randist.texi.orig && \ |
| 55 |
# sed 's/^.*\\input \(rand.*\)\.tex.*$$/@end tex\n@center @image{\1}\n@tex/' \ |
| 56 |
# randist.texi.orig > randist.texi && \ |
| 57 |
# for i in rand-*.tex random-walk.tex ; do \ |
| 58 |
# echo Converting $$i to eps; \ |
| 59 |
# j=`basename $$i .tex`; \ |
| 60 |
# tex "\batchmode\nopagenumbers\input $$j\bye"; \ |
| 61 |
# dvips $$j; \ |
| 62 |
# ps2eps -f $$j.ps; \ |
| 63 |
# done && \ |
| 64 |
# for i in *.eps; do \ |
| 65 |
# echo Converting $$i to pdf... && epstopdf $$i ; \ |
| 66 |
# done && $(MAKE) ps && ps2pdf gsl-ref.ps |
| 67 |
# edd 23 Mar 2006 'make pdf' is now inactive upstream |
| 68 |
# (cd doc && $(MAKE)) |
| 69 |
# edd 08 Oct 2019 upstream uses rst, we can use 'make latexpdf' but need tex adjustment |
| 70 |
(cd doc && $(MAKE) latexpdf) |
| 71 |
(cd doc && $(MAKE) texinfo) |
| 72 |
touch build-doc-stamp |
| 73 |
|
| 74 |
test: build test-stamp |
| 75 |
test-stamp: |
| 76 |
#-$(MAKE) check CFLAGS="$(CFLAGSnog)" | grep -C5 -v '^PASS:' |
| 77 |
touch test-stamp |
| 78 |
|
| 79 |
clean: |
| 80 |
dh_testdir |
| 81 |
dh_testroot |
| 82 |
rm -f build-stamp install-stamp test-stamp build-doc-stamp \ |
| 83 |
configure-stamp install-doc-stamp |
| 84 |
rm -rf debian/static/ |
| 85 |
-rm -f doc/*.pdf doc/*.dvi doc/*.log doc/*.ps |
| 86 |
dh_clean lib/*so* build/*.so* |
| 87 |
[ ! -f Makefile ] || $(MAKE) distclean |
| 88 |
rm -vf config.sub config.guess |
| 89 |
|
| 90 |
install: test install-stamp |
| 91 |
install-stamp: |
| 92 |
$(MAKE) -f debian/rules DH_OPTIONS= install-work |
| 93 |
install-work: |
| 94 |
dh_testdir |
| 95 |
dh_testroot |
| 96 |
dh_prep |
| 97 |
dh_installdirs |
| 98 |
#$(MAKE) prefix=$(debtmp)/usr \ |
| 99 |
# libdir=$(debtmp)/usr/lib \ |
| 100 |
# infodir=$(debtmp)/usr/share/info \ |
| 101 |
# includedir=$(debtmp)/usr/include \ |
| 102 |
# mandir=$(debtmp)/usr/share/man install |
| 103 |
|
| 104 |
touch install-stamp |
| 105 |
|
| 106 |
install-doc: install-doc-stamp |
| 107 |
install-doc-stamp: build-doc |
| 108 |
dh_testdir |
| 109 |
dh_testroot |
| 110 |
|
| 111 |
(cd doc && $(MAKE) prefix=$(debtmp)/usr \ |
| 112 |
libdir=$(debtmp)/usr/lib \ |
| 113 |
infodir=$(debtmp)/usr/share/info \ |
| 114 |
includedir=$(debtmp)/usr/include \ |
| 115 |
mandir=$(debtmp)/usr/share/man install ) |
| 116 |
|
| 117 |
# deal with automake / install-info issue #215538 |
| 118 |
rm -vf $(debtmp)/usr/share/info/dir \ |
| 119 |
$(debtmp)/usr/share/info/dir.old |
| 120 |
|
| 121 |
dh_install --sourcedir=debian/$(docpack) -p$(infpack) |
| 122 |
|
| 123 |
mkdir -p -m 0755 $(debdoc)/usr/share/doc/$(docpack) |
| 124 |
install -m 0644 doc/_build/latex/gsl-ref.pdf $(debdoc)/usr/share/doc/$(docpack) |
| 125 |
|
| 126 |
# remove manual pages (in the dfsg package) and info from the pdf pkg tree |
| 127 |
rm -frv debian/gsl-doc-pdf/usr/share/man |
| 128 |
rm -frv debian/gsl-doc-pdf/usr/share/info |
| 129 |
touch install-doc-stamp |
| 130 |
|
| 131 |
# This single target is used to build all the packages, all at once, or |
| 132 |
# one at a time. So keep in mind: any options passed to commands here will |
| 133 |
# affect _all_ packages. Anything you want to only affect one package |
| 134 |
# should be put in another target, such as the install target. |
| 135 |
binary-common: build-doc install-doc |
| 136 |
echo "Running binary-common ($$DH_OPTIONS)" |
| 137 |
#dh_testversion 2.0 |
| 138 |
dh_testdir |
| 139 |
dh_testroot |
| 140 |
#dh_installdebconf |
| 141 |
dh_link |
| 142 |
dh_installdocs #-p$(libpack) AUTHORS NEWS README TODO BUGS THANKS SUPPORT |
| 143 |
#dh_installexamples |
| 144 |
#dh_installmenu |
| 145 |
#dh_installemacsen |
| 146 |
#dh_installpam |
| 147 |
#dh_installinit |
| 148 |
#dh_installcron |
| 149 |
dh_installinfo -p$(infpack) |
| 150 |
#dh_undocumented -p$(binpack) gsl-histogram.1 gsl-randist.1 |
| 151 |
dh_installchangelogs ChangeLog |
| 152 |
dh_compress |
| 153 |
dh_fixperms |
| 154 |
# dh_strip -N$(devpack) |
| 155 |
# dh_strip --sourcedir=debian/tmp --dbg-package=libgsl0-dbg |
| 156 |
#dh_suidregister |
| 157 |
# dh_makeshlibs |
| 158 |
dh_installdeb |
| 159 |
#dh_perl |
| 160 |
# dh_shlibdeps |
| 161 |
dh_gencontrol |
| 162 |
dh_md5sums |
| 163 |
dh_builddeb |
| 164 |
|
| 165 |
# Build architecture independant packages using the common target. |
| 166 |
binary-indep: build-doc install-doc |
| 167 |
echo "Running binary-indep" |
| 168 |
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
| 169 |
|
| 170 |
# Build architecture dependant packages using the common target. |
| 171 |
binary-arch: build install |
| 172 |
#$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common |
| 173 |
|
| 174 |
# Any other binary targets build just one binary package at a time. |
| 175 |
#binary-%: build install |
| 176 |
# make -f debian/rules binary-common DH_OPTIONS=-p$* |
| 177 |
|
| 178 |
#binary: binary-arch binary-indep |
| 179 |
binary: binary-indep |
| 180 |
#.PHONY: build build-doc clean binary-indep binary-arch binary install install-doc |
| 181 |
.PHONY: build build-doc clean binary-indep binary install-doc |