Blob


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 #
10 # Uncomment this to turn on verbose mode.
11 #export DH_VERBOSE=1
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)
18 CFLAGS = -Wall -g
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
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
36 build: build-stamp
38 build-stamp: config.status
39 dh_testdir
41 # Add here commands to compile the package.
42 $(MAKE)
44 touch build-stamp
46 clean:
47 dh_testdir
48 dh_testroot
49 rm -f build-stamp
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
61 install: build
62 dh_testdir
63 dh_testroot
64 dh_clean -k
65 dh_installdirs
67 # Add here commands to install the package into debian/ngircd.
68 $(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd
71 # Build architecture-independent files here.
72 binary-indep: build install
73 # We have nothing to do by default.
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
91 binary: binary-indep binary-arch
92 .PHONY: build clean binary-indep binary-arch binary install
94 # -eof-