Fix for #270, bad definition of isnan() in OS/X <cmath>. This needs to be tested...
[geos.git] / debian / rules
blob321ed5361def139e90ef086662ced69cf4cf6b6d
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
13 # These are used for cross-compiling and for saving the configure script
14 # from having to guess our platform (since we know it already)
15 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
16 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
19 CFLAGS = -Wall -g
21 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
22 CFLAGS += -O0
23 else
24 CFLAGS += -O2
25 endif
26 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
27 INSTALL_PROGRAM += -s
28 endif
30 # shared library versions
31 version=`ls source/geom/.libs/lib*.so.* | \
32 awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
33 major=`ls source/geom/.libs/lib*.so.* | \
34 awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
36 #ifeq "2" "$(major)"
37 # POSTGIS_CONFLICT='-u-DConflicts="libpostgis (<< 0.9.0)"'
38 # echo "ver 2"
39 #endif
41 config.status: configure
42 dh_testdir
43 # Add here commands to configure the package.
44 CFLAGS="$(CFLAGS)" \
45 ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
46 --prefix=/usr --mandir=\$${prefix}/share/man \
47 --infodir=\$${prefix}/share/info
50 build: build-stamp
51 build-stamp: config.status
52 dh_testdir
54 # Add here commands to compile the package.
55 $(MAKE)
56 $(MAKE) check
58 touch build-stamp
60 clean:
61 dh_testdir
62 dh_testroot
63 rm -f build-stamp
64 rm -f debian/shlibs.local
66 # Add here commands to clean up after the build process.
67 -$(MAKE) distclean
68 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
69 cp -f /usr/share/misc/config.sub config.sub
70 endif
71 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
72 cp -f /usr/share/misc/config.guess config.guess
73 endif
75 dh_clean
77 install: build
78 dh_testdir
79 dh_testroot
80 dh_clean -k
81 dh_installdirs
83 # Add here commands to install the package into debian/tmp
84 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
85 $(MAKE) installcheck DESTDIR=$(CURDIR)/debian/tmp
86 $(CURDIR)/debian/makedoc
89 # Build architecture-independent files here.
90 binary-indep: build install
91 # We have nothing to do by default.
93 # Build architecture-dependent files here.
94 binary-arch: build install
95 dh_testdir
96 dh_testroot
97 dh_installchangelogs ChangeLog
98 dh_installchangelogs debian/changelog
99 dh_installdocs
100 dh_installexamples doc/example.cpp
101 dh_movefiles --sourcedir=debian/tmp #woody uses wildcards in pkg.files
102 # dh_install --sourcedir=$(CURDIR)debian/tmp #woody doesn't use wildcards
103 # dh_installmenu
104 # dh_installdebconf
105 # dh_installlogrotate
106 # dh_installemacsen
107 # dh_installpam
108 # dh_installmime
109 # dh_installinit
110 # dh_installcron
111 # dh_installinfo
112 dh_installman
113 dh_link
114 dh_strip
115 dh_compress
116 dh_fixperms
117 # dh_perl
118 # dh_python
119 dh_makeshlibs
120 dh_installdeb
121 dh_shlibdeps
122 dh_gencontrol $(POSTGIS_CONFLICT)
123 dh_md5sums
124 dh_builddeb
126 binary: binary-indep binary-arch
127 .PHONY: build clean binary-indep binary-arch binary install