]> arthur.barton.de Git - ngircd-alex.git/blob - contrib/Debian/rules
Changes for new source code layout: contrib/Debian/.
[ngircd-alex.git] / contrib / Debian / rules
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.1 2003/12/31 17:20:11 alex Exp $
15 #
16 # Based on the sample debian/rules that uses debhelper,
17 # GNU copyright 1997 to 1999 by Joey Hess.
18 #
19
20 # Uncomment this to turn on verbose mode.
21 #export DH_VERBOSE=1
22
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)
27
28 CFLAGS = -Wall -g
29
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
38
39 config.status: configure
40         dh_testdir
41
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
48
49 build: build-stamp
50
51 build-stamp: config.status
52         dh_testdir
53
54         # Add here commands to compile the package.
55         $(MAKE)
56
57         touch build-stamp
58
59 clean:
60         dh_testdir
61         dh_testroot
62         rm -f build-stamp 
63
64         # Add here commands to clean up after the build process.
65         -$(MAKE) distclean
66
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
74
75 install: build
76         dh_testdir
77         dh_testroot
78         dh_clean -k
79         dh_installdirs
80
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*
85
86 # Build architecture-independent files here.
87 binary-indep: build install
88         # We have nothing to do by default.
89
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
105
106 binary: binary-indep binary-arch
107
108 .PHONY: build clean binary-indep binary-arch binary install 
109
110 # -eof-