cronie/debian/rules

77 lines
2.4 KiB
Plaintext
Raw Normal View History

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
%:
2022-11-13 17:09:31 +01:00
dh $@
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
# 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
2022-11-13 17:09:31 +01:00
# System-wide crontab: IS NOT INSTALLED HERE: SEE CON-DAEMON-COMMON
#install -m 644 debian/etc/crontab.system debian/cronie/etc/crontab
# Placeholders for dpkg: ARE NOT INSTALLED HERE: SEE CON-DAEMON-COMMON
#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
2019-11-05 08:04:37 +01:00
# 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