moinmoin-acaro/Makefile

33 lines
845 B
Makefile

PREFIX?= /var/www/moinwiki
UID?= 165
GID?= 165
NAME:= acaro
IMGDIR:= $(PREFIX)/static/$(NAME)/img
IMG!= ls img/*.png
CSSDIR:= $(PREFIX)/static/$(NAME)/css
CSS!= ls css/*.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 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 $(IMGDIR)
rm -rf $(CSSDIR)
rm -f $(PREFIX)/data/plugin/theme/$(NAME).py