Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # See debhelper(7) (uncomment to enable)
3 # output every command that modifies files on the build system.
4 #DH_VERBOSE = 1
5
6 # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
7 DPKG_EXPORT_BUILDFLAGS = 1
8 include /usr/share/dpkg/default.mk
9
10 # see FEATURE AREAS in dpkg-buildflags(1)
11 #export DEB_BUILD_MAINT_OPTIONS = hardening=+all
12
13 # see ENVIRONMENT in dpkg-buildflags(1)
14 # package maintainers to append CFLAGS
15 #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
16 # package maintainers to append LDFLAGS
17 #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
18
19 # Modules linked against OpenSSL which can't be distributed owing
20 # to licensing incompatibilities:
21 # - m_sasl_dh-blowfish.cpp
22 # - m_ssl_openssl.cpp
23 # - m_sasl_dh-aes.cpp
24 #
25 # Modules which are superfluous to requirements
26 # - m_regex_posix.cpp
27 # - m_regex_tre.cpp
28 EXTRA_MODULES = m_ldap_authentication.cpp m_ldap.cpp m_ldap_oper.cpp m_mysql.cpp m_regex_pcre2.cpp m_sql_authentication.cpp m_sqlite.cpp m_sql_log.cpp m_sql_oper.cpp m_ssl_gnutls.cpp stats
29
30 # main packaging script based on dh7 syntax
31 %:
32 dh $@
33
34 override_dh_auto_clean:
35 dh_auto_clean
36 for extra in $(EXTRA_MODULES); do \
37 rm -f modules/$$extra; \
38 done
39
40 override_dh_auto_configure:
41 for extra in $(EXTRA_MODULES); do \
42 ln -s extra/$$extra modules; \
43 done
44
45 dh_auto_configure -- \
46 -DINSTDIR=/usr \
47 -DBIN_DIR=sbin \
48 -DDB_DIR=share/anope/data \
49 -DCONF_DIR=share/doc/anope/examples \
50 -DLIB_DIR=lib/anope \
51 -DLOCALE_DIR=share/anope/locale \
52 -DLOGS_DIR=../var/log/anope \
53 -DPROGRAM_NAME=anope \
54 -DREPRODUCIBLE_BUILD=1 \
55 -DDISABLE_TOOLS=1
56
57 override_dh_auto_install:
58 dh_auto_install
59 chown irc:adm debian/anope/var/log/anope
60 chmod 0750 debian/anope/var/log/anope
61 install -d -m 0755 debian/anope/var/lib/anope
62 install -d -m 0700 -o irc -g irc debian/anope/var/lib/anope/db
63 install -d -m 0700 -o irc -g irc debian/anope/var/lib/anope/db/backups
64 install -d -m 0755 debian/anope/etc/anope
65 install -m 0640 -o root -g irc debian/conf/* debian/anope/etc/anope
66 # The external CDN references result in Lintian errors, and
67 # fixing this is non-trivial because it's an embedded web server.
68 # If you would like webcpanel to be enabled in Debian, please file
69 # a bug report.
70 rm -rf debian/anope/usr/lib/anope/modules/webcpanel.so debian/anope/usr/share/anope/data/modules/webcpanel
71 dh_apparmor --profile-name=usr.sbin.anope
72
73 override_dh_fixperms:
74 dh_fixperms -Xvar/log/anope -Xvar/lib/anope/db -Xetc/anope
75
76 override_dh_installinit:
77 dh_installinit --no-enable --no-start
78
79 override_dh_installsystemd:
80 dh_installsystemd --no-enable --no-start