3 # ngIRCd -- The Next Generation IRC Daemon
4 # Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
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.
12 # debian/rules for ngIRCd
14 # $Id: rules,v 1.2 2004/01/01 22:24:48 alex Exp $
16 # Based on the sample debian/rules that uses debhelper,
17 # GNU copyright 1997 to 1999 by Joey Hess.
20 # Uncomment this to turn on verbose mode.
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)
30 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
35 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
39 configure-ngircd: configure
42 # configure "standard" variant:
43 ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
45 --sysconfdir=/etc/ngircd \
46 --mandir=\$${prefix}/share/man \
47 --with-syslog --with-zlib
49 configure-ngircd-full: configure
52 # configure "full" variant:
53 ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
55 --sysconfdir=/etc/ngircd \
56 --mandir=\$${prefix}/share/man \
57 --with-syslog --with-zlib --with-tcp-wrappers --with-ident
62 build-ngircd: build-stamp-ngircd
63 build-stamp-ngircd: configure-ngircd
67 # Add here commands to compile the "standard" package:
70 touch build-stamp-ngircd
72 build-ngircd-full: build-stamp-ngircd-full
73 build-stamp-ngircd-full: configure-ngircd-full
77 # Add here commands to compile the "full" package:
80 touch build-stamp-ngircd-full
86 rm -f $(CURDIR)/debian/ngircd-full.default
87 rm -f $(CURDIR)/debian/ngircd-full.init
88 rm -f $(CURDIR)/debian/ngircd-full.postinst
90 # Add here commands to clean up after the build process:
93 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
94 cp -f /usr/share/misc/config.sub config.sub
96 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
97 cp -f /usr/share/misc/config.guess config.guess
101 install: install-ngircd install-ngircd-full
103 install-ngircd: build-ngircd
108 # Add here commands to install the "standard" package into debian/ngircd:
109 $(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd
110 rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/INSTALL*
111 rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING*
113 install-ngircd-full: build-ngircd-full
118 # Add here commands to install the "full" package into debian/ngircd-full:
119 $(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full
120 rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd/INSTALL*
121 rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd/COPYING*
122 mv $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd \
123 $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full
125 # Build architecture-independent files here.
127 # We have nothing to do by default.
129 # Build architecture-dependent files here.
130 binary-arch: build install
131 ln -s $(CURDIR)/debian/ngircd.default \
132 $(CURDIR)/debian/ngircd-full.default
133 ln -s $(CURDIR)/debian/ngircd.init \
134 $(CURDIR)/debian/ngircd-full.init
135 ln -s $(CURDIR)/debian/ngircd.postinst \
136 $(CURDIR)/debian/ngircd-full.postinst
140 dh_installchangelogs -a -A ChangeLog
152 binary: binary-indep binary-arch
154 .PHONY: build clean binary-indep binary-arch binary install