diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2016-07-03 13:32:56 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2016-07-03 13:33:15 +0000 |
commit | aba24e71d2530941aae2e2151a72447f126990d1 (patch) | |
tree | 3306d2de2f70b5b8ca40c8f0c8ed14003df0ab8c /Makefile | |
parent | Adding debian version 20160601-1. (diff) | |
download | open-infrastructure-service-tools-aba24e71d2530941aae2e2151a72447f126990d1.tar.xz open-infrastructure-service-tools-aba24e71d2530941aae2e2151a72447f126990d1.zip |
Merging upstream version 20160701.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 42 |
1 files changed, 35 insertions, 7 deletions
@@ -1,6 +1,6 @@ # Makefile -# apache-icons - Tango Icon Theme for Apache Webserver +# apache-icons - Alternative icons for Apache autoindex # Copyright (C) 2014-2016 Daniel Baumann <daniel.baumann@open-infrastructure.net> # # This program is free software: you can redistribute it and/or modify @@ -18,9 +18,13 @@ SHELL := sh -e +SOFTWARE = apache-icons + all: build -build: +build: share/man/*.txt + $(MAKE) -C share/man + for ICON in share/icons/*; \ do \ ICON="$$(basename $${ICON})"; \ @@ -41,15 +45,15 @@ build: done install: build - mkdir -p $(DESTDIR)/usr/share/apache-icons - cp -a build/* $(DESTDIR)/usr/share/apache-icons + mkdir -p $(DESTDIR)/usr/share/$(SOFTWARE) + cp -a build/* $(DESTDIR)/usr/share/$(SOFTWARE) - for DIRECTORY in $(DESTDIR)/usr/share/apache-icons/*-png; \ + for DIRECTORY in $(DESTDIR)/usr/share/$(SOFTWARE)/*-png; \ do \ cp -a share/common/*.png $${DIRECTORY}; \ done - for DIRECTORY in $(DESTDIR)/usr/share/apache-icons/*-svg; \ + for DIRECTORY in $(DESTDIR)/usr/share/$(SOFTWARE)/*-svg; \ do \ cp -a share/common/*.svg $${DIRECTORY}; \ done @@ -60,10 +64,34 @@ install: build mkdir -p $(DESTDIR)/etc/apache2/mods-available cp -a share/apache/mods/* $(DESTDIR)/etc/apache2/mods-available + for SECTION in $$(seq 1 8); \ + do \ + if ls share/man/*.$${SECTION} > /dev/null 2>&1; \ + then \ + mkdir -p $(DESTDIR)/usr/share/man/man$${SECTION}; \ + cp share/man/*.$${SECTION} $(DESTDIR)/usr/share/man/man$${SECTION}; \ + fi; \ + done + uninstall: - rm -rf $(DESTDIR)/usr/share/apache-icons + for SECTION in $$(seq 1 8); \ + do \ + for FILE in share/man/*.$${SECTION}; \ + do \ + if [ -e "$${FILE}" ]; \ + then \ + rm -f $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${FILE}); \ + fi; \ + done; \ + rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share/man/man$${SECTION} || true; \ + done + + rm -rf $(DESTDIR)/usr/share/$(SOFTWARE)/* + rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share/$(SOFTWARE) || true clean: + $(MAKE) -C share/man clean + rm -rf build distclean: clean |