added first shot on debian package
[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 
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         cp LICENSE debian/copyright
82         dh_installdocs -A README
83         dh_installchangelogs 
84         dh_installexamples
85         mv debian/tmp/usr/share/doc/metaproxy debian/tmp/usr/share/doc/metaproxy-doc
86         dh_install 
87 #       dh_installmenu
88 #       dh_installdebconf       
89 #       dh_installlogrotate
90 #       dh_installemacsen
91 #       dh_installpam
92 #       dh_installmime
93 #       dh_installinit
94 #       dh_installcron
95 #       dh_installinfo
96         dh_installman
97         dh_link
98         dh_strip
99         dh_compress
100         dh_fixperms
101 #       dh_perl
102 #       dh_python
103 #       dh_makeshlibs -V 'libmetaproxy3 (>= 3.0.17)'
104         dh_installdeb
105 #       dh_shlibdeps  -l debian/libmetaproxy3/usr/lib
106         dh_gencontrol
107         dh_md5sums
108         dh_builddeb
109
110 binary: binary-indep binary-arch
111 .PHONY: build clean binary-indep binary-arch binary install