]> arthur.barton.de Git - ngircd-alex.git/blob - contrib/Debian/rules
Debian package: Enable the [SSL] section
[ngircd-alex.git] / contrib / Debian / rules
1 #!/usr/bin/make -f
2
3 # See FEATURE AREAS in dpkg-buildflags(1).
4 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
5
6 %:
7         dh $@
8
9 # Disable dh_autoreconf since we are using de-ANSI-fication which was removed
10 # from automake a while ago. See <https://github.com/ngircd/ngircd/issues/261>.
11 override_dh_autoreconf:
12
13 override_dh_auto_configure:
14         dh_auto_configure -- \
15             --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
16             --prefix=/usr \
17             --mandir=\$${prefix}/share/man \
18             --sysconfdir=/etc/ngircd \
19             --with-iconv \
20             --with-ident \
21             --with-openssl \
22             --with-pam \
23             --with-syslog \
24             --with-zlib
25
26 execute_before_dh_auto_install:
27         ln -fs $(CURDIR)/contrib/ngircd.service $(CURDIR)/debian/ngircd.service
28
29 execute_after_dh_auto_install:
30 #       Generate the default ngircd.conf:
31         install -o root -g irc -m 0640 -D /dev/null \
32          $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf
33         sed \
34          -e "s|;ServerUID = 65534|ServerUID = irc|g" \
35          -e "s|;ServerGID = 65534|ServerGID = irc|g" \
36          -e "s|;PidFile = /var/run/ngircd/ngircd.pid|PidFile = /run/ircd/ngircd.pid|g" \
37          -e "s|;PAM = yes|PAM = no|g" \
38          -e "s|;\[SSL\]|[SSL]|g" \
39          -e "s|;CAFile = /etc/ssl/CA/cacert.pem|CAFile = /etc/ssl/certs/ca-certificates.crt|g" \
40          $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/sample-ngircd.conf \
41          >>$(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf
42
43 #       Create drop-in configuration directory:
44         install -o root -g irc -m 0750 -d \
45          $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf.d
46
47 #       Install an empty MOTD file.
48         install -o root -g irc -m 0640 -D /dev/null \
49          $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.motd
50
51 #       Install the logcheck(8) configuration.
52         install -o root -g root -m 0644 -D \
53          $(CURDIR)/contrib/ngircd.logcheck \
54          $(CURDIR)/debian/ngircd/etc/logcheck/ignore.d.paranoid/ngircd
55
56 #       Make lintian happy :-)
57         rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING
58         mv $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/ChangeLog \
59             $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/changelog
60
61 override_dh_fixperms:
62 #       Preserve the permissions of files installed in /etc/ngircd!
63         dh_fixperms -X/etc/ngircd
64
65 override_dh_compress:
66 #       The Commands.txt file is read by the daemon, don't compress it!
67         dh_compress -XCommands.txt