diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bb44552 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +# 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 + + +CSSDIR:= css +CSS!= ls $(CSSDIR)/*.css + +.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) + +.PHONY: deinstall +deinstall: + rm -rf $(PREFIX)/static/$(NAME) + rm -f $(PREFIX)/data/plugin/theme/$(NAME).py diff --git a/README.md b/README.md new file mode 100644 index 0000000..0dab3e4 --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +# Acaro + +A theme for MoinMoin. + +## How to install + +Once you're connected to the server via SSH run the following commands as root. + + git clone --depth 1 https://git.unit.macaomilano.org/unit/moinmoin-acaro.git + cd moinmoin-acaro + make install + +## How to develop and test + +### Installing MoinMoin locally + +All you need is Python 2 (Python 3 is not supported and will likely never be) +and python-virtualenv. + +Replace `/tmp/moin` with the path you want to install MoinMoin in. + + mkdir /tmp/moin + cd /tmp/moin + + virtualenv -p python2 env + source env/bin/activate + pip install moin + + mkdir wiki + cp -pr env/share/moin/{data,config,underlay} wiki/ + 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 + +### Running MoinMoin + +From now on you just need to activate the python virtualenv and execute the +following command to run a working testing MoinMoin instance. + + cd /tmp/moin + source env/bin/activate + moin --config-dir=wiki server standalone + +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!