slackbuilds_ponce/system/set_rlimits/Makefile.patch

46 lines
1.8 KiB
Diff
Raw Normal View History

diff -Nur set_rlimits-1.3.0.orig/Makefile set_rlimits-1.3.0/Makefile
--- set_rlimits-1.3.0.orig/Makefile 2008-05-15 05:44:21.000000000 -0500
+++ set_rlimits-1.3.0/Makefile 2009-07-14 01:43:10.829342025 -0500
@@ -4,6 +4,10 @@
# C compiler to use
CC=gcc
+# CFLAGS to use
+CFLAGS = -Wall -g
+EXTRA_CFLAGS =
+
# Installation locations. If SYSCONFDIR is changed, the CONFIG_FILE define
# in set_rtlimits.c will need changing to match.
PREFIX=/usr/local
@@ -12,19 +16,19 @@
all: set_rlimits
set_rlimits: set_rlimits.c
- $(CC) -Wall -g -o set_rlimits set_rlimits.c
+ $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o set_rlimits set_rlimits.c
2010-05-11 15:18:44 +02:00
install: set_rlimits
- test -d $(PREFIX)/bin || mkdir -p $(PREFIX)/bin
- test -d $(PREFIX)/man/man8 || mkdir -p $(PREFIX)/man/man8
- test -d $(SYSCONFDIR) || mkdir -p $(SYSCONFDIR)
- cp -p set_rlimits $(PREFIX)/bin/
- chown 0.0 $(PREFIX)/bin/set_rlimits
2010-05-11 15:18:44 +02:00
- chmod u+s $(PREFIX)/bin/set_rlimits
- test -e $(SYSCONFDIR)/set_rlimits.conf || cp set_rlimits.conf $(SYSCONFDIR)/
- chown 0.0 $(SYSCONFDIR)/set_rlimits.conf
2010-05-11 15:18:44 +02:00
- cp -p set_rlimits.8 $(PREFIX)/man/man8/
- chown 0.0 $(PREFIX)/man/man8/set_rlimits.8
+ test -d $(DESTDIR)/$(PREFIX)/bin || mkdir -p $(DESTDIR)/$(PREFIX)/bin
+ test -d $(DESTDIR)/$(PREFIX)/man/man8 || mkdir -p $(DESTDIR)/$(PREFIX)/man/man8
+ test -d $(DESTDIR)/$(SYSCONFDIR) || mkdir -p $(DESTDIR)/$(SYSCONFDIR)
+ cp -p set_rlimits $(DESTDIR)/$(PREFIX)/bin/
+ chown 0.0 $(DESTDIR)/$(PREFIX)/bin/set_rlimits
+ chmod u+s $(DESTDIR)/$(PREFIX)/bin/set_rlimits
+ test -e $(DESTDIR)/$(SYSCONFDIR)/set_rlimits.conf || cp set_rlimits.conf $(DESTDIR)/$(SYSCONFDIR)/
+ chown 0.0 $(DESTDIR)/$(SYSCONFDIR)/set_rlimits.conf
+ cp -p set_rlimits.8 $(DESTDIR)/$(PREFIX)/man/man8/
+ chown 0.0 $(DESTDIR)/$(PREFIX)/man/man8/set_rlimits.8
2010-05-11 15:18:44 +02:00
.PHONY: clean tidy