blob: 6fc8dc3115dbed6ef3d78e367c5e5c41b8846b7d (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
$NetBSD: patch-aa,v 1.5 2015/04/15 14:05:46 nros Exp $
Fix installation directories and scripts
--- Makefile.orig 2015-03-24 19:18:04.000000000 +0000
+++ Makefile
@@ -3,10 +3,11 @@ include config.unix
BIN = $(DESTDIR)$(PREFIX)/bin
CONFIG = $(DESTDIR)$(SYSCONFDIR)
+EGDIR = $(DESTDIR)@EGDIR@
MODULES = $(DESTDIR)$(LIBDIR)/prosody/modules
SOURCE = $(DESTDIR)$(LIBDIR)/prosody
DATA = $(DESTDIR)$(DATADIR)
-MAN = $(DESTDIR)$(PREFIX)/share/man
+MAN = $(DESTDIR)$(PREFIX)/$(PKGMANDIR)
INSTALLEDSOURCE = $(LIBDIR)/prosody
INSTALLEDCONFIG = $(SYSCONFDIR)
@@ -22,26 +23,39 @@ ifeq ($(EXCERTS),yes)
endif
install: prosody.install prosodyctl.install prosody.cfg.lua.install util/encodings.so util/encodings.so util/pposix.so util/signal.so
- install -d $(BIN) $(CONFIG) $(MODULES) $(SOURCE)
- install -m750 -d $(DATA)
- install -d $(MAN)/man1
- install -d $(CONFIG)/certs
- install -d $(SOURCE)/core $(SOURCE)/net $(SOURCE)/util
- install -m755 ./prosody.install $(BIN)/prosody
- install -m755 ./prosodyctl.install $(BIN)/prosodyctl
- install -m644 core/* $(SOURCE)/core
- install -m644 net/*.lua $(SOURCE)/net
- install -d $(SOURCE)/net/http
- install -m644 net/http/*.lua $(SOURCE)/net/http
- install -m644 util/*.lua $(SOURCE)/util
- install -m644 util/*.so $(SOURCE)/util
- install -d $(SOURCE)/util/sasl
- install -m644 util/sasl/* $(SOURCE)/util/sasl
- umask 0022 && cp -r plugins/* $(MODULES)
- install -m644 certs/* $(CONFIG)/certs
- install -m644 man/prosodyctl.man $(MAN)/man1/prosodyctl.1
- test -e $(CONFIG)/prosody.cfg.lua || install -m644 prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua
- test -e prosody.version && install -m644 prosody.version $(SOURCE)/prosody.version || true
+ $(BSD_INSTALL_SCRIPT_DIR) $(BIN)
+ $(BSD_INSTALL_DATA_DIR) $(EGDIR)
+ $(BSD_INSTALL_DATA_DIR) $(MODULES)
+ $(BSD_INSTALL_DATA_DIR) $(SOURCE)
+ $(BSD_INSTALL_DATA_DIR) -m 750 $(DATA)
+ $(BSD_INSTALL_MAN_DIR) $(MAN)/man1
+ $(BSD_INSTALL_LIB_DIR) $(SOURCE)/core
+ $(BSD_INSTALL_LIB_DIR) $(SOURCE)/net
+ $(BSD_INSTALL_LIB_DIR) $(SOURCE)/util
+ $(BSD_INSTALL_SCRIPT) ./prosody.install $(BIN)/prosody
+ $(BSD_INSTALL_SCRIPT) ./prosodyctl.install $(BIN)/prosodyctl
+ $(BSD_INSTALL_DATA) core/* $(SOURCE)/core
+ $(BSD_INSTALL_DATA) net/*.lua $(SOURCE)/net
+ $(BSD_INSTALL_LIB_DIR) $(SOURCE)/net/http
+ $(BSD_INSTALL_DATA) net/http/*.lua $(SOURCE)/net/http
+ $(BSD_INSTALL_DATA) util/*.lua $(SOURCE)/util
+ $(BSD_INSTALL_LIB) util/*.so $(SOURCE)/util
+ $(BSD_INSTALL_LIB_DIR) $(SOURCE)/util/sasl
+ $(BSD_INSTALL_DATA) util/sasl/* $(SOURCE)/util/sasl
+ $(BSD_INSTALL_DATA) plugins/*.lua $(MODULES)
+ $(BSD_INSTALL_DATA_DIR) $(EGDIR)/certs
+ $(BSD_INSTALL_DATA) certs/* $(EGDIR)/certs
+ $(BSD_INSTALL_LIB_DIR) $(MODULES)/adhoc
+ $(BSD_INSTALL_DATA) plugins/adhoc/*.lua $(MODULES)/adhoc
+ $(BSD_INSTALL_LIB_DIR) $(MODULES)/mod_s2s
+ $(BSD_INSTALL_DATA) plugins/mod_s2s/* $(MODULES)/mod_s2s
+ $(BSD_INSTALL_LIB_DIR) $(MODULES)/muc
+ $(BSD_INSTALL_DATA) plugins/muc/* $(MODULES)/muc
+ $(BSD_INSTALL_LIB_DIR) $(MODULES)/storage
+ $(BSD_INSTALL_DATA) plugins/storage/* $(MODULES)/storage
+ $(BSD_INSTALL_MAN) man/prosodyctl.man $(MAN)/man1/prosodyctl.1
+ $(BSD_INSTALL_DATA) prosody.cfg.lua.install $(EGDIR)/prosody.cfg.lua
+ $(BSD_INSTALL_DATA) prosody.version $(SOURCE)/prosody.version
$(MAKE) install -C util-src
clean:
|