Makefile
changeset 355 63d8fe4e9450
parent 349 b271be84da5e
equal deleted inserted replaced
354:70d9be61232d 355:63d8fe4e9450
     3 PREFIX=/usr/local/share
     3 PREFIX=/usr/local/share
     4 LIBDIR=$(PREFIX)/mercurial-server
     4 LIBDIR=$(PREFIX)/mercurial-server
     5 DOCDIR=$(PREFIX)/doc/mercurial-server
     5 DOCDIR=$(PREFIX)/doc/mercurial-server
     6 ETCDIR=/etc/mercurial-server
     6 ETCDIR=/etc/mercurial-server
     7 NEWUSER=hg
     7 NEWUSER=hg
     8 DOCBOOK_XSL=/usr/share/xml/docbook/stylesheet/nwalsh
     8 DOCBOOK_XSL?=/usr/share/xml/docbook/stylesheet/nwalsh
     9 
     9 
    10 INSTALL=install
    10 INSTALL=install
    11 
    11 
    12 build: build/html/index.html pythonbuild
    12 build: build/html/index.html pythonbuild
    13 
    13 
    14 setup-adduser: installfiles adduser inituser
    14 setup-adduser: installfiles adduser inituser
    15 
    15 
    16 # WARNING: this is experimental
    16 # WARNING: this is experimental
    17 setup-useradd: installfiles useradd inituser
    17 setup-useradd: installfiles useradd inituser
       
    18 
       
    19 # WARNING: this is experimental
       
    20 setup-windows: installfiles adduser-windows
    18 
    21 
    19 installetc:
    22 installetc:
    20 	$(INSTALL) -d $(DESTDIR)$(ETCDIR)
    23 	$(INSTALL) -d $(DESTDIR)$(ETCDIR)
    21 	$(INSTALL) -m 644 -t $(DESTDIR)$(ETCDIR) \
    24 	$(INSTALL) -m 644 -t $(DESTDIR)$(ETCDIR) \
    22 	    src/init/conf/access.conf
    25 	    src/init/conf/access.conf
    61 useradd:
    64 useradd:
    62 	useradd --system --shell /bin/sh \
    65 	useradd --system --shell /bin/sh \
    63 	    --home /var/lib/mercurial-server --create-home \
    66 	    --home /var/lib/mercurial-server --create-home \
    64 	    --comment  "Mercurial repositories" $(NEWUSER)
    67 	    --comment  "Mercurial repositories" $(NEWUSER)
    65 
    68 
       
    69 # WARNING: this is experimental
       
    70 adduser-windows:
       
    71 	net user $(NEWUSER) /add
       
    72 
    66 inituser:
    73 inituser:
    67 	su -l -c "$(DESTDIR)$(LIBDIR)/init/hginit $(DESTDIR)$(LIBDIR)" $(NEWUSER)
    74 	su -l -c "$(DESTDIR)$(LIBDIR)/init/hginit $(DESTDIR)$(LIBDIR)" $(NEWUSER)
    68 
    75 
       
    76 # WARNING: this is experimental
       
    77 inituser-windows:
       
    78 	mkdir /home/$(NEWUSER)
       
    79 	chown $(NEWUSER) /home/$(NEWUSER)
       
    80 	chmod 755 $(DESTDIR)$(LIBDIR)/init/*
       
    81 	ssh $(NEWUSER)@localhost "sh $(DESTDIR)$(LIBDIR)/init/hginit $(DESTDIR)$(LIBDIR)"
       
    82