author | Matthew Wild <mwild1@gmail.com> |
Sat, 26 Feb 2011 00:23:48 +0000 | |
changeset 4216 | ff80a8471e86 |
child 4224 | 8b8d2b8e4d0b |
permissions | -rw-r--r-- |
4216
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 |
|
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 |
include ../../config.unix |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 |
|
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 |
BIN = $(DESTDIR)$(PREFIX)/bin |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 |
CONFIG = $(DESTDIR)$(SYSCONFDIR) |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 |
SOURCE = $(DESTDIR)$(PREFIX)/lib/prosody |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 |
DATA = $(DESTDIR)$(DATADIR) |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 |
MAN = $(DESTDIR)$(PREFIX)/share/man |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 |
|
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
10 |
INSTALLEDSOURCE = $(PREFIX)/lib/prosody |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 |
INSTALLEDCONFIG = $(SYSCONFDIR) |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 |
INSTALLEDMODULES = $(PREFIX)/lib/prosody/modules |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 |
INSTALLEDDATA = $(DATADIR) |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 |
|
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 |
SOURCE_FILES = main.lua migrator/*.lua |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 |
|
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 |
all: prosody-migrator.install migrator.cfg.lua.install $(SOURCE_FILES) |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 |
|
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 |
install: prosody-migrator.install migrator.cfg.lua.install |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 |
install -d $(BIN) $(CONFIG) $(SOURCE) $(SOURCE)/migrator |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 |
install -d $(MAN)/man1 |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 |
install -d $(SOURCE)/migrator |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 |
install -m755 ./prosody-migrator.install $(BIN)/prosody-migrator |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 |
install -m644 $(SOURCE_FILES) $(SOURCE)/migrator |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 |
test -e $(CONFIG)/migrator.cfg.lua || install -m644 migrator.cfg.lua.install $(CONFIG)/migrator.cfg.lua |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 |
|
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 |
clean: |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 |
rm -f prosody-migrator.install |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 |
rm -f migrator.cfg.lua.install |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 |
|
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 |
prosody-migrator.install: main.lua |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 |
sed "s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \ |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
33 |
s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|;" \ |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
34 |
< main.lua > prosody-migrator.install |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
35 |
|
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
36 |
migrator.cfg.lua.install: migrator.cfg.lua |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
37 |
sed "s|^local data_path = .*;$$|local data_path = '$(INSTALLEDDATA)';|;" \ |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
38 |
< migrator.cfg.lua > migrator.cfg.lua.install |