Sat, 25 Jul 2009 23:37:52 +0500
ejabberdsql2prosody: Improved help message
463
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 | |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 | include config.unix |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 | |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 | BIN = $(DESTDIR)$(PREFIX)/bin |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 | CONFIG = $(DESTDIR)$(SYSCONFDIR) |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 | MODULES = $(DESTDIR)$(PREFIX)/lib/prosody/modules |
464 | 7 | SOURCE = $(DESTDIR)$(PREFIX)/lib/prosody |
503
00702b66beb1
Makefile fix for creating datadir in correct place on install
Matthew Wild <mwild1@gmail.com>
parents:
502
diff
changeset
|
8 | DATA = $(DESTDIR)$(DATADIR) |
1464
047ed6e52a41
Added man page for prosodyctl
Dwayne Bent <dbb.0@liqd.org>
parents:
1454
diff
changeset
|
9 | MAN = $(DESTDIR)$(PREFIX)/share/man |
502
21dc299387a6
Installation improvements (auto-creation of data directories)
Matthew Wild <mwild1@gmail.com>
parents:
501
diff
changeset
|
10 | |
480
5d00d623904e
Update Makefile to set correct paths on install with Debian package
Matthew Wild <mwild1@gmail.com>
parents:
467
diff
changeset
|
11 | INSTALLEDSOURCE = $(PREFIX)/lib/prosody |
5d00d623904e
Update Makefile to set correct paths on install with Debian package
Matthew Wild <mwild1@gmail.com>
parents:
467
diff
changeset
|
12 | INSTALLEDCONFIG = $(SYSCONFDIR) |
5d00d623904e
Update Makefile to set correct paths on install with Debian package
Matthew Wild <mwild1@gmail.com>
parents:
467
diff
changeset
|
13 | INSTALLEDMODULES = $(PREFIX)/lib/prosody/modules |
502
21dc299387a6
Installation improvements (auto-creation of data directories)
Matthew Wild <mwild1@gmail.com>
parents:
501
diff
changeset
|
14 | INSTALLEDDATA = $(DATADIR) |
480
5d00d623904e
Update Makefile to set correct paths on install with Debian package
Matthew Wild <mwild1@gmail.com>
parents:
467
diff
changeset
|
15 | |
1310
b5a7a9fc9161
Makefile: Experimental support for recording the version of an installed Prosody
Matthew Wild <mwild1@gmail.com>
parents:
1300
diff
changeset
|
16 | all: prosody.install prosodyctl.install prosody.cfg.lua.install prosody.version |
586
b828d7d47973
Add posix support library, and adjust makefiles for it
Matthew Wild <mwild1@gmail.com>
parents:
514
diff
changeset
|
17 | $(MAKE) -C util-src install |
463
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 | |
1090
e47310ca513b
Makefile: Process and install prosodyctl
Matthew Wild <mwild1@gmail.com>
parents:
993
diff
changeset
|
19 | install: prosody.install prosodyctl.install prosody.cfg.lua.install util/encodings.so util/encodings.so util/pposix.so util/signal.so |
1300
954973fd2939
Makefile: Set data directory permissions to 750 on install [thanks Dwayne Bent]
Matthew Wild <mwild1@gmail.com>
parents:
1299
diff
changeset
|
20 | install -d $(BIN) $(CONFIG) $(MODULES) $(SOURCE) |
954973fd2939
Makefile: Set data directory permissions to 750 on install [thanks Dwayne Bent]
Matthew Wild <mwild1@gmail.com>
parents:
1299
diff
changeset
|
21 | install -m750 -d $(DATA) |
1464
047ed6e52a41
Added man page for prosodyctl
Dwayne Bent <dbb.0@liqd.org>
parents:
1454
diff
changeset
|
22 | install -d $(MAN)/man1 |
481
29f974ef00a7
More Makefile improvements (install the certificates, and update the config on install to find them)
Matthew Wild <mwild1@gmail.com>
parents:
480
diff
changeset
|
23 | install -d $(CONFIG)/certs |
1454
cc9b6ef41966
Makefile: Install fallbacks/ directory
Matthew Wild <mwild1@gmail.com>
parents:
1310
diff
changeset
|
24 | install -d $(SOURCE)/core $(SOURCE)/net $(SOURCE)/util $(SOURCE)/fallbacks |
1299
997ac65a85f4
Makefile: Specify permissions on installed executables [thanks mhavela]
Matthew Wild <mwild1@gmail.com>
parents:
1090
diff
changeset
|
25 | install -m755 ./prosody.install $(BIN)/prosody |
997ac65a85f4
Makefile: Specify permissions on installed executables [thanks mhavela]
Matthew Wild <mwild1@gmail.com>
parents:
1090
diff
changeset
|
26 | install -m755 ./prosodyctl.install $(BIN)/prosodyctl |
464 | 27 | install -m644 core/* $(SOURCE)/core |
28 | install -m644 net/* $(SOURCE)/net | |
29 | install -m644 util/* $(SOURCE)/util | |
1454
cc9b6ef41966
Makefile: Install fallbacks/ directory
Matthew Wild <mwild1@gmail.com>
parents:
1310
diff
changeset
|
30 | install -m644 fallbacks/* $(SOURCE)/fallbacks |
463
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 | install -m644 plugins/* $(MODULES) |
481
29f974ef00a7
More Makefile improvements (install the certificates, and update the config on install to find them)
Matthew Wild <mwild1@gmail.com>
parents:
480
diff
changeset
|
32 | install -m644 certs/* $(CONFIG)/certs |
29f974ef00a7
More Makefile improvements (install the certificates, and update the config on install to find them)
Matthew Wild <mwild1@gmail.com>
parents:
480
diff
changeset
|
33 | install -m644 plugins/* $(MODULES) |
1464
047ed6e52a41
Added man page for prosodyctl
Dwayne Bent <dbb.0@liqd.org>
parents:
1454
diff
changeset
|
34 | install -m644 man/prosodyctl.man $(MAN)/man1/prosodyctl.1 |
501
ea61e191043e
Don't overwrite config on make install if it already exists
Matthew Wild <mwild1@gmail.com>
parents:
494
diff
changeset
|
35 | test -e $(CONFIG)/prosody.cfg.lua || install -m644 prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua |
1310
b5a7a9fc9161
Makefile: Experimental support for recording the version of an installed Prosody
Matthew Wild <mwild1@gmail.com>
parents:
1300
diff
changeset
|
36 | test -e prosody.version && install prosody.version $(SOURCE)/prosody.version || true |
463
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
37 | $(MAKE) install -C util-src |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
38 | |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
39 | clean: |
467
66f145f5c932
Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents:
465
diff
changeset
|
40 | rm -f prosody.install |
1090
e47310ca513b
Makefile: Process and install prosodyctl
Matthew Wild <mwild1@gmail.com>
parents:
993
diff
changeset
|
41 | rm -f prosodyctl.install |
492
279f64370885
Don't write to prosody.cfg.lua from Makefile. Much apologies to poor albert :(
Matthew Wild <mwild1@gmail.com>
parents:
481
diff
changeset
|
42 | rm -f prosody.cfg.lua.install |
1310
b5a7a9fc9161
Makefile: Experimental support for recording the version of an installed Prosody
Matthew Wild <mwild1@gmail.com>
parents:
1300
diff
changeset
|
43 | rm -f prosody.version |
463
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
44 | $(MAKE) clean -C util-src |
464 | 45 | |
46 | util/encodings.so: | |
47 | $(MAKE) install -C util-src | |
48 | ||
49 | util/hashes.so: | |
50 | $(MAKE) install -C util-src | |
467
66f145f5c932
Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents:
465
diff
changeset
|
51 | |
586
b828d7d47973
Add posix support library, and adjust makefiles for it
Matthew Wild <mwild1@gmail.com>
parents:
514
diff
changeset
|
52 | util/pposix.so: |
b828d7d47973
Add posix support library, and adjust makefiles for it
Matthew Wild <mwild1@gmail.com>
parents:
514
diff
changeset
|
53 | $(MAKE) install -C util-src |
b828d7d47973
Add posix support library, and adjust makefiles for it
Matthew Wild <mwild1@gmail.com>
parents:
514
diff
changeset
|
54 | |
987
d55ec60331e7
Makefiles, util.signal: Add lsignal library for catching POSIX signals
Matthew Wild <mwild1@gmail.com>
parents:
586
diff
changeset
|
55 | util/signal.so: |
d55ec60331e7
Makefiles, util.signal: Add lsignal library for catching POSIX signals
Matthew Wild <mwild1@gmail.com>
parents:
586
diff
changeset
|
56 | $(MAKE) install -C util-src |
d55ec60331e7
Makefiles, util.signal: Add lsignal library for catching POSIX signals
Matthew Wild <mwild1@gmail.com>
parents:
586
diff
changeset
|
57 | |
467
66f145f5c932
Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents:
465
diff
changeset
|
58 | prosody.install: prosody |
514
03d7da01843e
Change sed usage back into one sed script for incompetent versions of sed
Matthew Wild <mwild1@gmail.com>
parents:
512
diff
changeset
|
59 | sed "s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \ |
03d7da01843e
Change sed usage back into one sed script for incompetent versions of sed
Matthew Wild <mwild1@gmail.com>
parents:
512
diff
changeset
|
60 | s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|; \ |
03d7da01843e
Change sed usage back into one sed script for incompetent versions of sed
Matthew Wild <mwild1@gmail.com>
parents:
512
diff
changeset
|
61 | s|^CFG_DATADIR=.*;$$|CFG_DATADIR='$(INSTALLEDDATA)';|; \ |
03d7da01843e
Change sed usage back into one sed script for incompetent versions of sed
Matthew Wild <mwild1@gmail.com>
parents:
512
diff
changeset
|
62 | s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" < prosody > prosody.install |
467
66f145f5c932
Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents:
465
diff
changeset
|
63 | |
1090
e47310ca513b
Makefile: Process and install prosodyctl
Matthew Wild <mwild1@gmail.com>
parents:
993
diff
changeset
|
64 | prosodyctl.install: prosodyctl |
e47310ca513b
Makefile: Process and install prosodyctl
Matthew Wild <mwild1@gmail.com>
parents:
993
diff
changeset
|
65 | sed "s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \ |
e47310ca513b
Makefile: Process and install prosodyctl
Matthew Wild <mwild1@gmail.com>
parents:
993
diff
changeset
|
66 | s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|; \ |
e47310ca513b
Makefile: Process and install prosodyctl
Matthew Wild <mwild1@gmail.com>
parents:
993
diff
changeset
|
67 | s|^CFG_DATADIR=.*;$$|CFG_DATADIR='$(INSTALLEDDATA)';|; \ |
e47310ca513b
Makefile: Process and install prosodyctl
Matthew Wild <mwild1@gmail.com>
parents:
993
diff
changeset
|
68 | s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" < prosodyctl > prosodyctl.install |
e47310ca513b
Makefile: Process and install prosodyctl
Matthew Wild <mwild1@gmail.com>
parents:
993
diff
changeset
|
69 | |
493
5f4416c53aeb
Fix missing prosody.cfg.lua.install
Matthew Wild <mwild1@gmail.com>
parents:
492
diff
changeset
|
70 | prosody.cfg.lua.install: |
492
279f64370885
Don't write to prosody.cfg.lua from Makefile. Much apologies to poor albert :(
Matthew Wild <mwild1@gmail.com>
parents:
481
diff
changeset
|
71 | sed 's|certs/|$(INSTALLEDCONFIG)/certs/|' prosody.cfg.lua.dist > prosody.cfg.lua.install |
481
29f974ef00a7
More Makefile improvements (install the certificates, and update the config on install to find them)
Matthew Wild <mwild1@gmail.com>
parents:
480
diff
changeset
|
72 | |
1310
b5a7a9fc9161
Makefile: Experimental support for recording the version of an installed Prosody
Matthew Wild <mwild1@gmail.com>
parents:
1300
diff
changeset
|
73 | prosody.release: |
b5a7a9fc9161
Makefile: Experimental support for recording the version of an installed Prosody
Matthew Wild <mwild1@gmail.com>
parents:
1300
diff
changeset
|
74 | test -e .hg/dirstate && hexdump -n6 -e'6/1 "%01x"' .hg/dirstate \ |
b5a7a9fc9161
Makefile: Experimental support for recording the version of an installed Prosody
Matthew Wild <mwild1@gmail.com>
parents:
1300
diff
changeset
|
75 | > prosody.version || true |
b5a7a9fc9161
Makefile: Experimental support for recording the version of an installed Prosody
Matthew Wild <mwild1@gmail.com>
parents:
1300
diff
changeset
|
76 | |
b5a7a9fc9161
Makefile: Experimental support for recording the version of an installed Prosody
Matthew Wild <mwild1@gmail.com>
parents:
1300
diff
changeset
|
77 | prosody.version: prosody.release |
b5a7a9fc9161
Makefile: Experimental support for recording the version of an installed Prosody
Matthew Wild <mwild1@gmail.com>
parents:
1300
diff
changeset
|
78 | cp prosody.release prosody.version || true |