2011-07-26 14:00:34 +02:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
2019-11-05 08:04:37 +01:00
|
|
|
# For DEB_HOST_ARCH_OS
|
|
|
|
include /usr/share/dpkg/architecture.mk
|
2011-07-26 14:00:34 +02:00
|
|
|
|
|
|
|
# Add build flags
|
2019-11-05 08:04:37 +01:00
|
|
|
export DEB_CFLAGS_MAINT_APPEND = -Wall
|
2011-07-26 14:00:34 +02:00
|
|
|
|
2019-11-05 08:04:37 +01:00
|
|
|
# Add hardening flags
|
|
|
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
2011-07-26 14:00:34 +02:00
|
|
|
|
|
|
|
# Build the config options string
|
|
|
|
CONFIG_OPTIONS =
|
|
|
|
|
2019-11-05 08:04:37 +01:00
|
|
|
# anacron is still being provided by src:anacron
|
|
|
|
CONFIG_OPTIONS += --disable-anacron
|
|
|
|
|
|
|
|
# Default EDITOR path
|
|
|
|
CONFIG_OPTIONS += --with-editor=/usr/bin/sensible-editor
|
|
|
|
|
2011-07-26 14:00:34 +02:00
|
|
|
# PAM is enabled by default
|
|
|
|
ifeq (,$(findstring nopam,$(DEB_BUILD_OPTIONS)))
|
|
|
|
CONFIG_OPTIONS += --with-pam
|
|
|
|
endif
|
|
|
|
|
2019-11-05 08:04:37 +01:00
|
|
|
##########################
|
2011-07-26 14:00:34 +02:00
|
|
|
### Linux-only options ###
|
2019-11-05 08:04:37 +01:00
|
|
|
ifeq ($(DEB_HOST_ARCH_OS), linux)
|
2011-07-26 14:00:34 +02:00
|
|
|
|
|
|
|
# SELINUX is enabled by default
|
|
|
|
ifeq (,$(findstring noselinux,$(DEB_BUILD_OPTIONS)))
|
|
|
|
CONFIG_OPTIONS += --with-selinux
|
|
|
|
endif
|
|
|
|
|
|
|
|
# inotify is enabled by default
|
|
|
|
ifeq (,$(findstring noinotify,$(DEB_BUILD_OPTIONS)))
|
|
|
|
CONFIG_OPTIONS += --with-inotify
|
|
|
|
endif
|
|
|
|
|
|
|
|
# audit is disabled by default
|
|
|
|
ifneq (,$(findstring withaudit,$(DEB_BUILD_OPTIONS)))
|
|
|
|
CONFIG_OPTIONS += --with-audit
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
2019-11-05 08:04:37 +01:00
|
|
|
##### End Linux-only #####
|
|
|
|
##########################
|
2011-07-26 14:00:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
%:
|
2021-08-09 17:22:40 +02:00
|
|
|
dh $@ --with autoreconf
|
2011-07-26 14:00:34 +02:00
|
|
|
|
|
|
|
# Set SPOOL_DIR to Debian's traditional location for crontabs (see Policy)
|
|
|
|
# Set CRON_GROUP to "crontab" to enable SGID functionality (avoids SUID)
|
|
|
|
override_dh_auto_configure:
|
2019-11-05 08:04:37 +01:00
|
|
|
SPOOL_DIR=/var/spool/cron/crontabs \
|
|
|
|
dh_auto_configure CRON_GROUP=crontab -- $(CONFIG_OPTIONS)
|
2011-07-26 14:00:34 +02:00
|
|
|
|
|
|
|
override_dh_install:
|
|
|
|
dh_install
|
2021-08-09 17:31:23 +02:00
|
|
|
install -d -m 755 debian/cronie/etc/
|
2011-07-26 14:00:34 +02:00
|
|
|
# Create /etc/cron.deny to allow crontab(1) for all users by default
|
2019-11-05 08:04:37 +01:00
|
|
|
install -m 644 debian/etc/cronie.deny debian/cronie/etc/cron.deny
|
2011-07-26 14:00:34 +02:00
|
|
|
# System-wide crontab
|
2019-11-05 08:04:37 +01:00
|
|
|
install -m 644 debian/etc/crontab.system debian/cronie/etc/crontab
|
2011-07-26 14:00:34 +02:00
|
|
|
# Placeholders for dpkg
|
2019-11-05 08:04:37 +01:00
|
|
|
install -m 644 debian/etc/placeholder debian/cronie/etc/cron.d/.placeholder
|
|
|
|
install -m 644 debian/etc/placeholder debian/cronie/etc/cron.hourly/.placeholder
|
|
|
|
install -m 644 debian/etc/placeholder debian/cronie/etc/cron.daily/.placeholder
|
|
|
|
install -m 644 debian/etc/placeholder debian/cronie/etc/cron.weekly/.placeholder
|
|
|
|
install -m 644 debian/etc/placeholder debian/cronie/etc/cron.monthly/.placeholder
|
|
|
|
# systemd service file
|
|
|
|
install -d -m 755 debian/cronie/lib/systemd/system/
|
|
|
|
install -m 644 contrib/cronie.systemd debian/cronie/lib/systemd/system/cronie.service
|