File: rules

package info (click to toggle)
rspamd 3.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 33,260 kB
  • sloc: ansic: 237,342; cpp: 103,301; javascript: 29,369; asm: 2,512; perl: 2,440; pascal: 1,616; python: 1,224; sql: 313; sh: 281; makefile: 140; xml: 74
file content (75 lines) | stat: -rwxr-xr-x 2,177 bytes parent folder | download
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
#!/usr/bin/make -f

DEB_BUILD_MAINT_OPTIONS = hardening=+all reproducible=+fixfilepath
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk

# CMake doesn't honor CPPFLAGS
CFLAGS += $(CPPFLAGS)
CXXFLAGS += $(CPPFLAGS)
ASMFLAGS += $(CPPFLAGS)

export CFLAGS CXXFLAGS ASMFLAGS LDFLAGS

ENABLE_HYPERSCAN := -DENABLE_HYPERSCAN=OFF

ifneq ($(filter amd64 arm64 i386, $(DEB_HOST_ARCH)),)
  ENABLE_HYPERSCAN := -DENABLE_HYPERSCAN=ON
endif

%:
	dh $@ --buildsystem=cmake+ninja --builddirectory=build

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=/usr/lib/systemd/system \
		-DWANT_SYSTEMD_UNITS=ON \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DNO_SHARED=ON \
		-DNO_TARGET_VERSIONS=ON \
		-DENABLE_LIBCXX=OFF \
		-DENABLE_LTO=ON \
		-DENABLE_FULL_DEBUG=OFF \
		-DENABLE_JEMALLOC=ON \
		-DENABLE_OPTIMIZATION=OFF \
		-DENABLE_PCRE2=ON \
		-DSYSTEM_ZSTD=ON \
		-DSYSTEM_DOCTEST=ON \
		-DSYSTEM_XXHASH=ON \
		-DENABLE_LUAJIT=ON \
		$(ENABLE_HYPERSCAN)

override_dh_auto_build:
	dh_auto_build

	# Do not embed scripts and fonts which are provided by other packages
	$(RM) $(CURDIR)/interface/css/bootstrap.min.css
	$(RM) $(CURDIR)/interface/js/lib/bootstrap.bundle.min.js
	$(RM) $(CURDIR)/interface/js/lib/jquery-3.7.1.min.js
	$(RM) $(CURDIR)/interface/js/lib/require.min.js
	$(RM) $(CURDIR)/interface/fonts/glyphicons-halflings-regular.ttf
	$(RM) $(CURDIR)/interface/fonts/glyphicons-halflings-regular.woff
	$(RM) $(CURDIR)/interface/fonts/glyphicons-halflings-regular.woff2

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	ninja -C build run-test
endif

override_dh_makeshlibs:
	dh_makeshlibs -Xlibrspamd-actrie -Xlibrspamd-ev -Xlibrspamd-kann -Xlibrspamd-replxx -Xlibrspamd-server

override_dh_fixperms:
	dh_fixperms
	chmod 750 $(CURDIR)/debian/rspamd/var/lib/rspamd
	chmod 750 $(CURDIR)/debian/rspamd/var/log/rspamd