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