Blob


1 #!/usr/bin/make -f
2 #
3 # ngIRCd -- The Next Generation IRC Daemon
4 # Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 # Please read the file COPYING, README and AUTHORS for more information.
11 #
12 # debian/rules for ngIRCd
13 #
14 # $Id: rules,v 1.2 2003/11/29 20:29:09 alex Exp $
15 #
16 # Based on the sample debian/rules that uses debhelper,
17 # GNU copyright 1997 to 1999 by Joey Hess.
18 #
20 # Uncomment this to turn on verbose mode.
21 #export DH_VERBOSE=1
23 # These are used for cross-compiling and for saving the configure script
24 # from having to guess our platform (since we know it already)
25 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
26 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
28 CFLAGS = -Wall -g
30 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
31 CFLAGS += -O0
32 else
33 CFLAGS += -O2
34 endif
35 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
36 INSTALL_PROGRAM += -s
37 endif
39 config.status: configure
40 dh_testdir
42 # Add here commands to configure the package.
43 ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
44 --prefix=/usr \
45 --sysconfdir=/etc/ngircd \
46 --mandir=\$${prefix}/share/man \
47 --with-syslog --with-zlib
49 build: build-stamp
51 build-stamp: config.status
52 dh_testdir
54 # Add here commands to compile the package.
55 $(MAKE)
57 touch build-stamp
59 clean:
60 dh_testdir
61 dh_testroot
62 rm -f build-stamp
64 # Add here commands to clean up after the build process.
65 -$(MAKE) distclean
67 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
68 cp -f /usr/share/misc/config.sub config.sub
69 endif
70 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
71 cp -f /usr/share/misc/config.guess config.guess
72 endif
73 dh_clean
75 install: build
76 dh_testdir
77 dh_testroot
78 dh_clean -k
79 dh_installdirs
81 # Add here commands to install the package into debian/ngircd.
82 $(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd
83 rm -f $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/INSTALL*
84 rm -f $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING*
86 # Build architecture-independent files here.
87 binary-indep: build install
88 # We have nothing to do by default.
90 # Build architecture-dependent files here.
91 binary-arch: build install
92 dh_testdir
93 dh_testroot
94 dh_installchangelogs ChangeLog
95 dh_installdocs
96 dh_installinit
97 dh_strip
98 dh_compress
99 dh_fixperms
100 dh_installdeb
101 dh_shlibdeps
102 dh_gencontrol
103 dh_md5sums
104 dh_builddeb
106 binary: binary-indep binary-arch
108 .PHONY: build clean binary-indep binary-arch binary install
110 # -eof-