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 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_COMPAT=3
export CFLAGS= -O2 -Wall -Wno-unused
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
dancer-ircd = $(CURDIR)/debian/dancer-ircd
dancer-ircd-doc = $(CURDIR)/debian/dancer-ircd-doc
dancer-oper-source = $(CURDIR)/doc/sgml/dancer-oper-guide
dancer-user-source = $(CURDIR)/doc/sgml/dancer-user-guide
configure: Makefile
Makefile:
dh_testdir
./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
build-indep: doc/sgml/Makefile doc/sgml/dancer-oper-guide.ps
doc/sgml/dancer-oper-guide.ps:
dh_testdir
(cd doc/sgml && $(MAKE))
build: Makefile src/dancer-ircd
src/dancer-ircd:
dh_testdir
$(MAKE)
clean:
dh_testdir
dh_testroot
-$(MAKE) distclean
-(cd doc/sgml && $(MAKE) clean)
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k -a
dh_installdirs
$(MAKE) install prefix=$(dancer-ircd)/usr
# Replace this with the debian version
rm $(dancer-ircd)/usr/bin/mkpasswd
install -m 0755 debian/mkpasswd.dancer $(dancer-ircd)/usr/bin/mkpasswd.dancer
# Put these where they belong
mv $(dancer-ircd)/usr/bin/dancer-ircd $(dancer-ircd)/usr/bin/viconf \
$(dancer-ircd)/usr/sbin
# Config stuff...
install -m 0640 doc/example.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
touch $(dancer-ircd)/var/lib/dancer-ircd/dline.conf
touch $(dancer-ircd)/var/lib/dancer-ircd/kline.conf
# Logs and pidfiles...
# This goes with the copyright, so it's going into the main package
install AUTHORS $(dancer-ircd)/usr/share/doc/dancer-ircd/
# Lintian overrides...
install -m 0644 debian/dancer-ircd.overrides \
$(dancer-ircd)/usr/share/lintian/overrides/dancer-ircd
install-indep:
dh_testdir
dh_testroot
dh_clean -k -i
dh_installdirs
# And the documentation...
install -d $(dancer-ircd-doc)/usr/share/doc/dancer-ircd/dancer-oper-guide
install -d $(dancer-ircd-doc)/usr/share/doc/dancer-ircd/dancer-user-guide
install -m 0644 \
doc/sgml/fdl.sgml $(dancer-ircd-doc)/usr/share/doc/dancer-ircd
install -m 0644 \
$(dancer-oper-source)/*.{sgml,ps,txt} \
$(dancer-ircd-doc)/usr/share/doc/dancer-ircd/dancer-oper-guide
install -m 0644 \
$(dancer-user-source)/*.{sgml,ps,txt} \
$(dancer-ircd-doc)/usr/share/doc/dancer-ircd/dancer-user-guide
cp -a $(dancer-oper-source)/dancer-oper-guide \
$(dancer-ircd-doc)/usr/share/doc/dancer-ircd/dancer-oper-guide/html
cp -a $(dancer-user-source)/dancer-user-guide \
$(dancer-ircd-doc)/usr/share/doc/dancer-ircd/dancer-user-guide/html
# Build architecture-independent files here.
binary-indep: build-indep install-indep
dh_testdir -i
dh_testroot -i
dh_installdocs -i
dh_installchangelogs Changelog -i
dh_compress -i -X.sgml
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installdocs -a
dh_installlogrotate -a
dh_installinit -a
dh_installman debian/dancer-ircd.8 debian/mkpasswd.dancer.8 debian/viconf.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
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
|