summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-03-09 12:41:46 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2015-03-09 12:42:23 -0500
commite525b169f2879456e8f4c507633180ce63b26e28 (patch)
treede562ced1d92709e3222b34486362a6e8032e0ef /tools
parent63c4f8ad3f175b51382c2c4af885baf04d1c613b (diff)
attempt to remove major version hard-coding from linux packaging tools
Diffstat (limited to 'tools')
-rwxr-xr-xtools/linux_packaging/build8
-rwxr-xr-xtools/linux_packaging/stage2.run12
-rw-r--r--tools/linux_packaging/uninstall.sh.in7
3 files changed, 15 insertions, 12 deletions
diff --git a/tools/linux_packaging/build b/tools/linux_packaging/build
index 3bddd16b6b..3d88076441 100755
--- a/tools/linux_packaging/build
+++ b/tools/linux_packaging/build
@@ -14,6 +14,8 @@ ARDOURSTACK_ROOT=$HOME/a3/inst
# the waf build tree to use when copying built/generated files
BUILD_ROOT=../../build
+. ../define_versions.sh
+
# where harvid and xjadeo binaries are cached
if test -z "$CACHEDIR" -o ! -d "$CACHEDIR"; then
CACHEDIR=`pwd`
@@ -233,8 +235,8 @@ echo export 'PATH=/usr/local/bin:/opt/bin:$PATH' >> $ENVIRONMENT
# create startup helper script
-sed -e "/^%ENV%/r $ENVIRONMENT" -e '/^%ENV%/d' -e 's/%VER%/'"${release_version}"'/' < ardour.sh.in > $APPBIN/ardour3
-rm $ENVIRONMENT && chmod 775 $APPBIN/ardour3
+sed -e "/^%ENV%/r $ENVIRONMENT" -e '/^%ENV%/d' -e 's/%VER%/'"${release_version}"'/' < ardour.sh.in > $APPBIN/ardour${major_version}
+rm $ENVIRONMENT && chmod 775 $APPBIN/ardour${major_version}
MAIN_EXECUTABLE=ardour-${release_version}
echo "Copying ardour executable ...."
@@ -638,7 +640,7 @@ fi
#
# Add the uninstaller
#
-sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_VERSION%/${release_version}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh
+sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_MAJOR_VERSION%/${major_version}/" -e "s/%REPLACE_VERSION%/${release_version}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh
chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
#Sanity Check file
diff --git a/tools/linux_packaging/stage2.run b/tools/linux_packaging/stage2.run
index effc97b636..061edeb6cc 100755
--- a/tools/linux_packaging/stage2.run
+++ b/tools/linux_packaging/stage2.run
@@ -8,11 +8,11 @@
#
###################################
-
+MAJOR_VERSION=3
PGM_NAME="Ardour"
PGM_VENDOR="Ardour"
-PGM_EXEC_FILE="ardour3"
+PGM_EXEC_FILE="ardour${MAJOR_VERSION}"
THE_SHELL="/bin/sh"
@@ -500,16 +500,16 @@ ${SUPER} cp -f ${BUNDLE_DIR}/bin/*.uninstall.sh ${INSTALL_DEST_BASE}/.
# Create link to the program in user bin
echo ""
-echo "Creating link ${PGM_NAME}3 in ${USER_BIN_DIR}"
+echo "Creating link ${PGM_NAME}${MAJOR_VERSION} in ${USER_BIN_DIR}"
echo ""
if [ -d "${USER_BIN_DIR}" ]; then
- if [ -e "${USER_BIN_DIR}/${PGM_NAME}3" ]; then
- ${SUPER} rm -f ${USER_BIN_DIR}/${PGM_NAME}3
+ if [ -e "${USER_BIN_DIR}/${PGM_NAME}${MAJOR_VERSION}" ]; then
+ ${SUPER} rm -f ${USER_BIN_DIR}/${PGM_NAME}${MAJOR_VERSION}
fi
cd "${USER_BIN_DIR}"
- ${SUPER} ln -sf ${PGM_EXEC_PATH} ${PGM_NAME}3
+ ${SUPER} ln -sf ${PGM_EXEC_PATH} ${PGM_NAME}${MAJOR_VERSION}
cd "${PKG_PATH}"
else
diff --git a/tools/linux_packaging/uninstall.sh.in b/tools/linux_packaging/uninstall.sh.in
index c1d6cf561e..20aa1b688d 100644
--- a/tools/linux_packaging/uninstall.sh.in
+++ b/tools/linux_packaging/uninstall.sh.in
@@ -7,6 +7,7 @@
#
#####################################
+MAJOR_VERSION="%REPLACE_MAJOR_VERSION%"
PGM_NAME="%REPLACE_PGM%"
PGM_VENDOR="%REPLACE_VENDOR%"
@@ -160,14 +161,14 @@ then
fi
# delete the bin link if it is linked to this version
- if [ -e "${USER_BIN_DIR}/${PGM_NAME}3" ];
+ if [ -e "${USER_BIN_DIR}/${PGM_NAME}${MAJOR_VERSION}" ];
then
- BIN_LINK_TARGET=$(readlink "${USER_BIN_DIR}/${PGM_NAME}3")
+ BIN_LINK_TARGET=$(readlink "${USER_BIN_DIR}/${PGM_NAME}${MAJOR_VERSION}")
BIN_LINK_TARGET_DIR=$(dirname "${BIN_LINK_TARGET}")
if [ "${BIN_LINK_TARGET_DIR}" = "${PGM_PATH}/bin" ];
then
- ${SUPER} rm -f "${USER_BIN_DIR}/${PGM_NAME}3"
+ ${SUPER} rm -f "${USER_BIN_DIR}/${PGM_NAME}${MAJOR_VERSION}"
fi
fi