Codebase list geos / eba9929
Use minimal dh rules with autoreconf for retooling. Bas Couwenberg 10 years ago
4 changed file(s) with 48 addition(s) and 106 deletion(s). Raw diff Collapse all Expand all
22 * Add myself to Uploaders.
33 * Restructure control file with cme, changes: Vcs-* fields.
44 * Rename libgeos-ruby1.8 to ruby-geos, according to Ruby packaging policy.
5 * Use minimal dh rules with autoreconf for retooling.
6 (closes: #733585)
57
68 -- Bas Couwenberg <sebastic@xs4all.nl> Sun, 16 Feb 2014 20:11:38 +0100
79
88 swig,
99 ruby,
1010 ruby-all-dev,
11 autotools-dev
11 dh-autoreconf
1212 Standards-Version: 3.9.3
1313 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-grass/geos.git
1414 Vcs-Git: git://anonscm.debian.org/pkg-grass/geos.git
88 swig,
99 ruby,
1010 ruby-all-dev,
11 autotools-dev
11 dh-autoreconf
1212 Standards-Version: 3.9.3
1313 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-grass/geos.git
1414 Vcs-Git: git://anonscm.debian.org/pkg-grass/geos.git
00 #!/usr/bin/make -f
11 # -*- makefile -*-
2 # Sample debian/rules that uses debhelper.
3 # This file was originally written by Joey Hess and Craig Small.
4 # As a special exception, when this file is copied by dh-make into a
5 # dh-make output file, you may use that output file without restriction.
6 # This special exception was added by Craig Small in version 0.37 of dh-make.
72
83 # Uncomment this to turn on verbose mode.
94 #export DH_VERBOSE=1
1813 VER_MINOR=$(shell grep ^VERSION_MINOR configure.in|cut -d= -f2)
1914 VER_PATCH=$(shell grep ^VERSION_PATCH configure.in|cut -d= -f2|cut -dr -f1)
2015 VER=$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)
16
2117 ifeq (..,$(VER))
2218 $(error configure.in not found or version cannot be guessed)
2319 else
2420 $(info Guessed geos version is $(VER))
2521 endif
2622
27 CFLAGS = -Wall -g
2823 CXX = g++ -fpermissive
2924
30 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
31 CFLAGS += -O0
32 else
33 CFLAGS += -O2
34 endif
35 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
36 INSTALL_PROGRAM += -s
37 endif
3825 # catch both armel and armhf
3926 ifneq (,$(findstring arm-linux-gnueabi,$(DEB_HOST_GNU_TYPE)))
4027 CONFFLAGS += --disable-inline
4128 endif
4229
4330 debian/control:
44 @sed -e 's/@VERSION@/$(VER)/' debian/control.in >$@
31 @sed -e 's/@VERSION@/$(VER)/' debian/control.in >$@
4532
46 config.status: debian/control configure
47 dh_testdir
48 # Add here commands to configure the package.
49 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
50 mv config.sub config.sub.bak
51 cp -f /usr/share/misc/config.sub config.sub
52 endif
53 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
54 mv config.guess config.guess.bak
55 cp -f /usr/share/misc/config.guess config.guess
56 endif
57 CXX="$(CXX)" CFLAGS="$(CFLAGS)" ./configure \
58 --host=$(DEB_HOST_GNU_TYPE) \
59 --build=$(DEB_BUILD_GNU_TYPE) \
60 --enable-ruby \
61 --prefix=/usr \
62 --mandir=\$${prefix}/share/man \
63 --infodir=\$${prefix}/share/info $(CONFFLAGS)
33 %:
34 dh $@ --with autoreconf
35
36 override_dh_clean:
37 dh_clean
38
39 rm -f debian/libgeos-$(VER).install debian/libgeos-$(VER).dirs debian/libgeos++-dev.install
40
41 override_dh_auto_configure: debian/control
42 dh_auto_configure -- \
43 --host=$(DEB_HOST_GNU_TYPE) \
44 --build=$(DEB_BUILD_GNU_TYPE) \
45 --enable-ruby \
46 --mandir=\$${prefix}/share/man \
47 --infodir=\$${prefix}/share/info \
48 $(CONFFLAGS) \
49 CXX="$(CXX)" \
50 $(shell dpkg-buildflags --export=configure)
51
6452 cp debian/libgeos-c++.install debian/libgeos-$(VER).install
6553 cp debian/libgeos-c++.dirs debian/libgeos-$(VER).dirs
6654
67 #Architecture
68 build: build-arch build-indep
55 override_dh_auto_build-arch:
56 dh_auto_build --arch
6957
70 build-arch: build-arch-stamp
71 build-arch-stamp: config.status
72 # Add here commands to compile the arch part of the package.
73 CXX="$(CXX)" CFLAGS="$(CFLAGS)" $(MAKE)
74 touch $@
58 override_dh_auto_build-indep:
59 $(MAKE) -C doc doxygen-html
7560
76 build-indep: build-indep-stamp
77 build-indep-stamp: config.status
78 # Add here commands to compile the indep part of the package.
79 $(MAKE) -C doc doxygen-html
80 touch $@
61 override_dh_install-arch:
62 # add C++ headers to C++ dev package install file
63 cp debian/libgeos++-dev.install.in debian/libgeos++-dev.install
64 find debian/tmp/usr/include/geos -name "*.h" -a ! -name "export.h" | sed -e 's/^debian\/tmp\///' >>debian/libgeos++-dev.install
8165
82 clean:
83 dh_testdir
84 dh_testroot
85 [ ! -f Makefile ] || $(MAKE) distclean
86 [ -f config.sub.bak ] && mv config.sub.bak config.sub || true
87 [ -f config.guess.bak ] && mv config.guess.bak config.guess || true
88 dh_clean
89 rm -f debian/libgeos-$(VER).install debian/libgeos-$(VER).dirs debian/libgeos++-dev.install
66 dh_install --same-arch
9067
91 install: install-indep install-arch
92 install-indep:
93 dh_testdir
94 dh_testroot
95 dh_prep -i
96 dh_installdirs -i
68 # remove the library from the -dev package
69 rm -f $(CURDIR)/debian/libgeos-dev/usr/lib/libgeos-*.so
70
71 override_dh_install-indep:
9772 dh_install -i
98 # debian/libgeos-doc
73
9974 # Install doxygen html files
10075 install -m 644 doc/doxygen_docs/html/* debian/libgeos-doc/usr/share/doc/libgeos-doc/html
76
10177 # Install example program source
10278 install -m 644 doc/example.cpp debian/libgeos-doc/usr/share/doc/libgeos-doc/examples
10379 install -m 644 debian/Makefile.example debian/libgeos-doc/usr/share/doc/libgeos-doc/examples/Makefile
10480
105 install-arch:
106 dh_testdir
107 dh_testroot
108 dh_prep -s
109 dh_installdirs -s
110 # Add here commands to install the arch part of the package into
111 # debian/tmp.
112 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
113
114 # add C++ headers to C++ dev package install file
115 cp debian/libgeos++-dev.install.in debian/libgeos++-dev.install
116 find debian/tmp/usr/include/geos -name "*.h" -a ! -name "export.h" | sed -e 's/^debian\/tmp\///' >>debian/libgeos++-dev.install
117
118 dh_install -s --sourcedir=debian/tmp
81 override_dh_installman:
11982 dh_installman -plibgeos-dev debian/geos-config.1
120 # remove the library from the -dev package
121 rm -f $(CURDIR)/debian/libgeos-dev/usr/lib/libgeos-*.so
12283
123 # Must not depend on anything. This is to be called by
124 # binary-arch/binary-indep
125 # in another 'make' thread.
126 binary-common:
127 dh_testdir
128 dh_testroot
129 dh_installchangelogs
130 dh_installdocs
131 dh_installexamples
132 dh_installman
133 dh_link
84 override_dh_strip:
13485 dh_strip --dbg-package=libgeos-dbg
135 dh_compress
136 dh_fixperms
86
87 override_dh_makeshlibs:
13788 dh_makeshlibs -V
138 dh_installdeb
139 dh_shlibdeps
89
90 override_dh_gencontrol:
14091 for i in $$(grep ^Package: debian/control|cut -d' ' -f2); do \
141 echo "geos:Version=$(VER)" >> $$i.substvars; \
92 echo "geos:Version=$(VER)" >> $$i.substvars; \
14293 done
94
14395 dh_gencontrol
144 dh_md5sums
145 dh_builddeb
14696
147 # Build architecture independant packages using the common target.
148 binary-indep: build-indep install-indep
149 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
150
151 # Build architecture dependant packages using the common target.
152 binary-arch: build-arch install-arch
153 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
154
155 binary: binary-indep binary-arch
156 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch debian/control