diff options
Diffstat (limited to '')
-rwxr-xr-x | debian/rules | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..4ada8a2 --- /dev/null +++ b/debian/rules @@ -0,0 +1,67 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all reproducible=+fixfilepath +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk +# please blhc +export ASMFLAGS = $(CPPFLAGS) + +include /usr/share/dpkg/architecture.mk + +ifneq ($(filter amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64, $(DEB_HOST_ARCH)),) + LUAJIT = ON +else + LUAJIT = OFF +endif + +ifneq ($(filter amd64 i386, $(DEB_HOST_ARCH)),) + HYPERSCAN=ON +else + HYPERSCAN=OFF +endif + +ifneq ($(filter amd64 arm64 armel armhf hppa i386 mips64el mipsel powerpcspe ppc64 ppc64el sh4, $(DEB_HOST_ARCH)),) + UNWIND=ON +else + UNWIND=OFF +endif + +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure -- \ + -DCONFDIR=/etc/rspamd \ + -DMANDIR=/usr/share/man \ + -DRUNDIR=/run/rspamd \ + -DDBDIR=/var/lib/rspamd \ + -DLOGDIR=/var/log/rspamd \ + -DSHAREDIR=/usr/share/rspamd \ + -DLIBDIR=/usr/lib/rspamd \ + -DINCLUDEDIR=/usr/include \ + -DSYSTEMDDIR=/lib/systemd/system \ + -DNO_SHARED=ON \ + -DDEBIAN_BUILD=1 \ + -DENABLE_JEMALLOC=ON \ + -DENABLE_OPTIMIZATION=OFF \ + -DENABLE_FULL_DEBUG=OFF \ + -DENABLE_PCRE2=ON \ + -DENABLE_LUAJIT=$(LUAJIT) \ + -DENABLE_LIBUNWIND=$(UNWIND) \ + -DENABLE_HYPERSCAN=$(HYPERSCAN) \ + -DWANT_SYSTEMD_UNITS=ON \ + -DENABLE_STATIC_LIBCXX=OFF \ + -DENABLE_LIBCXX=OFF \ + -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON + +override_dh_makeshlibs: + dh_makeshlibs -Xlibrspamd-actrie -Xlibrspamd-ev -Xlibrspamd-kann -Xlibrspamd-replxx -Xlibrspamd-server + +override_dh_auto_clean: + dh_auto_clean + rm -f src/modules.c + +override_dh_fixperms: + dh_fixperms + chmod 750 $(CURDIR)/debian/rspamd/var/lib/rspamd + chmod 750 $(CURDIR)/debian/rspamd/var/log/rspamd |