dcron: build PIE binaries by default.
This commit is contained in:
parent
ed0689cd88
commit
5e96e45b99
2 changed files with 29 additions and 5 deletions
srcpkgs/dcron
23
srcpkgs/dcron/patches/respect_cflags_and_ldflags.patch
Normal file
23
srcpkgs/dcron/patches/respect_cflags_and_ldflags.patch
Normal 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 $@
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'dcron'
|
# Template file for 'dcron'
|
||||||
pkgname=dcron
|
pkgname=dcron
|
||||||
version=4.5
|
version=4.5
|
||||||
revision=14
|
revision=15
|
||||||
distfiles="http://www.jimpryor.net/linux/releases/dcron-${version}.tar.gz"
|
distfiles="http://www.jimpryor.net/linux/releases/dcron-${version}.tar.gz"
|
||||||
short_desc="Dillon's lightweight cron daemon"
|
short_desc="Dillon's lightweight cron daemon"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
|
@ -22,15 +22,16 @@ conf_files="/var/spool/cron/root"
|
||||||
provides="cron-daemon-0"
|
provides="cron-daemon-0"
|
||||||
replaces="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 \
|
make PREFIX=/usr CRONTAB_GROUP=users CRONTABS=/var/spool/cron \
|
||||||
CRONSTAMPS=/var/spool/cronstamps ${makejobs}
|
CRONSTAMPS=/var/spool/cronstamps ${makejobs}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install()
|
do_install() {
|
||||||
{
|
|
||||||
make DESTDIR=${DESTDIR} install
|
make DESTDIR=${DESTDIR} install
|
||||||
|
|
||||||
for f in etc/cron.d etc/cron.hourly etc/cron.weekly etc/cron.monthly \
|
for f in etc/cron.d etc/cron.hourly etc/cron.weekly etc/cron.monthly \
|
||||||
|
|
Loading…
Reference in a new issue