#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS=hardening=+all export INSPIRCD_DISABLE_RPATH=1 # Upstream uses clang on FreeBSD. So force CXX to g++ if undefined, but # still allow rebuilding with another compiler CXX ?= g++ %: dh $@ override_dh_auto_clean: # call distclean instead of clean dh_auto_clean -- distclean # Delete symlinks to extra modules find $(CURDIR)/src/modules/ -type l -exec rm '{}' \; -rm debian/inspircd.service rm -rf build-man override_dh_auto_configure: ./configure --disable-interactive \ --enable-extras argon2,geo_maxmind,ldap,mysql,pgsql,regex_pcre,regex_posix,regex_re2,regex_stdlib,regex_tre,sqlite3,ssl_gnutls,sslrehashsignal ./configure --disable-interactive \ --uid=irc \ --gid=irc \ --disable-auto-extras \ --distribution-label=debian \ --prefix=/usr/lib/inspircd \ --config-dir=/etc/inspircd \ --module-dir=/usr/lib/inspircd/modules \ --example-dir=/usr/share/doc/inspircd/examples \ --data-dir=/var/run/inspircd \ --binary-dir=/usr/sbin override_dh_auto_build: dh_auto_build -- INSPIRCD_VERBOSE=1 all override_dh_auto_install: dh_auto_install dh_apparmor --profile-name=usr.sbin.inspircd -pinspircd # Make sure the Perl service wrapper is executable chmod 755 $(CURDIR)/debian/tmp/usr/lib/inspircd/inspircd override_dh_installman: mkdir build-man/ for man in \ inspircd.1 \ inspircd-genssl.1 \ inspircd-testssl.1 ; \ do \ sed -e 's/"1"/"8"/' \ <"debian/tmp/usr/lib/inspircd/manuals/$$man" \ >"build-man/$${man%%.1}.8" ; \ done dh_installman override_dh_installinit: dh_installinit --no-restart-after-upgrade override_dh_installsystemd: if [ -f .configure/inspircd.service ] ; then \ sed -e 's:=/var/run/:=/run/:' \ <.configure/inspircd.service \ >debian/inspircd.service ; \ fi dh_installsystemd