dcron: build PIE binaries by default.

This commit is contained in:
Juan RP 2012-01-23 10:59:27 +01:00
parent ed0689cd88
commit 5e96e45b99
2 changed files with 29 additions and 5 deletions

View File

@ -0,0 +1,23 @@
--- Makefile.orig 2012-01-23 10:56:26.473607101 +0100
+++ Makefile 2012-01-23 10:57:43.806746482 +0100
@@ -32,7 +32,6 @@ TABSRCS = crontab.c chuser.c
TABOBJS = crontab.o chuser.o
PROTOS = protos.h
LIBS =
-LDFLAGS =
DEFS = -DVERSION='"$(VERSION)"' \
-DSCRONTABS='"$(SCRONTABS)"' -DCRONTABS='"$(CRONTABS)"' \
-DCRONSTAMPS='"$(CRONSTAMPS)"' -DLOG_IDENT='"$(LOG_IDENT)"' \
@@ -54,10 +53,10 @@ protos.h: $(SRCS) $(TABSRCS)
fgrep -h Prototype $(SRCS) $(TABSRCS) > protos.h
crond: $(OBJS)
- $(CC) $(LDFLAGS) $^ $(LIBS) -o crond
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o crond
crontab: $(TABOBJS)
- $(CC) $(LDFLAGS) $^ -o crontab
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o crontab
%.o: %.c defs.h $(PROTOS)
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(DEFS) $< -o $@

View File

@ -1,7 +1,7 @@
# Template file for 'dcron'
pkgname=dcron
version=4.5
revision=14
revision=15
distfiles="http://www.jimpryor.net/linux/releases/dcron-${version}.tar.gz"
short_desc="Dillon's lightweight cron daemon"
maintainer="Juan RP <xtraeme@gmail.com>"
@ -22,15 +22,16 @@ conf_files="/var/spool/cron/root"
provides="cron-daemon-0"
replaces="cron-daemon>=0"
# Build PIE binaries by default.
CFLAGS="-fPIE"
LDFLAGS="-pie"
do_build()
{
do_build() {
make PREFIX=/usr CRONTAB_GROUP=users CRONTABS=/var/spool/cron \
CRONSTAMPS=/var/spool/cronstamps ${makejobs}
}
do_install()
{
do_install() {
make DESTDIR=${DESTDIR} install
for f in etc/cron.d etc/cron.hourly etc/cron.weekly etc/cron.monthly \