]> arthur.barton.de Git - ngircd-alex.git/blob - debian/rules
Included debian/-subdirectory with files required to build Debian packages.
[ngircd-alex.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for ngIRCd
3 #
4 # $Id: rules,v 1.1 2003/07/09 20:23:35 alex Exp $
5 #
6 # Based on the sample debian/rules that uses debhelper,
7 # GNU copyright 1997 to 1999 by Joey Hess.
8 #
9
10 # Uncomment this to turn on verbose mode.
11 #export DH_VERBOSE=1
12
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)
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 config.status: configure
30         dh_testdir
31         # Add here commands to configure the package.
32         ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
33           --prefix=/usr --sysconfdir=/etc/ngircd --mandir=\$${prefix}/share/man \
34           --with-syslog --with-zlib
35
36 build: build-stamp
37
38 build-stamp:  config.status
39         dh_testdir
40
41         # Add here commands to compile the package.
42         $(MAKE)
43
44         touch build-stamp
45
46 clean:
47         dh_testdir
48         dh_testroot
49         rm -f build-stamp 
50
51         # Add here commands to clean up after the build process.
52         -$(MAKE) distclean
53 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
54         cp -f /usr/share/misc/config.sub config.sub
55 endif
56 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
57         cp -f /usr/share/misc/config.guess config.guess
58 endif
59         dh_clean
60
61 install: build
62         dh_testdir
63         dh_testroot
64         dh_clean -k
65         dh_installdirs
66
67         # Add here commands to install the package into debian/ngircd.
68         $(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd
69
70
71 # Build architecture-independent files here.
72 binary-indep: build install
73 # We have nothing to do by default.
74
75 # Build architecture-dependent files here.
76 binary-arch: build install
77         dh_testdir
78         dh_testroot
79         dh_installchangelogs ChangeLog
80         dh_installdocs
81         dh_installinit
82         dh_strip
83         dh_compress
84         dh_fixperms -Xetc/ngircd.conf
85         dh_installdeb
86         dh_shlibdeps
87         dh_gencontrol
88         dh_md5sums
89         dh_builddeb
90
91 binary: binary-indep binary-arch
92 .PHONY: build clean binary-indep binary-arch binary install 
93
94 # -eof-