1 #!/usr/bin/env make -f |
1 #!/usr/bin/env make -f |
2 |
2 |
3 TOPDIR= |
3 PREFIX=/usr/local/share |
4 PREFIX=$(TOPDIR)/usr/local/share |
|
5 LIBDIR=$(PREFIX)/mercurial-server |
4 LIBDIR=$(PREFIX)/mercurial-server |
6 DOCDIR=$(PREFIX)/doc/mercurial-server |
5 DOCDIR=$(PREFIX)/doc/mercurial-server |
7 ETCDIR=$(TOPDIR)/etc/mercurial-server |
6 ETCDIR=/etc/mercurial-server |
8 NEWUSER=hg |
7 NEWUSER=hg |
9 |
8 |
10 INSTALL=install |
9 INSTALL=install |
11 |
10 |
12 build: build/html/index.html pythonbuild |
11 build: build/html/index.html pythonbuild |
15 |
14 |
16 # WARNING: this is experimental |
15 # WARNING: this is experimental |
17 setup-useradd: installfiles useradd inituser |
16 setup-useradd: installfiles useradd inituser |
18 |
17 |
19 installetc: |
18 installetc: |
20 $(INSTALL) -d $(ETCDIR) |
19 $(INSTALL) -d $(DESTDIR)$(ETCDIR) |
21 $(INSTALL) -m 644 -t $(ETCDIR) \ |
20 $(INSTALL) -m 644 -t $(DESTDIR)$(ETCDIR) \ |
22 src/init/conf/remote-hgrc src/init/conf/access.conf |
21 src/init/conf/remote-hgrc src/init/conf/access.conf |
23 $(INSTALL) -d $(ETCDIR)/keys/root |
22 $(INSTALL) -d $(DESTDIR)$(ETCDIR)/keys/root |
24 $(INSTALL) -d $(ETCDIR)/keys/users |
23 $(INSTALL) -d $(DESTDIR)$(ETCDIR)/keys/users |
25 |
24 |
26 installdoc: build/html/index.html |
25 installdoc: build/html/index.html |
27 $(INSTALL) -d $(DOCDIR) |
26 $(INSTALL) -d $(DESTDIR)$(DOCDIR) |
28 $(INSTALL) -m 644 -t $(DOCDIR) README |
27 $(INSTALL) -m 644 -t $(DESTDIR)$(DOCDIR) README |
29 $(INSTALL) -d $(DOCDIR)/html |
28 $(INSTALL) -d $(DESTDIR)$(DOCDIR)/html |
30 $(INSTALL) -m 644 -t $(DOCDIR)/html build/html/index.html |
29 $(INSTALL) -m 644 -t $(DESTDIR)$(DOCDIR)/html build/html/index.html |
31 |
30 |
32 build/html/index.html: doc/manual.docbook |
31 build/html/index.html: doc/manual.docbook |
33 xsltproc --nonet -o $@ /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl $^ |
32 xsltproc --nonet -o $@ /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl $^ |
34 |
33 |
35 build/pdf/manual.pdf: doc/manual.docbook |
34 build/pdf/manual.pdf: doc/manual.docbook |
39 pythonbuild: |
38 pythonbuild: |
40 python setup.py build |
39 python setup.py build |
41 |
40 |
42 pythoninstall: |
41 pythoninstall: |
43 python setup.py install \ |
42 python setup.py install \ |
44 --install-purelib=$(LIBDIR) \ |
43 --install-purelib=$(DESTDIR)$(LIBDIR) \ |
45 --install-platlib=$(LIBDIR) \ |
44 --install-platlib=$(DESTDIR)$(LIBDIR) \ |
46 --install-scripts=$(LIBDIR) \ |
45 --install-scripts=$(DESTDIR)$(LIBDIR) \ |
47 --install-data=$(LIBDIR) |
46 --install-data=$(DESTDIR)$(LIBDIR) |
48 |
47 |
49 installfiles: installetc installdoc pythoninstall |
48 installfiles: installetc installdoc pythoninstall |
50 |
49 |
51 adduser: |
50 adduser: |
52 adduser --system --shell /bin/sh --group --disabled-password \ |
51 adduser --system --shell /bin/sh --group --disabled-password \ |