Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 PACKAGE=proftpd-core
4 PACKAGE_DEV=proftpd-dev
5 NAME=proftpd
6 VERSION=$(shell grep PROFTPD_VERSION_TEXT $(CURDIR)/include/version.h|cut -d\" -f2)
7
8 # Make build reproducible
9 export SHELL=/bin/bash
10 export CONFIG_SHELL=/bin/bash
11
12 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
13
14 # Some special build options
15 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
16 DEVELOPT=--enable-devel=yes
17 endif
18
19 ifneq (,$(findstring verbose,$(DEB_BUILD_OPTIONS)))
20 DH_VERBOSE=1
21 export DH_VERBOSE
22 endif
23
24 ifeq (,$(filter test,$(LOCAL_BUILD_OPTIONS)))
25 # Disable automated build tests
26 override_dh_auto_test:
27 endif
28
29 include /usr/share/dpkg/architecture.mk
30
31 # XAttr does not exist on KFreeBSD
32 #
33 XATTR_NOT_EXISTS := kfreebsd-amd64 kfreebsd-i386
34 ifneq (,$(filter $(DEB_HOST_ARCH), $(XATTR_NOT_EXISTS)))
35 BUILDNOTXATTR=--disable-xattr
36 endif
37
38 # ADDL_CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
39
40 include /usr/share/dpkg/buildflags.mk
41
42 DSOMODS1 = mod_unique_id:mod_site_misc:mod_load:mod_ban:mod_quotatab:mod_sql:mod_sql_mysql:mod_sql_postgres:mod_sql_sqlite:mod_sql_odbc:mod_dynmasq
43 DSOMODS2 = mod_quotatab_sql:mod_ldap:mod_quotatab_ldap:mod_ratio:mod_tls:mod_rewrite:mod_radius:mod_wrap:mod_wrap2:mod_wrap2_file
44 DSOMODS3 = mod_wrap2_sql:mod_quotatab_file:mod_quotatab_radius:mod_facl:mod_ctrls_admin:mod_copy:mod_deflate:mod_ifversion
45 DSOMODS4 = mod_geoip:mod_exec:mod_sftp:mod_sftp_pam:mod_sftp_sql:mod_shaper:mod_sql_passwd:mod_ifsession:mod_auth_otp:mod_tls_redis
46 DSOMODS5 = mod_wrap2_redis:mod_redis:mod_memcache:mod_tls_memcache:mod_readme:mod_snmp:mod_digest:mod_ident
47 DSOMODS6 = mod_log_forensic:mod_qos:mod_statcache:mod_tls_fscache:mod_tls_shmcache:mod_dnsbl:mod_delay:mod_xfer:mod_ls
48 CONF_ARGS := --prefix=/usr --with-pkgconfig=lib/pkgconfig \
49 --with-includes=$(shell pg_config --includedir)$(shell mysql_config --include|sed -e 's/-I/:/g'|sed -e 's/ //') \
50 --mandir=/usr/share/man --sysconfdir=/etc/$(NAME) --localstatedir=/run --libexecdir=/usr/lib/$(NAME) \
51 --enable-sendfile --enable-facl --enable-dso --enable-autoshadow --enable-ctrls --enable-openssl \
52 --enable-ipv6 --enable-nls --enable-memcache --with-lastlog=/var/log/lastlog --enable-pcre2 $(DEVELOPT) \
53 --disable-strip --enable-redis $(BUILDNOTXATTR)
54
55 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
56 CONF_ARGS += --build $(DEB_HOST_GNU_TYPE)
57 else
58 CONF_ARGS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
59 endif
60
61 # Following line is used in Post-Hook of "gbp import-orig"
62 debian/control: debian/control.in
63 sed -e 's/@VERSION@/$(VERSION)/' $< >$@
64
65 debian/proftpd-substvars: debian/proftpd-substvars.in
66 sed -e 's/@VERSION@/$(VERSION)/' $< >$@
67
68 %:
69 dh $@ --without autoreconf
70
71 override_dh_auto_configure:
72 dh_update_autotools_config
73
74 # upstream autotools stuff is old enough to miss --runstatedir option and break debhelper(>10)
75 # dh_auto_configure -- $(CONF_ARGS) --with-shared=$(DSOMODS1):$(DSOMODS2):$(DSOMODS3):$(DSOMODS4):$(DSOMODS5):$(DSOMODS6)
76 install_user=$$(id -un) install_group=$$(id -gn) ./configure --infodir=\${prefix}/share/info --disable-option-checking --disable-silent-rules --libdir=\${prefix}/lib/$(DEB_BUILD_GNU_TYPE) --disable-dependency-tracking \
77 $(CONF_ARGS) --with-shared=$(DSOMODS1):$(DSOMODS2):$(DSOMODS3):$(DSOMODS4):$(DSOMODS5):$(DSOMODS6)
78
79 override_dh_auto_build: debian/proftpd-substvars
80 dh_auto_build
81
82 override_dh_auto_install:
83 dh_auto_install
84 rm -f $(CURDIR)/debian/tmp/usr/sbin/in.proftpd
85
86 override_dh_auto_clean:
87 dh_auto_clean
88 # A few surplus files are removed using debian/clean
89 rm -f $$(find . -type l) $$(find . -name "*~" -o -name "*.orig")
90 rm -rf debian/*.gz core
91
92 override_dh_installchangelogs:
93 dh_installchangelogs ChangeLog
94
95 override_dh_installpam:
96 dh_installpam --name=$(NAME)
97
98 override_dh_installinit:
99 dh_installinit --name=$(NAME)
100
101 override_dh_installsystemd:
102 dh_installsystemd -p$(PACKAGE) --no-enable --no-start --name=$(NAME) $(NAME).socket
103 dh_installsystemd -p$(PACKAGE) --name=$(NAME)@ $(NAME)@.service
104 dh_installsystemd -p$(PACKAGE) --name=$(NAME) $(NAME).service
105
106 .PHONY: debian/proftpd-substvars debian/control