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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
#
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets by Bill Allombert 2001
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
include /usr/share/dpkg/default.mk
export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
ifeq ($(DEB_HOST_ARCH_OS), linux)
CONFIGURE_ARGS+=--enable-epoll
else ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
CONFIGURE_ARGS+=--enable-kqueue
else ifeq ($(DEB_HOST_ARCH_OS), solaris)
CONFIGURE_ARGS+=--enable-ports
else
CONFIGURE_ARGS+=--enable-poll
endif
ifdef DEB_DEBUG
CONFIGURE_ARGS+=--enable-warnings --enable-iodebug
endif
ifneq ($(filter pkg.charybdis.openssl,$(DEB_BUILD_PROFILES)),)
CONFIGURE_ARGS+=--enable-openssl
else ifneq ($(filter pkg.charybdis.gnutls,$(DEB_BUILD_PROFILES)),)
CONFIGURE_ARGS+=--disable-openssl --enable-gnutls
else
CONFIGURE_ARGS+=--disable-openssl --enable-mbedtls
endif
ifdef DEB_NICKLEN
CONFIGURE_ARGS+=--with-nicklen=$(DEB_NICKLEN)
endif
EXTERNAL_BUILD_TIMESTAMP?=$(shell LC_ALL=C date --utc -d @$(SOURCE_DATE_EPOCH))
export EXTERNAL_BUILD_TIMESTAMP
override_dh_auto_configure:
# XXX: too much stuff here, see https://github.com/atheme/charybdis/issues/14
dh_auto_configure -- --prefix=/usr --with-confdir=/etc/charybdis \
${CONFIGURE_ARGS} \
--with-program-prefix=charybdis- \
--enable-fhs-paths \
--libdir=/usr/lib/charybdis/ \
--localstatedir=/var/lib/ \
--with-helpdir=/usr/share/doc/charybdis/help/ \
--with-logdir=/var/log/charybdis/ \
--with-rundir=/var/run/ \
--with-moduledir=/usr/lib/charybdis/modules \
--with-shared-sqlite \
--enable-ipv6
override_dh_auto_install:
dh_auto_install --destdir=debian/charybdis
# spurious logs directory creation upstream, remove when fails
# fixed upstream: https://github.com/charybdis-ircd/charybdis/commit/550e03fadc91160991e1bbc0f7a7d193f48640ce#diff-c949f93d03f44a4217d7a138f9e2e54a
rmdir $(CURDIR)/debian/charybdis/usr/logs
# remove when it fails, it means upstream stopped shipping .la files, yay
rm $(CURDIR)/debian/charybdis/usr/lib/charybdis/librb.la
rm $(CURDIR)/debian/charybdis/usr/lib/charybdis/libircd.la
# see https://github.com/atheme/charybdis/issues/23
# maybe this should be in /usr/share/doc, but then users won't know when to update their configs...
mv $(CURDIR)/debian/charybdis/etc/charybdis/ircd.conf.example $(CURDIR)/debian/charybdis/etc/charybdis/ircd.conf
# restart only after upgrades to reduce downtime
override_dh_installinit:
dh_installinit -R
%:
dh $@
|