summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2016-07-03 13:32:49 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2016-07-03 13:32:49 +0000
commitdf429436bed32fcf8c07445b90983d595fd8c733 (patch)
tree9fa5757807bde45ec7b44e1df174ee1ab6e2d9f5 /Makefile
parentAdding upstream version 20160601. (diff)
downloadopen-infrastructure-service-tools-df429436bed32fcf8c07445b90983d595fd8c733.tar.xz
open-infrastructure-service-tools-df429436bed32fcf8c07445b90983d595fd8c733.zip
Adding upstream version 20160701.upstream/20160701
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile42
1 files changed, 35 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 2b74b53..537f053 100644
--- a/Makefile
+++ b/Makefile
@@ -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