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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
$NetBSD: patch-aa,v 1.6 2010/03/08 17:30:23 dmcmahill Exp $
--- src/Makefile.in.orig 2009-11-06 19:53:19.000000000 +0000
+++ src/Makefile.in
@@ -59,7 +59,7 @@ endif
INSTALL_EPAM=
ifeq (@pam@, pam)
- INSTALL_EPAM=install -m 750 $(O_USER) epam $(PBINDIR)
+ INSTALL_EPAM=$(BSD_INSTALL_DATA) -m 750 $(O_USER) epam $(PBINDIR)
endif
prefix = @prefix@
@@ -76,13 +76,13 @@ BEAMS = $(SOURCES:.erl=.beam)
DESTDIR =
# /etc/ejabberd/
-ETCDIR = $(DESTDIR)@sysconfdir@/ejabberd
+ETCDIR = $(DESTDIR)@prefix@/share/examples/ejabberd
# /sbin/
SBINDIR = $(DESTDIR)@sbindir@
# /lib/ejabberd/
-EJABBERDDIR = $(DESTDIR)@libdir@/ejabberd
+EJABBERDDIR = $(DESTDIR)@prefix@/lib/erlang/lib/@DISTNAME@
# /share/doc/ejabberd
PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -108,13 +108,13 @@ SODIR = $(PRIVDIR)/lib
MSGSDIR = $(PRIVDIR)/msgs
# /var/lib/ejabberd/
-SPOOLDIR = $(DESTDIR)@localstatedir@/lib/ejabberd
+SPOOLDIR = @EJABBERD_VARDIR@/spool/ejabberd/db/$NODE
# /var/lib/ejabberd/.erlang.cookie
COOKIEFILE = $(SPOOLDIR)/.erlang.cookie
# /var/log/ejabberd/
-LOGDIR = $(DESTDIR)@localstatedir@/log/ejabberd
+LOGDIR = $(DESTDIR)/@JABBERD_LOGDIR@
# Assume Linux-style dynamic library flags
DYNAMIC_LIB_CFLAGS = -fpic -shared
@@ -167,10 +167,10 @@ translations:
install: all
#
# Configuration files
- install -d -m 750 $(G_USER) $(ETCDIR)
+ $(BSD_INSTALL_DATA_DIR) -m 750 $(G_USER) $(ETCDIR)
[ -f $(ETCDIR)/ejabberd.cfg ] \
- && install -b -m 640 $(G_USER) ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg-new \
- || install -b -m 640 $(G_USER) ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg
+ && $(BSD_INSTALL_DATA) -m 640 $(G_USER) ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg-new \
+ || $(BSD_INSTALL_DATA) -m 640 $(G_USER) ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg
sed -e "s*@rootdir@*@prefix@*" \
-e "s*@installuser@*@INSTALLUSER@*" \
-e "s*@LIBDIR@*@libdir@*" \
@@ -180,13 +180,13 @@ install: all
-e "s*@erl@*@ERL@*" ejabberdctl.template \
> ejabberdctl.example
[ -f $(ETCDIR)/ejabberdctl.cfg ] \
- && install -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new \
- || install -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
- install -b -m 644 $(G_USER) inetrc $(ETCDIR)/inetrc
+ && $(BSD_INSTALL_DATA) -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new \
+ || $(BSD_INSTALL_DATA) -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
+ $(BSD_INSTALL_DATA) -m 644 $(G_USER) inetrc $(ETCDIR)/inetrc
#
# Administration script
- [ -d $(SBINDIR) ] || install -d -m 755 $(SBINDIR)
- install -m 550 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl
+ [ -d $(SBINDIR) ] || $(BSD_INSTALL_DATA_DIR) -m 755 $(SBINDIR)
+ $(BSD_INSTALL_SCRIPT) -m 550 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl
#
# Init script
sed -e "s*@ctlscriptpath@*$(SBINDIR)*" \
@@ -194,54 +194,48 @@ install: all
> ejabberd.init
#
# Binary Erlang files
- install -d $(BEAMDIR)
- install -m 644 *.app $(BEAMDIR)
- install -m 644 *.beam $(BEAMDIR)
+ $(BSD_INSTALL_DATA_DIR) $(BEAMDIR)
+ $(BSD_INSTALL_DATA) -m 644 *.app $(BEAMDIR)
+ $(BSD_INSTALL_DATA) -m 644 *.beam $(BEAMDIR)
rm -f $(BEAMDIR)/configure.beam
#
# ejabberd header files
- install -d $(INCLUDEDIR)
- install -m 644 *.hrl $(INCLUDEDIR)
- install -d $(INCLUDEDIR)/eldap/
- install -m 644 eldap/*.hrl $(INCLUDEDIR)/eldap/
- install -d $(INCLUDEDIR)/mod_muc/
- install -m 644 mod_muc/*.hrl $(INCLUDEDIR)/mod_muc/
- install -d $(INCLUDEDIR)/mod_proxy65/
- install -m 644 mod_proxy65/*.hrl $(INCLUDEDIR)/mod_proxy65/
- install -d $(INCLUDEDIR)/mod_pubsub/
- install -m 644 mod_pubsub/*.hrl $(INCLUDEDIR)/mod_pubsub/
- install -d $(INCLUDEDIR)/web/
- install -m 644 web/*.hrl $(INCLUDEDIR)/web/
+ $(BSD_INSTALL_DATA_DIR) $(INCLUDEDIR)
+ $(BSD_INSTALL_DATA) -m 644 *.hrl $(INCLUDEDIR)
+ $(BSD_INSTALL_DATA_DIR) $(INCLUDEDIR)/eldap/
+ $(BSD_INSTALL_DATA) -m 644 eldap/*.hrl $(INCLUDEDIR)/eldap/
+ $(BSD_INSTALL_DATA_DIR) $(INCLUDEDIR)/mod_muc/
+ $(BSD_INSTALL_DATA) -m 644 mod_muc/*.hrl $(INCLUDEDIR)/mod_muc/
+ $(BSD_INSTALL_DATA_DIR) $(INCLUDEDIR)/mod_proxy65/
+ $(BSD_INSTALL_DATA) -m 644 mod_proxy65/*.hrl $(INCLUDEDIR)/mod_proxy65/
+ $(BSD_INSTALL_DATA_DIR) $(INCLUDEDIR)/mod_pubsub/
+ $(BSD_INSTALL_DATA) -m 644 mod_pubsub/*.hrl $(INCLUDEDIR)/mod_pubsub/
+ $(BSD_INSTALL_DATA_DIR) $(INCLUDEDIR)/web/
+ $(BSD_INSTALL_DATA) -m 644 web/*.hrl $(INCLUDEDIR)/web/
#
# Binary C programs
- install -d $(PBINDIR)
- install -m 750 $(O_USER) ../tools/captcha.sh $(PBINDIR)
+ $(BSD_INSTALL_SCRIPT_DIR) $(PBINDIR)
+ $(BSD_INSTALL_SCRIPT) -m 750 $(O_USER) ../tools/captcha.sh $(PBINDIR)
$(INSTALL_EPAM)
#
# Binary system libraries
- install -d $(SODIR)
- install -m 644 *.so $(SODIR)
+ $(BSD_INSTALL_LIB_DIR) $(SODIR)
+ $(BSD_INSTALL_LIB) -m 644 *.so $(SODIR)
#
# Translated strings
- install -d $(MSGSDIR)
- install -m 644 msgs/*.msg $(MSGSDIR)
- #
- # Spool directory
- install -d -m 750 $(O_USER) $(SPOOLDIR)
- $(CHOWN_COMMAND) -R @INSTALLUSER@ $(SPOOLDIR) >$(CHOWN_OUTPUT)
- chmod -R 750 $(SPOOLDIR)
- [ ! -f $(COOKIEFILE) ] || { $(CHOWN_COMMAND) @INSTALLUSER@ $(COOKIEFILE) >$(CHOWN_OUTPUT) ; chmod 400 $(COOKIEFILE) ; }
+ $(BSD_INSTALL_DATA_DIR) $(MSGSDIR)
+ $(BSD_INSTALL_DATA) -m 644 msgs/*.msg $(MSGSDIR)
#
# Log directory
- install -d -m 750 $(O_USER) $(LOGDIR)
+ $(BSD_INSTALL_DATA_DIR) -m 750 $(O_USER) $(LOGDIR)
$(CHOWN_COMMAND) -R @INSTALLUSER@ $(LOGDIR) >$(CHOWN_OUTPUT)
chmod -R 750 $(LOGDIR)
#
# Documentation
- install -d $(DOCDIR)
- install ../doc/guide.html $(DOCDIR)
- install ../doc/*.png $(DOCDIR)
- install ../doc/*.txt $(DOCDIR)
+ $(BSD_INSTALL_DATA_DIR) $(DOCDIR)
+ $(BSD_INSTALL_DATA) ../doc/guide.html $(DOCDIR)
+ $(BSD_INSTALL_DATA) ../doc/*.png $(DOCDIR)
+ $(BSD_INSTALL_DATA) ../doc/*.txt $(DOCDIR)
uninstall: uninstall-binary
|