|
@@ -1,70 +1,27 @@
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
|
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|
|
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
|
|
-
|
|
|
-CFLAGS = -Wall -g
|
|
|
-
|
|
|
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
|
|
- CFLAGS += -O0
|
|
|
-else
|
|
|
- CFLAGS += -O2
|
|
|
-endif
|
|
|
-
|
|
|
-config.status: configure
|
|
|
- dh_testdir
|
|
|
- ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc/ngircd --without-epoll --with-gnutls --enable-ipv6
|
|
|
-
|
|
|
-
|
|
|
-build: build-stamp
|
|
|
-
|
|
|
-build-stamp: config.status
|
|
|
- dh_testdir
|
|
|
- $(MAKE)
|
|
|
- touch build-stamp
|
|
|
-
|
|
|
-clean:
|
|
|
- dh_testdir
|
|
|
- dh_testroot
|
|
|
- rm -f build-stamp
|
|
|
- [ ! -f Makefile ] || $(MAKE) distclean
|
|
|
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
|
|
|
- cp -f /usr/share/misc/config.sub config.sub
|
|
|
-endif
|
|
|
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
|
|
|
- cp -f /usr/share/misc/config.guess config.guess
|
|
|
-endif
|
|
|
- dh_clean
|
|
|
-
|
|
|
-install: build
|
|
|
- dh_testdir
|
|
|
- dh_testroot
|
|
|
- dh_clean -k
|
|
|
- dh_installdirs
|
|
|
- $(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd
|
|
|
- rm -rf $(CURDIR)/debian/ngircd/etc
|
|
|
- install -m 640 -D $(CURDIR)/debian/ngircd.conf $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf
|
|
|
- install -m 640 -D $(CURDIR)/debian/ngircd.motd $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.motd
|
|
|
- rm -rf $(CURDIR)/debian/ngircd/usr/share
|
|
|
-
|
|
|
-binary-indep: build install
|
|
|
-
|
|
|
-binary-arch: build install
|
|
|
- dh_testdir
|
|
|
- dh_testroot
|
|
|
- dh_installchangelogs ChangeLog
|
|
|
- dh_installexamples doc/sample-ngircd.conf
|
|
|
- dh_installdocs
|
|
|
- dh_installinit
|
|
|
- dh_installman man/ngircd.8 man/ngircd.conf.5
|
|
|
- dh_compress
|
|
|
- dh_strip
|
|
|
- dh_fixperms
|
|
|
- dh_installdeb
|
|
|
- dh_shlibdeps
|
|
|
- dh_gencontrol
|
|
|
- dh_md5sums
|
|
|
- dh_builddeb
|
|
|
-
|
|
|
-binary: binary-indep binary-arch
|
|
|
-.PHONY: build clean binary-indep binary-arch binary install
|
|
|
+override_dh_auto_configure:
|
|
|
+ dh_auto_configure -- \
|
|
|
+ --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
|
|
|
+ --prefix=/usr \
|
|
|
+ --mandir=\$${prefix}/share/man \
|
|
|
+ --infodir=\$${prefix}/share/info \
|
|
|
+ --sysconfdir=/etc/ngircd \
|
|
|
+ --with-gnutls \
|
|
|
+ --enable-ipv6
|
|
|
+
|
|
|
+override_dh_auto_install:
|
|
|
+ dh_auto_install
|
|
|
+ # install config and sample motd file
|
|
|
+ install -m 640 -D debian/ngircd.conf \
|
|
|
+ debian/ngircd/etc/ngircd/ngircd.conf
|
|
|
+ install -m 640 -D debian/ngircd.motd \
|
|
|
+ debian/ngircd/etc/ngircd/ngircd.motd
|
|
|
+ # make lintian happy
|
|
|
+ rm debian/ngircd/usr/share/doc/ngircd/INSTALL
|
|
|
+ rm debian/ngircd/usr/share/doc/ngircd/COPYING
|
|
|
+ mv debian/ngircd/usr/share/doc/ngircd/ChangeLog \
|
|
|
+ debian/ngircd/usr/share/doc/ngircd/changelog
|
|
|
+
|
|
|
+%:
|
|
|
+ dh $@
|