author | Paul Crowley <paul@lshift.net> |
Tue, 17 Nov 2009 12:15:21 +0000 | |
changeset 219 | 0af8ec73cb44 |
parent 203 | d27b41424efb |
child 218 | ddd0f0d12e12 |
child 221 | c4c3facf5d6b |
permissions | -rw-r--r-- |
168
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
1 |
#!/usr/bin/env make -f |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
2 |
|
203
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
3 |
PREFIX=/usr/local/share |
168
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
4 |
LIBDIR=$(PREFIX)/mercurial-server |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
5 |
DOCDIR=$(PREFIX)/doc/mercurial-server |
203
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
6 |
ETCDIR=/etc/mercurial-server |
168
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
7 |
NEWUSER=hg |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
8 |
|
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
9 |
INSTALL=install |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
10 |
|
169
6b34a5421330
Make the build target default
Paul Crowley <paul@lshift.net>
parents:
168
diff
changeset
|
11 |
build: build/html/index.html pythonbuild |
6b34a5421330
Make the build target default
Paul Crowley <paul@lshift.net>
parents:
168
diff
changeset
|
12 |
|
168
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
13 |
setup-adduser: installfiles adduser inituser |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
14 |
|
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
15 |
# WARNING: this is experimental |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
16 |
setup-useradd: installfiles useradd inituser |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
17 |
|
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
18 |
installetc: |
203
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
19 |
$(INSTALL) -d $(DESTDIR)$(ETCDIR) |
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
20 |
$(INSTALL) -m 644 -t $(DESTDIR)$(ETCDIR) \ |
168
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
21 |
src/init/conf/remote-hgrc src/init/conf/access.conf |
203
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
22 |
$(INSTALL) -d $(DESTDIR)$(ETCDIR)/keys/root |
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
23 |
$(INSTALL) -d $(DESTDIR)$(ETCDIR)/keys/users |
168
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
24 |
|
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
25 |
installdoc: build/html/index.html |
203
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
26 |
$(INSTALL) -d $(DESTDIR)$(DOCDIR) |
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
27 |
$(INSTALL) -m 644 -t $(DESTDIR)$(DOCDIR) README |
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
28 |
$(INSTALL) -d $(DESTDIR)$(DOCDIR)/html |
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
29 |
$(INSTALL) -m 644 -t $(DESTDIR)$(DOCDIR)/html build/html/index.html |
168
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
30 |
|
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
31 |
build/html/index.html: doc/manual.docbook |
202
8f15d7d90f08
Never access the net during xslt - recommended by jwilk@#debian-mentors
Paul Crowley <paul@lshift.net>
parents:
194
diff
changeset
|
32 |
xsltproc --nonet -o $@ /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl $^ |
168
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
33 |
|
184
ec3047e1dadc
Add PDF building to Makefile
Paul Crowley <paul@lshift.net>
parents:
173
diff
changeset
|
34 |
build/pdf/manual.pdf: doc/manual.docbook |
ec3047e1dadc
Add PDF building to Makefile
Paul Crowley <paul@lshift.net>
parents:
173
diff
changeset
|
35 |
mkdir -p build/pdf |
ec3047e1dadc
Add PDF building to Makefile
Paul Crowley <paul@lshift.net>
parents:
173
diff
changeset
|
36 |
fop -xml $^ -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl $@ |
ec3047e1dadc
Add PDF building to Makefile
Paul Crowley <paul@lshift.net>
parents:
173
diff
changeset
|
37 |
|
168
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
38 |
pythonbuild: |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
39 |
python setup.py build |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
40 |
|
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
41 |
pythoninstall: |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
42 |
python setup.py install \ |
203
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
43 |
--install-purelib=$(DESTDIR)$(LIBDIR) \ |
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
44 |
--install-platlib=$(DESTDIR)$(LIBDIR) \ |
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
45 |
--install-scripts=$(DESTDIR)$(LIBDIR) \ |
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
46 |
--install-data=$(DESTDIR)$(LIBDIR) |
168
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
47 |
|
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
48 |
installfiles: installetc installdoc pythoninstall |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
49 |
|
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
50 |
adduser: |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
51 |
adduser --system --shell /bin/sh --group --disabled-password \ |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
52 |
--home /var/lib/mercurial-server \ |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
53 |
--gecos "Mercurial repositories" $(NEWUSER) |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
54 |
|
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
55 |
# WARNING: this is experimental |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
56 |
useradd: |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
57 |
useradd --system --shell /bin/sh \ |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
58 |
--home /var/lib/mercurial-server --create-home \ |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
59 |
--comment "Mercurial repositories" $(NEWUSER) |
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
60 |
|
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
61 |
inituser: |
203
d27b41424efb
Use DESTDIR instead of TOPDIR
Paul Crowley <paul@lshift.net>
parents:
202
diff
changeset
|
62 |
su -l -c "$(DESTDIR)$(LIBDIR)/init/hginit $(DESTDIR)$(LIBDIR)" $(NEWUSER) |
168
f9bf8f84df7f
Kill install in favour of setup.py and Makefile
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
63 |