Software /
code /
prosody
Annotate
Makefile @ 522:fc3df507afa2
Converted prosody.cfg.lua.dist to use windows end-of-lines
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 03 Dec 2008 19:56:05 +0500 |
parent | 503:00702b66beb1 |
child | 512:eb50ee09c2bb |
rev | line source |
---|---|
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) |
502
21dc299387a6
Installation improvements (auto-creation of data directories)
Matthew Wild <mwild1@gmail.com>
parents:
501
diff
changeset
|
9 |
480
5d00d623904e
Update Makefile to set correct paths on install with Debian package
Matthew Wild <mwild1@gmail.com>
parents:
467
diff
changeset
|
10 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
|
11 INSTALLEDCONFIG = $(SYSCONFDIR) |
5d00d623904e
Update Makefile to set correct paths on install with Debian package
Matthew Wild <mwild1@gmail.com>
parents:
467
diff
changeset
|
12 INSTALLEDMODULES = $(PREFIX)/lib/prosody/modules |
502
21dc299387a6
Installation improvements (auto-creation of data directories)
Matthew Wild <mwild1@gmail.com>
parents:
501
diff
changeset
|
13 INSTALLEDDATA = $(DATADIR) |
480
5d00d623904e
Update Makefile to set correct paths on install with Debian package
Matthew Wild <mwild1@gmail.com>
parents:
467
diff
changeset
|
14 |
502
21dc299387a6
Installation improvements (auto-creation of data directories)
Matthew Wild <mwild1@gmail.com>
parents:
501
diff
changeset
|
15 all: prosody.install prosody.cfg.lua.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
|
16 $(MAKE) all -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
|
17 |
494
457d0c750826
Yet another fix for the makefile :)
Matthew Wild <mwild1@gmail.com>
parents:
493
diff
changeset
|
18 install: prosody.install prosody.cfg.lua.install util/encodings.so util/encodings.so |
503
00702b66beb1
Makefile fix for creating datadir in correct place on install
Matthew Wild <mwild1@gmail.com>
parents:
502
diff
changeset
|
19 install -d $(BIN) $(CONFIG) $(MODULES) $(SOURCE) $(DATA) |
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
|
20 install -d $(CONFIG)/certs |
464 | 21 install -d $(SOURCE)/core $(SOURCE)/net $(SOURCE)/util |
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
|
22 install ./prosody.install $(BIN)/prosody |
464 | 23 install -m644 core/* $(SOURCE)/core |
24 install -m644 net/* $(SOURCE)/net | |
25 install -m644 util/* $(SOURCE)/util | |
463
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 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
|
27 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
|
28 install -m644 plugins/* $(MODULES) |
501
ea61e191043e
Don't overwrite config on make install if it already exists
Matthew Wild <mwild1@gmail.com>
parents:
494
diff
changeset
|
29 test -e $(CONFIG)/prosody.cfg.lua || install -m644 prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua |
463
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 $(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
|
31 |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 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
|
33 rm -f prosody.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
|
34 rm -f prosody.cfg.lua.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
|
35 $(MAKE) clean -C util-src |
464 | 36 |
37 util/encodings.so: | |
38 $(MAKE) install -C util-src | |
39 | |
40 util/hashes.so: | |
41 $(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
|
42 |
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
|
43 prosody.install: prosody |
502
21dc299387a6
Installation improvements (auto-creation of data directories)
Matthew Wild <mwild1@gmail.com>
parents:
501
diff
changeset
|
44 cp prosody prosody.install |
21dc299387a6
Installation improvements (auto-creation of data directories)
Matthew Wild <mwild1@gmail.com>
parents:
501
diff
changeset
|
45 sed -i "s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|;" prosody.install |
21dc299387a6
Installation improvements (auto-creation of data directories)
Matthew Wild <mwild1@gmail.com>
parents:
501
diff
changeset
|
46 sed -i "s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|;" prosody.install |
21dc299387a6
Installation improvements (auto-creation of data directories)
Matthew Wild <mwild1@gmail.com>
parents:
501
diff
changeset
|
47 sed -i "s|^CFG_DATADIR=.*;$$|CFG_DATADIR='$(INSTALLEDDATA)';|;" prosody.install |
21dc299387a6
Installation improvements (auto-creation of data directories)
Matthew Wild <mwild1@gmail.com>
parents:
501
diff
changeset
|
48 # The trailing slash is intentional in this one |
21dc299387a6
Installation improvements (auto-creation of data directories)
Matthew Wild <mwild1@gmail.com>
parents:
501
diff
changeset
|
49 sed -i "s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" 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
|
50 |
493
5f4416c53aeb
Fix missing prosody.cfg.lua.install
Matthew Wild <mwild1@gmail.com>
parents:
492
diff
changeset
|
51 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
|
52 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
|
53 |