blob: b74539b9320de29134a11336b367e24e9c2ec945 (
plain) (
blame)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
--- mkfiles/freebsd.orig Fri Jun 7 06:31:56 2002
+++ mkfiles/freebsd Sat Jun 8 09:27:02 2002
@@ -6,8 +6,8 @@
# if you wish you may change PREFIX to be /usr/local,
# for example
#
-PREFIX =
-#PREFIX = /usr/local
+#PREFIX =
+PREFIX ?= /usr/local
#
# Binary installation directory.
@@ -24,7 +24,7 @@
#
# Where we install the manpages.
#
-MANDIR = /usr/local/man/man1
+MANDIR = $(PREFIX)/man/man1
@@ -32,12 +32,12 @@
O = o
RM = rm -f
RMDIR = rm -rf
-CC = g++
-LIBS = -pthread
+CC ?= g++
+LIBS = ${PTHREAD_LIBS}
-DEFAULT_CFLAGS = -I. -D_THREAD_SAFE -D_REENTRANT -DBINARY_DIR="\"$(BINARYDIR)\"" -DSYSCONFDIR="\"$(CONFIGDIR)\"" -DVERSION="\"0.9.9.9\""
-CFLAGS = $(DEFAULT_CFLAGS) -Wall -DOS_TYPE="\"FreeBSD\""
+DEFAULT_CFLAGS = -I. ${PTHREAD_CFLAGS} -D_REENTRANT -DBINARY_DIR="\"$(BINARYDIR)\"" -DSYSCONFDIR="\"$(CONFIGDIR)\"" -DVERSION="\"0.9.9.9\""
+CFLAGS += $(DEFAULT_CFLAGS) -Wall -DOS_TYPE="\"FreeBSD\""
#
@@ -116,25 +116,26 @@
# Install the software.
#
install: $(PROG)
- install -d $(BINARYDIR) -d $(CONFIGDIR) -d $(TEMPLATEDIR)
- install ../mp3d $(BINARYDIR)
- install ../contrib/stats/mp3d-top $(BINARYDIR)
- install ../mp3d.conf $(CONFIGDIR)
+ -mkdir -p $(BINARYDIR) $(CONFIGDIR) $(TEMPLATEDIR)
+ ${BSD_INSTALL_PROGRAM} ../mp3d $(BINARYDIR)
+ ${BSD_INSTALL_SCRIPT} ../contrib/stats/mp3d-top $(BINARYDIR)
+ ${BSD_INSTALL_DATA} ../mp3d.conf $(CONFIGDIR)
# Install all the theme directories.
- for i in ../templates/*/; do cp -R ../templates/$$i $(TEMPLATEDIR); done
- install ../templates/README $(TEMPLATEDIR)
-
- # Fix up permissions correctly.
- find $(TEMPLATEDIR) -name "CVS" -print | xargs rm -rf
- chmod -R a+rx $(TEMPLATEDIR)
- find $(TEMPLATEDIR) -name "*.*" -print | xargs chmod -x
-
+ -mkdir -p $(TEMPLATEDIR)/default
+ ${BSD_INSTALL_DATA} ../templates/default/* $(TEMPLATEDIR)/default
+ -mkdir -p $(TEMPLATEDIR)/nausicaa
+ ${BSD_INSTALL_DATA} ../templates/nausicaa/* $(TEMPLATEDIR)/nausicaa
+ -mkdir -p $(TEMPLATEDIR)/simple
+ ${BSD_INSTALL_DATA} ../templates/simple/* $(TEMPLATEDIR)/simple
+ -mkdir -p $(TEMPLATEDIR)/split
+ ${BSD_INSTALL_DATA} ../templates/split/* $(TEMPLATEDIR)/split
+ ${BSD_INSTALL_DATA} ../templates/README $(TEMPLATEDIR)
# Man pages.
- install -d $(MANDIR)
- install ../doc/mp3d.1 $(MANDIR)
- install ../doc/mp3d.conf.1 $(MANDIR)
- install ../doc/mp3d-top.1 $(MANDIR)
- install ../doc/mp3d-config.1 $(MANDIR)
+ -mkdir -p $(MANDIR)
+ ${BSD_INSTALL_MAN} ../doc/mp3d.1 $(MANDIR)
+ ${BSD_INSTALL_MAN} ../doc/mp3d.conf.1 $(MANDIR)
+ ${BSD_INSTALL_MAN} ../doc/mp3d-top.1 $(MANDIR)
+ ${BSD_INSTALL_MAN} ../doc/mp3d-config.1 $(MANDIR)
#
|