Debian init script.
[metaproxy-moved-to-github.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
5
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
8
9 # Force compat level four
10 export DH_COMPAT=4
11
12 # These are used for cross-compiling and for saving the configure script
13 # from having to guess our platform (since we know it already)
14 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
15 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16
17
18 CFLAGS = -Wall -g
19
20 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
21         CFLAGS += -O0
22 else
23         CFLAGS += -O2
24 endif
25 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
26         INSTALL_PROGRAM += -s
27 endif
28
29
30 config.status: configure
31         dh_testdir
32         # Add here commands to configure the package.
33         CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --with-yazpp=/usr/bin
34
35 #--infodir=\$${prefix}/share/info --enable-shared --enable-static --with-xslt
36
37
38 build: build-stamp
39 build-stamp:  config.status
40         dh_testdir
41
42         # Add here commands to compile the package.
43         $(MAKE)
44
45         touch build-stamp
46
47 clean:
48         dh_testdir
49         dh_testroot
50         rm -f build-stamp 
51
52         # Add here commands to clean up after the build process.
53         -$(MAKE) distclean
54 #ifneq "$(wildcard /usr/share/misc/config.sub)" ""
55 #               -cp -f /usr/share/misc/config.sub config.sub
56 #endif  
57 #ifneq "$(wildcard /usr/share/misc/config.guess)" ""
58 #       -cp -f /usr/share/misc/config.guess config.guess
59 #endif
60
61         dh_clean 
62
63 install: build
64         dh_testdir
65         dh_testroot
66         dh_clean -k 
67         dh_installdirs
68
69         # Add here commands to install the package into debian/tmp
70         $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
71
72
73 # Build architecture-independent files here.
74 binary-indep: build install
75 # We have nothing to do by default.
76
77 # Build architecture-dependent files here.
78 binary-arch: build install
79         dh_testdir
80         dh_testroot
81         dh_installdocs -A README
82         dh_installchangelogs 
83         dh_installexamples
84         mv debian/tmp/usr/share/doc/metaproxy debian/tmp/usr/share/doc/metaproxy-doc
85         mkdir -p debian/tmp/etc/metaproxy
86         cp debian/tmp/usr/share/metaproxy/etc/config1.xml debian/tmp/etc/metaproxy/metaproxy.xml
87         dh_install 
88 #       dh_installmenu
89 #       dh_installdebconf       
90         dh_installlogrotate
91 #       dh_installemacsen
92 #       dh_installpam
93 #       dh_installmime
94         dh_installinit
95 #       dh_installcron
96 #       dh_installinfo
97         dh_installman
98         dh_link
99         dh_strip
100         dh_compress
101         dh_fixperms
102 #       dh_perl
103 #       dh_python
104         dh_makeshlibs -V 'libmetaproxy (>= 1.0.13)'
105         dh_installdeb
106         dh_shlibdeps  -l debian/libmetaproxy/usr/lib
107         dh_gencontrol
108         dh_md5sums
109         dh_builddeb
110
111 binary: binary-indep binary-arch
112 .PHONY: build clean binary-indep binary-arch binary install