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.3 2005/02/07 23:09:31 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*
112 mkdir -p $(CURDIR)/debian/ngircd/var/run/ircd
113 cat $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/sample-ngircd.conf | \
114 sed -e "s/;ServerUID = 65534/ServerUID = irc/g" | \
115 sed -e "s/;ServerGID = 65534/ServerGID = irc/g" | \
116 sed -e "s/;MotdFile = \/usr\/local\/etc\/ngircd.motd/MotdFile = \/etc\/ngircd\/ngircd.motd/g" | \
117 sed -e "s/;PidFile = \/var\/run\/ngircd\/ngircd.pid/PidFile = \/var\/run\/ircd\/ngircd.pid/g" \
118 >$(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf
119 touch $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.motd
121 install-ngircd-full: build-ngircd-full
126 # Add here commands to install the "full" package into debian/ngircd-full:
127 $(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full
128 rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd/INSTALL*
129 rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd/COPYING*
130 mv $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd \
131 $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full
132 mkdir -p $(CURDIR)/debian/ngircd-full/var/run/ircd
133 cat $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/sample-ngircd.conf | \
134 sed -e "s/;ServerUID = 65534/ServerUID = irc/g" | \
135 sed -e "s/;ServerGID = 65534/ServerGID = irc/g" | \
136 sed -e "s/;MotdFile = \/usr\/local\/etc\/ngircd.motd/MotdFile = \/etc\/ngircd\/ngircd.motd/g" | \
137 sed -e "s/;PidFile = \/var\/run\/ngircd\/ngircd.pid/PidFile = \/var\/run\/ircd\/ngircd.pid/g" \
138 >$(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.conf
139 touch $(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.motd
141 # Build architecture-independent files here.
143 # We have nothing to do by default.
145 # Build architecture-dependent files here.
146 binary-arch: build install
147 ln -s $(CURDIR)/debian/ngircd.default \
148 $(CURDIR)/debian/ngircd-full.default
149 ln -s $(CURDIR)/debian/ngircd.init \
150 $(CURDIR)/debian/ngircd-full.init
151 ln -s $(CURDIR)/debian/ngircd.postinst \
152 $(CURDIR)/debian/ngircd-full.postinst
156 dh_installchangelogs -a -A ChangeLog
168 binary: binary-indep binary-arch
170 .PHONY: build clean binary-indep binary-arch binary install