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
|
export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-pie
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
CXX ?= g++
LDAP_MODULES = m_ldapauth.cpp,m_ldapoper.cpp
DATABASES_MODULES = $(LDAP_MODULES),m_mysql.cpp,m_pgsql.cpp,m_sqlite3.cpp
REGEX_MODULES = m_regex_pcre.cpp,m_regex_posix.cpp,m_regex_tre.cpp,m_regex_stdlib.cpp
OTHER_MODULES = $(REGEX_MODULES),m_geoip.cpp
SSL_MODULE = m_ssl_gnutls.cpp
INSPIRCD_MODULES = $(SSL_MODULE),$(DATABASES_MODULES),$(OTHER_MODULES)
override_dh_auto_configure:
DISABLE_RPATH=yes ./configure --enable-extras=$(INSPIRCD_MODULES)
./configure --disable-interactive \
--with-cc=$(CXX) \
--uid=$(shell id --user irc) \
--enable-gnutls \
--prefix=/usr/lib/inspircd \
--config-dir=/etc/inspircd \
--module-dir=/usr/lib/inspircd/modules \
--binary-dir=/usr/sbin
override_dh_auto_build:
dh_auto_build --parallel -- D=2 V=1 all
override_dh_auto_install:
dh_auto_install -- install DESTDIR=$(CURDIR)/debian/inspircd
rm -rf $(CURDIR)/debian/inspircd/etc/inspircd/examples
rmdir $(CURDIR)/debian/inspircd/usr/lib/inspircd/data \
$(CURDIR)/debian/inspircd/usr/lib/inspircd/logs
cp $(CURDIR)/debian/apparmor-profile \
$(CURDIR)/debian/inspircd/etc/apparmor.d/usr.sbin.inspircd
dh_apparmor --profile-name=usr.sbin.inspircd -pinspircd
override_dh_strip:
dh_strip --dbg-package=inspircd-dbg
override_dh_auto_clean:
dh_auto_clean -- distclean
find $(CURDIR)/src/modules/ -type l -exec rm '{}' \;
rm -f $(CURDIR)/inspircd
%:
dh $@ --with systemd
|