1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
|
#!/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)
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
confflags += --build $(DEB_HOST_GNU_TYPE)
else
confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
export CFLAGS
tmp = $(CURDIR)/debian/tmp
dancer-ircd = $(CURDIR)/debian/dancer-ircd
dancer-ircd-doc = $(CURDIR)/debian/dancer-ircd-doc
config.status:
dh_testdir
./configure $(confflags) --with-config=debian --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-documentation
build: src/dancer-ircd
src/dancer-ircd: config.status
dh_testdir
$(MAKE)
clean:
dh_testdir
dh_testroot
[ ! -f Makefile ] || $(MAKE) distclean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install DESTDIR=$(tmp)
dh_install --sourcedir=$(CURDIR)/debian/tmp --list-missing
# Symlinks for documentation
# Need to run dh_compress first, so we get the right filenames in the symlinks
dh_compress -pdancer-ircd-doc
# This symlinks all the documentation from dancer-ircd into dancer-ircd-doc, so that it can be accessed via either path
cd $(dancer-ircd-doc)/usr/share/doc/dancer-ircd-doc && ln -s ../dancer-ircd/dancer-* .
# ln -sf $(patsubst $(dancer-ircd-doc)/usr/share/doc/%, ../%, $(wildcard $(dancer-ircd-doc)/usr/share/doc/dancer-ircd/dancer-*)) $(dancer-ircd-doc)/usr/share/doc/dancer-ircd-doc/
# Config stuff...
install -m 0640 debian/ircd.conf $(dancer-ircd)/etc/dancer-ircd/ircd.conf
install -m 0640 debian/olines $(dancer-ircd)/etc/dancer-ircd/olines
touch $(dancer-ircd)/etc/dancer-ircd/motd
touch $(dancer-ircd)/etc/dancer-ircd/omotd
touch $(dancer-ircd)/etc/dancer-ircd/ohelp
install -m 0644 debian/dancer-status.txt $(dancer-ircd)/usr/share/doc/dancer-ircd/dancer-status.txt
# Lintian overrides...
install -m 0644 debian/dancer-ircd.overrides \
$(dancer-ircd)/usr/share/lintian/overrides/dancer-ircd
# Build architecture-independent files here.
binary-indep: install
dh_testdir -i
dh_testroot -i
dh_installdocs -i AUTHORS
dh_installchangelogs ChangeLog -i
dh_compress -i -X.sgml -X.html
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: install
dh_testdir -a
dh_testroot -a
dh_installdocs -a AUTHORS
dh_installlogrotate -a
dh_installinit -a
dh_installman debian/dancer-ircd.8 -a
dh_installchangelogs ChangeLog -a
dh_strip -a
dh_compress -a
dh_fixperms -a
chmod 0640 $(dancer-ircd)/etc/dancer-ircd/ircd.conf
chmod 0640 $(dancer-ircd)/etc/dancer-ircd/olines
chmod 0750 $(dancer-ircd)/var/log/dancer-ircd
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
prebuild:
if [ -f development ]; then rm -f development; tla delete development; fi
./autogen.sh
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|