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