Fix testing environment.

master
crudo 2017-08-26 19:24:17 +02:00
parent 8f961d7022
commit b6130f42be
2 changed files with 38 additions and 30 deletions

View File

@ -1,27 +1,32 @@
# This makefile must be compatible with both gmake and bmake. Keep it like that.
PREFIX?= /iocage/jails/moinmoin/root/var/moinmoin
UID?= 165
GID?= 165
NAME:= acaro
IMGDIR:= img
IMG!= ls $(IMGDIR)/*.png
IMGDIR:= $(PREFIX)/static/$(NAME)/img
IMG!= ls img/*.png
CSSDIR:= $(PREFIX)/static/$(NAME)/css
CSS!= ls css/*.css
CSSDIR:= css
CSS!= ls $(CSSDIR)/*.css
.ifdef TEST
IMGDIR:= $(PREFIX)/../env/lib/python2.7/site-packages/MoinMoin/web/static/htdocs/$(NAME)/img
CSSDIR:= $(PREFIX)/../env/lib/python2.7/site-packages/MoinMoin/web/static/htdocs/$(NAME)/css
UID!= id -u
GID!= id -g
.endif
.PHONY: install
install:
install -o $(UID) -g $(GID) -m 644 $(NAME).py $(PREFIX)/data/plugin/theme/
install -o $(UID) -g $(GID) -m 664 -d $(PREFIX)/static/$(NAME)/$(IMGDIR)
install -o $(UID) -g $(GID) -m 664 $(IMG) $(PREFIX)/static/$(NAME)/$(IMGDIR)
install -o $(UID) -g $(GID) -m 664 -d $(PREFIX)/static/$(NAME)/$(CSSDIR)
install -o $(UID) -g $(GID) -m 664 $(CSS) $(PREFIX)/static/$(NAME)/$(CSSDIR)
install -o $(UID) -g $(GID) -m 755 -d $(IMGDIR)
install -o $(UID) -g $(GID) -m 664 $(IMG) $(IMGDIR)
install -o $(UID) -g $(GID) -m 755 -d $(CSSDIR)
install -o $(UID) -g $(GID) -m 664 $(CSS) $(CSSDIR)
.PHONY: deinstall
deinstall:
rm -rf $(PREFIX)/static/$(NAME)
rm -rf $(IMGDIR)
rm -rf $(CSSDIR)
rm -f $(PREFIX)/data/plugin/theme/$(NAME).py

View File

@ -12,6 +12,8 @@ Once you're connected to the server via SSH run the following commands as root.
## How to develop and test
If you're running linux make sure you're using BSD Make (bmake).
### Installing MoinMoin locally
All you need is Python 2 (Python 3 is not supported and will likely never be)
@ -31,9 +33,26 @@ Replace `/tmp/moin` with the path you want to install MoinMoin in.
cp -pr env/share/moin/config/wikiconfig.py wiki/
moin --config-dir=wiki account create --name=admin --email=admin@localhost --password=admin
sed -i '/FrontPage/s/#//g' wiki/wikiconfig.py
sed -i '/superuser.*YourName/s/#//g' wiki/wikiconfig.py
sed -i '/superuser.*YourName/s/YourName/admin/g' wiki/wikiconfig.py
sed -i "/FrontPage/s/#//g" wiki/wikiconfig.py
sed -i "/superuser.*YourName/s/#//g" wiki/wikiconfig.py
sed -i "/superuser.*YourName/s/YourName/admin/g" wiki/wikiconfig.py
sed -i "/wikiconfig_dir = /s/os\.path\.abspath.*/'\/tmp\/moin\/wiki\/'/g" wiki/wikiconfig.py
### Installing Acaro in the test environment
Replace `/tmp/moin` with the path you have installed MoinMoin in.
git clone --depth 1 https://git.unit.macaomilano.org/unit/moinmoin-acaro.git
cd moinmoin-acaro
Eventually run the following command as command as root.
PREFIX=/tmp/moin/wiki TEST=yes bmake install
To enable the theme in the settings run the followin command.
cd /tmp/moin
sed -i "/theme_default/s/modernized/acaro/" wiki/wikiconfig.py
### Running MoinMoin
@ -48,20 +67,4 @@ Something like this will show up. Follow the link to be greeted by MoinMoin.
2017-08-26 12:32:14,027 INFO werkzeug:87 * Running on http://localhost:8080/ (Press CTRL+C to quit)
### Installing Acaro in the test environment
Replace `/tmp/moin` with the path you have installed MoinMoin in.
git clone --depth 1 https://git.unit.macaomilano.org/unit/moinmoin-acaro.git
cd moinmoin-acaro
Eventually run the following command as command as root.
PREFIX=/tmp/moin/wiki UID=$(id -u) GID=$(id -g) make install
To enable the theme in the settings run the followin command.
cd /tmp/moin
sed -i "/theme_default/s/^\w+.*/theme_default = 'acaro'/" wiki/wikiconfig.py
You're ready to go!