78 lines
2.3 KiB
Makefile
Executable File
78 lines
2.3 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
#export DH_VERBOSE=1
|
|
|
|
# For DEB_HOST_ARCH_OS
|
|
include /usr/share/dpkg/architecture.mk
|
|
|
|
# Add build flags
|
|
export DEB_CFLAGS_MAINT_APPEND = -Wall
|
|
|
|
# Add hardening flags
|
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
|
|
|
# Build the config options string
|
|
CONFIG_OPTIONS =
|
|
|
|
# anacron is still being provided by src:anacron
|
|
CONFIG_OPTIONS += --disable-anacron
|
|
|
|
# Default EDITOR path
|
|
CONFIG_OPTIONS += --with-editor=/usr/bin/sensible-editor
|
|
|
|
# PAM is enabled by default
|
|
ifeq (,$(findstring nopam,$(DEB_BUILD_OPTIONS)))
|
|
CONFIG_OPTIONS += --with-pam
|
|
endif
|
|
|
|
##########################
|
|
### Linux-only options ###
|
|
ifeq ($(DEB_HOST_ARCH_OS), linux)
|
|
|
|
# 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
|
|
##### End Linux-only #####
|
|
##########################
|
|
|
|
|
|
%:
|
|
dh $@ --with autoreconf
|
|
|
|
# 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:
|
|
SPOOL_DIR=/var/spool/cron/crontabs \
|
|
dh_auto_configure CRON_GROUP=crontab -- $(CONFIG_OPTIONS)
|
|
|
|
override_dh_install:
|
|
dh_install
|
|
install -d -m 755 debian/cronie/etc/
|
|
# Create /etc/cron.deny to allow crontab(1) for all users by default
|
|
install -m 644 debian/etc/cronie.deny debian/cronie/etc/cron.deny
|
|
# System-wide crontab
|
|
install -m 644 debian/etc/crontab.system debian/cronie/etc/crontab
|
|
# Placeholders for dpkg
|
|
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
|