Makefile
branchwindows
changeset 347 301479a4acdf
parent 227 8ce190faa5c2
child 348 b155c43eaa56
equal deleted inserted replaced
346:e26c9c9e5d99 347:301479a4acdf
     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 windows-add inituser-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 windows-add:
       
    71 	net user $(NEWUSER) foo /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 	ssh ${NEWUSER}@localhost "sh $(DESTDIR)$(LIBDIR)/init/hginit $(DESTDIR)$(LIBDIR)"
       
    79