From c130b480b6e0d327a15f9da9d89ede7f58da32d1 Mon Sep 17 00:00:00 2001 From: Jameson Rollins Date: Tue, 14 Sep 2010 12:26:58 -0400 Subject: [PATCH] fix specification of install directories in top level scripts. Various install paths were hard coded in the top level scripts. This was causing problems for non-standard install locations. Also added use of LOCALSTATEDIR variable to specify /var/lib path. --- Changelog | 7 +++++++ Makefile | 9 ++++++++- src/monkeysphere | 2 +- src/monkeysphere-authentication | 4 ++-- src/monkeysphere-host | 4 ++-- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Changelog b/Changelog index d3fdb1b..3850428 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,10 @@ +monkeysphere (0.32~pre) unstable; urgency=low + + * Fix specification of install paths in top level scripts (closes MS + #2491) + + -- Jameson Rollins Tue, 14 Sep 2010 12:24:35 -0400 + monkeysphere (0.31) unstable; urgency=low [ Daniel Kahn Gillmor ] diff --git a/Makefile b/Makefile index 6644927..4afec91 100755 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ ETCPREFIX ?= ETCSUFFIX ?= PREFIX ?= /usr MANPREFIX ?= $(PREFIX)/share/man +LOCALSTATEDIR ?= /var/lib # nothing actually needs to be built now. all: @@ -41,7 +42,13 @@ install: all installman mkdir -p $(DESTDIR)$(PREFIX)/share/doc/monkeysphere printf "Monkeysphere %s\n" $(MONKEYSPHERE_VERSION) > $(DESTDIR)$(PREFIX)/share/monkeysphere/VERSION install src/monkeysphere $(DESTDIR)$(PREFIX)/bin - install src/monkeysphere-host src/monkeysphere-authentication $(DESTDIR)$(PREFIX)/sbin + sed -i 's:__SYSSHAREDIR_PREFIX__:$(DESTDIR)$(PREFIX):' $(DESTDIR)$(PREFIX)/bin/monkeysphere + install src/monkeysphere-host $(DESTDIR)$(PREFIX)/sbin + sed -i 's:__SYSSHAREDIR_PREFIX__:$(DESTDIR)$(PREFIX):' $(DESTDIR)$(PREFIX)/sbin/monkeysphere-host + sed -i 's:__SYSDATADIR_PREFIX__:$(DESTDIR)$(LOCALSTATEDIR):' $(DESTDIR)$(PREFIX)/sbin/monkeysphere-host + install src/monkeysphere-authentication $(DESTDIR)$(PREFIX)/sbin + sed -i 's:__SYSSHAREDIR_PREFIX__:$(DESTDIR)$(PREFIX):' $(DESTDIR)$(PREFIX)/sbin/monkeysphere-authentication + sed -i 's:__SYSDATADIR_PREFIX__:$(DESTDIR)$(LOCALSTATEDIR):' $(DESTDIR)$(PREFIX)/sbin/monkeysphere-authentication install src/monkeysphere-authentication-keys-for-user $(DESTDIR)$(PREFIX)/share/monkeysphere install -m 0644 src/share/common $(DESTDIR)$(PREFIX)/share/monkeysphere install -m 0644 src/share/defaultenv $(DESTDIR)$(PREFIX)/share/monkeysphere diff --git a/src/monkeysphere b/src/monkeysphere index 8ce0c22..1cfafb6 100755 --- a/src/monkeysphere +++ b/src/monkeysphere @@ -16,7 +16,7 @@ set -e PGRM=$(basename $0) -SYSSHAREDIR=${MONKEYSPHERE_SYSSHAREDIR:-"/usr/share/monkeysphere"} +SYSSHAREDIR=${MONKEYSPHERE_SYSSHAREDIR:-"__SYSSHAREDIR_PREFIX__/share/monkeysphere"} export SYSSHAREDIR . "${SYSSHAREDIR}/defaultenv" . "${SYSSHAREDIR}/common" diff --git a/src/monkeysphere-authentication b/src/monkeysphere-authentication index af8c40d..4e447c7 100755 --- a/src/monkeysphere-authentication +++ b/src/monkeysphere-authentication @@ -19,12 +19,12 @@ set -o pipefail PGRM=$(basename $0) -SYSSHAREDIR=${MONKEYSPHERE_SYSSHAREDIR:-"/usr/share/monkeysphere"} +SYSSHAREDIR=${MONKEYSPHERE_SYSSHAREDIR:-"__SYSSHAREDIR_PREFIX__/share/monkeysphere"} export SYSSHAREDIR . "${SYSSHAREDIR}/defaultenv" . "${SYSSHAREDIR}/common" -SYSDATADIR=${MONKEYSPHERE_SYSDATADIR:-"/var/lib/monkeysphere"} +SYSDATADIR=${MONKEYSPHERE_SYSDATADIR:-"__SYSDATADIR_PREFIX__/monkeysphere"} export SYSDATADIR # sharedir for authentication functions diff --git a/src/monkeysphere-host b/src/monkeysphere-host index 6216dce..1eb5849 100755 --- a/src/monkeysphere-host +++ b/src/monkeysphere-host @@ -19,12 +19,12 @@ set -o pipefail PGRM=$(basename $0) -SYSSHAREDIR=${MONKEYSPHERE_SYSSHAREDIR:-"/usr/share/monkeysphere"} +SYSSHAREDIR=${MONKEYSPHERE_SYSSHAREDIR:-"__SYSSHAREDIR_PREFIX__/share/monkeysphere"} export SYSSHAREDIR . "${SYSSHAREDIR}/defaultenv" . "${SYSSHAREDIR}/common" -SYSDATADIR=${MONKEYSPHERE_SYSDATADIR:-"/var/lib/monkeysphere"} +SYSDATADIR=${MONKEYSPHERE_SYSDATADIR:-"__SYSDATADIR_PREFIX__/monkeysphere"} export SYSDATADIR # sharedir for host functions -- 2.26.2