Code

Bump version to 1.10.0; Update ChangeLog.
[liboping.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 #
5 # This file was originally written by Joey Hess and Craig Small.
6 # As a special exception, when this file is copied by dh-make into a
7 # dh-make output file, you may use that output file without restriction.
8 # This special exception was added by Craig Small in version 0.37 of dh-make.
9 #
10 # Modified to make a template file for a multi-binary package with separated
11 # build-arch and build-indep targets  by Bill Allombert 2001
13 # Uncomment this to turn on verbose mode.
14 #export DH_VERBOSE=1
16 # This has to be exported to make some magic below work.
17 export DH_OPTIONS
19 # These are used for cross-compiling and for saving the configure script
20 # from having to guess our platform (since we know it already)
21 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
22 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
25 CFLAGS = -Wall -g
27 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
28         CFLAGS += -O0
29 else
30         CFLAGS += -O2
31 endif
33 version=0.1.0
34 major=0
36 config.status: configure
37         dh_testdir
38         CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
41 #Architecture 
42 build: build-arch
44 build-arch: build-arch-stamp
46 build-arch-stamp:  config.status
47         $(MAKE) 
48         touch build-arch-stamp
50 clean:
51         dh_testdir
52         dh_testroot
53         rm -f build-arch-stamp
55         # Add here commands to clean up after the build process.
56         -$(MAKE) distclean
57 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
58         cp -f /usr/share/misc/config.sub config.sub
59 endif
60 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
61         cp -f /usr/share/misc/config.guess config.guess
62 endif
63         rm -rf $(CURDIR)/debian/tmp || true
65         dh_clean 
67 install: install-arch
69 install-arch:
70         dh_testdir
71         dh_testroot
72         dh_clean -k -s 
73         dh_installdirs --all
75         $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
76         mv -v $(CURDIR)/debian/tmp/usr/lib/*.so $(CURDIR)/debian/liboping/usr/lib/
77         mv -v $(CURDIR)/debian/tmp/usr/lib/*.{a,la} $(CURDIR)/debian/liboping-dev/usr/lib/
78         mv -v $(CURDIR)/debian/tmp/usr/include/*.h $(CURDIR)/debian/liboping-dev/usr/include/
79         mv -v $(CURDIR)/debian/tmp/usr/bin/* $(CURDIR)/debian/oping/usr/bin/
81         dh_install -s
83 # Must not depend on anything. This is to be called by
84 # binary-arch/binary-indep
85 # in another 'make' thread.
86 binary-common:
87         dh_testdir
88         dh_testroot
89         dh_installchangelogs ChangeLog
90         dh_installdocs
91         dh_installexamples
92 #       dh_installmenu
93 #       dh_installdebconf       
94 #       dh_installlogrotate     
95 #       dh_installemacsen
96 #       dh_installpam
97 #       dh_installmime
98 #       dh_installinit
99 #       dh_installcron
100 #       dh_installinfo
101         dh_installman
102         dh_link
103         dh_strip
104         dh_compress 
105         dh_fixperms
106 #       dh_perl
107 #       dh_python
108         dh_makeshlibs
109         dh_installdeb
110         dh_shlibdeps
111         dh_gencontrol
112         dh_md5sums
113         dh_builddeb
115 # Build architecture dependant packages using the common target.
116 binary-arch: build-arch install-arch
117         $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
119 binary: binary-arch
120 .PHONY: build clean binary-arch binary install install-arch