summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-23 15:36:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-23 16:30:59 +0000
commit93d59c3176876b0990b27375458cf6518459bb07 (patch)
tree85403b3d9ac7f9df4b91195124b342dee81ec640 /Makefile
parentReleasing debian version 20180825-3. (diff)
downloadopen-infrastructure-compute-tools-93d59c3176876b0990b27375458cf6518459bb07.tar.xz
open-infrastructure-compute-tools-93d59c3176876b0990b27375458cf6518459bb07.zip
Merging upstream version 20190222.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile69
1 files changed, 38 insertions, 31 deletions
diff --git a/Makefile b/Makefile
index 2834779..9068d8c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,4 @@
-# Makefile
-
-# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2018 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
-SOFTWARE = container-tools
+PROJECT = open-infrastructure
+SOFTWARE = compute-tools
+PROGRAM = container
+
SCRIPTS = bin/* lib/*/*
all: build
@@ -57,18 +57,19 @@ build: share/man/*.txt
sed -n '/^NAME/,$$p' share/man/$(SOFTWARE).7.txt > README.txt
install: build
- mkdir -p $(DESTDIR)/etc/${SOFTWARE}/config
- mkdir -p $(DESTDIR)/etc/${SOFTWARE}/debconf
- mkdir -p $(DESTDIR)/etc/${SOFTWARE}/hooks
+ mkdir -p $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/config
+ mkdir -p $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/debconf
+ mkdir -p $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/hooks
mkdir -p $(DESTDIR)/usr/bin
cp -r bin/* $(DESTDIR)/usr/bin
- mkdir -p $(DESTDIR)/usr/lib/$(SOFTWARE)
- cp -r lib/* $(DESTDIR)/usr/lib/$(SOFTWARE)
+ mkdir -p $(DESTDIR)/usr/lib/$(PROJECT)
+ cp -r lib/* $(DESTDIR)/usr/lib/$(PROJECT)
- mkdir -p $(DESTDIR)/usr/share/$(SOFTWARE)
- cp -r VERSION.txt share/config share/hooks share/scripts ${DESTDIR}/usr/share/$(SOFTWARE)
+ mkdir -p $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)
+ cp -r VERSION.txt $(DESTDIR)/usr/share/$(PROJECT)/${PROGRAM}
+ cp -r share/config share/hooks share/scripts $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)
mkdir -p $(DESTDIR)/usr/share/bash-completion/completions
cp -r share/bash-completion/* $(DESTDIR)/usr/share/bash-completion/completions
@@ -99,28 +100,31 @@ install: build
ln -sf container.1 $(DESTDIR)/usr/share/man/man1/cnt.1
ln -sf container-shell $(DESTDIR)/usr/bin/cntsh
ln -sf container-shell.1 $(DESTDIR)/usr/share/man/man1/cntsh.1
- ln -sf container ${DESTDIR}/usr/share/bash-completion/completions/cnt
+ ln -sf container $(DESTDIR)/usr/share/bash-completion/completions/cnt
- ln -sf debconf ${DESTDIR}/usr/share/$(SOFTWARE)/scripts/debian
- ln -sf debconf.d ${DESTDIR}/usr/share/$(SOFTWARE)/scripts/debian.d
+ ln -sf debconf $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)/scripts/debian
+ ln -sf debconf.d $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)/scripts/debian.d
ln -sf container-create-debconf.1 $(DESTDIR)/usr/share/man/man1/container-create-debian.1
- ln -sf debconf ${DESTDIR}/usr/share/$(SOFTWARE)/scripts/progress-linux
- ln -sf debconf.d ${DESTDIR}/usr/share/$(SOFTWARE)/scripts/progress-linux.d
+ ln -sf debconf $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)/scripts/progress-linux
+ ln -sf debconf.d $(DESTDIR)/usr/share/$(PROJECT)/$(PROGRAM)/scripts/progress-linux.d
ln -sf container-create-debconf.1 $(DESTDIR)/usr/share/man/man1/container-create-progress-linux.1
- ln -sf console $(DESTDIR)/usr/lib/$(SOFTWARE)/container/con
- ln -sf list $(DESTDIR)/usr/lib/$(SOFTWARE)/container/ls
- ln -sf move $(DESTDIR)/usr/lib/$(SOFTWARE)/container/mv
- ln -sf remove $(DESTDIR)/usr/lib/$(SOFTWARE)/container/rm
- ln -sf version $(DESTDIR)/usr/lib/$(SOFTWARE)/container/ver
+ ln -sf console $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/con
+ ln -sf list $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/ls
+ ln -sf move $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/mv
+ ln -sf start $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/s
+ ln -sf status $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/st
+ ln -sf stop $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/t
+ ln -sf remove $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/rm
+ ln -sf version $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)/ver
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
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/var/log/$(PROJECT) || true
for FILE in share/systemd/*; \
do \
@@ -140,7 +144,9 @@ uninstall:
rm -f $(DESTDIR)/usr/share/man/man1/cnt.1
rm -f $(DESTDIR)/usr/bin/cntsh
rm -f $(DESTDIR)/usr/share/man/man1/cntsh.1
- rm -f ${DESTDIR}/usr/share/bash-completion/completions/cnt
+ rm -f $(DESTDIR)/usr/share/bash-completion/completions/cnt
+ rm -f $(DESTDIR)/usr/share/man/man1/container-create-progress-linux.1
+ rm -f $(DESTDIR)/usr/share/man/man1/container-create-debian.1
for FILE in share/sudo/*; \
do \
@@ -165,10 +171,10 @@ 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)/$(PROGRAM)
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share || true
- rm -rf $(DESTDIR)/usr/lib/$(SOFTWARE)
+ rm -rf $(DESTDIR)/usr/lib/$(PROJECT)/$(PROGRAM)
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/lib || true
for FILE in bin/*; \
@@ -177,10 +183,11 @@ uninstall:
done
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/bin || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/${SOFTWARE}/config || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/${SOFTWARE}/debconf || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/${SOFTWARE}/hooks || true
- rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/${SOFTWARE} || true
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/config || true
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/debconf || true
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM)/hooks || true
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT)/$(PROGRAM) || true
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc/$(PROJECT) || true
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/etc || true
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR) || true