blob: 89907328725adf5d7e7b48ee121c4c0e306bcad4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
$NetBSD: patch-aa,v 1.2 2013/06/16 08:09:11 ryoon Exp $
* Adjust for pkgsrc installation.
--- Makefile.orig 2010-12-03 12:50:22.000000000 +0000
+++ Makefile
@@ -2,5 +2,5 @@
#CFLAGS=-g -I.
-CFLAGS=-O2 -Wall -Wstrict-prototypes -Wuninitialized
+#CFLAGS=-O2 -Wall -Wstrict-prototypes -Wuninitialized
# uncomment for any OS other than Cygwin
@@ -8,5 +8,5 @@ BALANCE=balance
ROOT=root
INSTALL=install
-BINDIR=/usr/sbin
+BINDIR=${PREFIX}/sbin
MANDIR=${BINDIR}/../man/man1
@@ -21,5 +21,5 @@ MANDIR=${BINDIR}/../man/man1
# ROOT=Administrators
-CC=gcc
+#CC=gcc
RELEASE=3.54
@@ -27,8 +27,8 @@ all: balance
balance: balance.o butils.o
- $(CC) $(CFLAGS) -I. -o balance balance.o butils.o $(LIBRARIES)
+ $(CC) ${CPPFLAGS} $(CFLAGS) -I. -o balance balance.o butils.o $(LIBRARIES)
balance.o: balance.c balance.h
- $(CC) $(CFLAGS) -I. -c balance.c
+ $(CC) ${CPPFLAGS} $(CFLAGS) -I. -c balance.c
butils.o: butils.c balance.h
@@ -49,10 +49,12 @@ clean:
install:
- $(INSTALL) -o $(ROOT) -g $(ROOT) -m 755 $(BALANCE) \
+ ${BSD_INSTALL_PROGRAM_DIR} $(DESTDIR)$(BINDIR)
+ ${BSD_INSTALL_PROGRAM} $(BALANCE) \
$(DESTDIR)$(BINDIR)/$(BALANCE)
- $(INSTALL) -o $(ROOT) -g $(ROOT) -m 755 balance.1 \
+ ${BSD_INSTALL_MAN_DIR} $(DESTDIR)$(MANDIR)
+ ${BSD_INSTALL_MAN} balance.1 \
$(DESTDIR)$(MANDIR)
- mkdir -p $(DESTDIR)/var/run/balance
- chmod 1777 $(DESTDIR)/var/run/balance
+ mkdir -p $(DESTDIR)${VARBASE}/run/balance
+ chmod 1777 $(DESTDIR)${VARBASE}/run/balance
release: balance.pdf
|