summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-03-02 18:44:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-03-02 18:44:56 +0000
commit80a356951efdc3fdf0aed0b43780711969312743 (patch)
tree7f37c29de70671f4f615142e24ffe433319f5a56 /Makefile
parentAdding upstream version 20180915. (diff)
downloadopen-infrastructure-storage-tools-80a356951efdc3fdf0aed0b43780711969312743.tar.xz
open-infrastructure-storage-tools-80a356951efdc3fdf0aed0b43780711969312743.zip
Adding upstream version 20190301.upstream/20190301
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--Makefile43
1 files changed, 23 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index d31901a..2228019 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,4 @@
-# Makefile
-
-# storage-tools - Additional utilities to manage storage related tasks
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -20,7 +17,10 @@
SHELL := sh -e
+PROJECT = open-infrastructure
SOFTWARE = storage-tools
+PROGRAM = ceph-tools
+
SCRIPTS = bin/*
all: build
@@ -60,21 +60,27 @@ install: build
mkdir -p $(DESTDIR)/usr/bin
cp -r bin/* $(DESTDIR)/usr/bin
+ mkdir -p $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)
+ cp -r VERSION.txt $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)
+
+ mkdir -p $(DESTDIR)/etc/apache2/conf-available
+ cp -a share/apache/conf/* $(DESTDIR)/etc/apache2/conf-available
+
mkdir -p $(DESTDIR)/etc/cron.d
cp -r share/cron/* $(DESTDIR)/etc/cron.d
mkdir -p $(DESTDIR)/etc/logrotate.d
cp -r share/logrotate/* $(DESTDIR)/etc/logrotate.d
- mkdir -p $(DESTDIR)/usr/share/$(SOFTWARE)
- cp -r share/ceph-info $(DESTDIR)/usr/share/$(SOFTWARE)
+ mkdir -p $(DESTDIR)/lib/systemd/system
+ cp -r share/systemd/* $(DESTDIR)/lib/systemd/system
+
+ mkdir -p $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)
+ cp -r share/ceph-info $(DESTDIR)/usr/share/$(PROJECT)
mkdir -p $(DESTDIR)/usr/share/doc/$(SOFTWARE)
cp -r CHANGELOG.txt LICENSE.txt README.txt share/doc/* $(DESTDIR)/usr/share/doc/$(SOFTWARE)
- mkdir -p $(DESTDIR)/etc/apache2/conf-available
- cp -a share/apache/conf/* $(DESTDIR)/etc/apache2/conf-available
-
for SECTION in $$(seq 1 8); \
do \
if ls share/man/*.$${SECTION} > /dev/null 2>&1; \
@@ -84,18 +90,10 @@ install: build
fi; \
done
- mkdir -p $(DESTDIR)/lib/systemd/system
- cp -r share/systemd/* $(DESTDIR)/lib/systemd/system
-
- mkdir -p $(DESTDIR)/var/log/$(SOFTWARE)
+ mkdir -p $(DESTDIR)/var/log/$(PROJECT)
uninstall:
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/var/log/$(SOFTWARE) || true
-
- for FILE in share/systemd*; \
- do \
- rm -f $(DESTDIR)/lib/systemd/system/$$(basename $${FILE}); \
- done
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/var/log/$(PROJECT) || true
for SECTION in $$(seq 1 8); \
do \
@@ -106,6 +104,11 @@ uninstall:
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share/man/man$${SECTION} || true; \
done
+ for FILE in share/systemd*; \
+ do \
+ rm -f $(DESTDIR)/lib/systemd/system/$$(basename $${FILE}); \
+ done
+
for FILE in share/logrotate/*; \
do \
rm -f $(DESTDIR)/etc/logrotate.d/$$(basename $${FILE}); \
@@ -125,7 +128,7 @@ uninstall:
rm -rf $(DESTDIR)/usr/share/doc/$(SOFTWARE)
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share/doc || true
- rm -rf $(DESTDIR)/usr/share/$(SOFTWARE)
+ rm -rf $(DESTDIR)/usr/share/$(PROJECT)/$(SOFTWARE)
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share || true
for FILE in bin/*; \