Blame


1 ed94d5d5 2003-12-31 alex #!/usr/bin/make -f
2 ed94d5d5 2003-12-31 alex #
3 ed94d5d5 2003-12-31 alex # ngIRCd -- The Next Generation IRC Daemon
4 ed94d5d5 2003-12-31 alex # Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
5 ed94d5d5 2003-12-31 alex #
6 ed94d5d5 2003-12-31 alex # This program is free software; you can redistribute it and/or modify
7 ed94d5d5 2003-12-31 alex # it under the terms of the GNU General Public License as published by
8 ed94d5d5 2003-12-31 alex # the Free Software Foundation; either version 2 of the License, or
9 ed94d5d5 2003-12-31 alex # (at your option) any later version.
10 ed94d5d5 2003-12-31 alex # Please read the file COPYING, README and AUTHORS for more information.
11 ed94d5d5 2003-12-31 alex #
12 ed94d5d5 2003-12-31 alex # debian/rules for ngIRCd
13 ed94d5d5 2003-12-31 alex #
14 ad07c94c 2004-01-01 alex # $Id: rules,v 1.2 2004/01/01 22:24:48 alex Exp $
15 ed94d5d5 2003-12-31 alex #
16 ed94d5d5 2003-12-31 alex # Based on the sample debian/rules that uses debhelper,
17 ed94d5d5 2003-12-31 alex # GNU copyright 1997 to 1999 by Joey Hess.
18 ed94d5d5 2003-12-31 alex #
19 ed94d5d5 2003-12-31 alex
20 ed94d5d5 2003-12-31 alex # Uncomment this to turn on verbose mode.
21 ed94d5d5 2003-12-31 alex #export DH_VERBOSE=1
22 ed94d5d5 2003-12-31 alex
23 ed94d5d5 2003-12-31 alex # These are used for cross-compiling and for saving the configure script
24 ed94d5d5 2003-12-31 alex # from having to guess our platform (since we know it already)
25 ed94d5d5 2003-12-31 alex DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
26 ed94d5d5 2003-12-31 alex DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
27 ed94d5d5 2003-12-31 alex
28 ed94d5d5 2003-12-31 alex CFLAGS = -Wall -g
29 ed94d5d5 2003-12-31 alex
30 ed94d5d5 2003-12-31 alex ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
31 ed94d5d5 2003-12-31 alex CFLAGS += -O0
32 ed94d5d5 2003-12-31 alex else
33 ed94d5d5 2003-12-31 alex CFLAGS += -O2
34 ed94d5d5 2003-12-31 alex endif
35 ed94d5d5 2003-12-31 alex ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
36 ed94d5d5 2003-12-31 alex INSTALL_PROGRAM += -s
37 ed94d5d5 2003-12-31 alex endif
38 ed94d5d5 2003-12-31 alex
39 ad07c94c 2004-01-01 alex configure-ngircd: configure
40 ed94d5d5 2003-12-31 alex dh_testdir
41 ed94d5d5 2003-12-31 alex
42 ad07c94c 2004-01-01 alex # configure "standard" variant:
43 ed94d5d5 2003-12-31 alex ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
44 ed94d5d5 2003-12-31 alex --prefix=/usr \
45 ed94d5d5 2003-12-31 alex --sysconfdir=/etc/ngircd \
46 ed94d5d5 2003-12-31 alex --mandir=\$${prefix}/share/man \
47 ed94d5d5 2003-12-31 alex --with-syslog --with-zlib
48 ed94d5d5 2003-12-31 alex
49 ad07c94c 2004-01-01 alex configure-ngircd-full: configure
50 ad07c94c 2004-01-01 alex dh_testdir
51 ed94d5d5 2003-12-31 alex
52 ad07c94c 2004-01-01 alex # configure "full" variant:
53 ad07c94c 2004-01-01 alex ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
54 ad07c94c 2004-01-01 alex --prefix=/usr \
55 ad07c94c 2004-01-01 alex --sysconfdir=/etc/ngircd \
56 ad07c94c 2004-01-01 alex --mandir=\$${prefix}/share/man \
57 ad07c94c 2004-01-01 alex --with-syslog --with-zlib --with-tcp-wrappers --with-ident
58 ad07c94c 2004-01-01 alex
59 ad07c94c 2004-01-01 alex build:
60 ad07c94c 2004-01-01 alex dh_clean -k
61 ad07c94c 2004-01-01 alex
62 ad07c94c 2004-01-01 alex build-ngircd: build-stamp-ngircd
63 ad07c94c 2004-01-01 alex build-stamp-ngircd: configure-ngircd
64 ed94d5d5 2003-12-31 alex dh_testdir
65 ad07c94c 2004-01-01 alex rm -f build-stamp-*
66 ed94d5d5 2003-12-31 alex
67 ad07c94c 2004-01-01 alex # Add here commands to compile the "standard" package:
68 ed94d5d5 2003-12-31 alex $(MAKE)
69 ed94d5d5 2003-12-31 alex
70 ad07c94c 2004-01-01 alex touch build-stamp-ngircd
71 ed94d5d5 2003-12-31 alex
72 ad07c94c 2004-01-01 alex build-ngircd-full: build-stamp-ngircd-full
73 ad07c94c 2004-01-01 alex build-stamp-ngircd-full: configure-ngircd-full
74 ad07c94c 2004-01-01 alex dh_testdir
75 ad07c94c 2004-01-01 alex rm -f build-stamp-*
76 ad07c94c 2004-01-01 alex
77 ad07c94c 2004-01-01 alex # Add here commands to compile the "full" package:
78 ad07c94c 2004-01-01 alex $(MAKE)
79 ad07c94c 2004-01-01 alex
80 ad07c94c 2004-01-01 alex touch build-stamp-ngircd-full
81 ad07c94c 2004-01-01 alex
82 ed94d5d5 2003-12-31 alex clean:
83 ed94d5d5 2003-12-31 alex dh_testdir
84 ed94d5d5 2003-12-31 alex dh_testroot
85 ad07c94c 2004-01-01 alex rm -f build-stamp*
86 ad07c94c 2004-01-01 alex rm -f $(CURDIR)/debian/ngircd-full.default
87 ad07c94c 2004-01-01 alex rm -f $(CURDIR)/debian/ngircd-full.init
88 ad07c94c 2004-01-01 alex rm -f $(CURDIR)/debian/ngircd-full.postinst
89 ed94d5d5 2003-12-31 alex
90 ad07c94c 2004-01-01 alex # Add here commands to clean up after the build process:
91 ad07c94c 2004-01-01 alex -$(MAKE) clean
92 ed94d5d5 2003-12-31 alex
93 ed94d5d5 2003-12-31 alex ifneq "$(wildcard /usr/share/misc/config.sub)" ""
94 ed94d5d5 2003-12-31 alex cp -f /usr/share/misc/config.sub config.sub
95 ed94d5d5 2003-12-31 alex endif
96 ed94d5d5 2003-12-31 alex ifneq "$(wildcard /usr/share/misc/config.guess)" ""
97 ed94d5d5 2003-12-31 alex cp -f /usr/share/misc/config.guess config.guess
98 ed94d5d5 2003-12-31 alex endif
99 ed94d5d5 2003-12-31 alex dh_clean
100 ed94d5d5 2003-12-31 alex
101 ad07c94c 2004-01-01 alex install: install-ngircd install-ngircd-full
102 ad07c94c 2004-01-01 alex
103 ad07c94c 2004-01-01 alex install-ngircd: build-ngircd
104 ed94d5d5 2003-12-31 alex dh_testdir
105 ed94d5d5 2003-12-31 alex dh_testroot
106 ed94d5d5 2003-12-31 alex dh_installdirs
107 ed94d5d5 2003-12-31 alex
108 ad07c94c 2004-01-01 alex # Add here commands to install the "standard" package into debian/ngircd:
109 ed94d5d5 2003-12-31 alex $(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd
110 ad07c94c 2004-01-01 alex rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/INSTALL*
111 ad07c94c 2004-01-01 alex rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING*
112 ed94d5d5 2003-12-31 alex
113 ad07c94c 2004-01-01 alex install-ngircd-full: build-ngircd-full
114 ad07c94c 2004-01-01 alex dh_testdir
115 ad07c94c 2004-01-01 alex dh_testroot
116 ad07c94c 2004-01-01 alex dh_installdirs
117 ad07c94c 2004-01-01 alex
118 ad07c94c 2004-01-01 alex # Add here commands to install the "full" package into debian/ngircd-full:
119 ad07c94c 2004-01-01 alex $(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full
120 ad07c94c 2004-01-01 alex rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd/INSTALL*
121 ad07c94c 2004-01-01 alex rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd/COPYING*
122 ad07c94c 2004-01-01 alex mv $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd \
123 ad07c94c 2004-01-01 alex $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full
124 ad07c94c 2004-01-01 alex
125 ed94d5d5 2003-12-31 alex # Build architecture-independent files here.
126 ad07c94c 2004-01-01 alex binary-indep:
127 ed94d5d5 2003-12-31 alex # We have nothing to do by default.
128 ed94d5d5 2003-12-31 alex
129 ed94d5d5 2003-12-31 alex # Build architecture-dependent files here.
130 ed94d5d5 2003-12-31 alex binary-arch: build install
131 ad07c94c 2004-01-01 alex ln -s $(CURDIR)/debian/ngircd.default \
132 ad07c94c 2004-01-01 alex $(CURDIR)/debian/ngircd-full.default
133 ad07c94c 2004-01-01 alex ln -s $(CURDIR)/debian/ngircd.init \
134 ad07c94c 2004-01-01 alex $(CURDIR)/debian/ngircd-full.init
135 ad07c94c 2004-01-01 alex ln -s $(CURDIR)/debian/ngircd.postinst \
136 ad07c94c 2004-01-01 alex $(CURDIR)/debian/ngircd-full.postinst
137 ad07c94c 2004-01-01 alex
138 ed94d5d5 2003-12-31 alex dh_testdir
139 ed94d5d5 2003-12-31 alex dh_testroot
140 ad07c94c 2004-01-01 alex dh_installchangelogs -a -A ChangeLog
141 ad07c94c 2004-01-01 alex dh_installdocs -a
142 ad07c94c 2004-01-01 alex dh_installinit -a
143 ad07c94c 2004-01-01 alex dh_strip -a
144 ad07c94c 2004-01-01 alex dh_compress -a
145 ad07c94c 2004-01-01 alex dh_fixperms -a
146 ad07c94c 2004-01-01 alex dh_installdeb -a
147 ad07c94c 2004-01-01 alex dh_shlibdeps -a
148 ad07c94c 2004-01-01 alex dh_gencontrol -a
149 ad07c94c 2004-01-01 alex dh_md5sums -a
150 ad07c94c 2004-01-01 alex dh_builddeb -a
151 ed94d5d5 2003-12-31 alex
152 ed94d5d5 2003-12-31 alex binary: binary-indep binary-arch
153 ed94d5d5 2003-12-31 alex
154 ed94d5d5 2003-12-31 alex .PHONY: build clean binary-indep binary-arch binary install
155 ed94d5d5 2003-12-31 alex
156 ed94d5d5 2003-12-31 alex # -eof-