attempt to remove major version hard-coding from linux packaging tools

This commit is contained in:
Paul Davis 2015-03-09 12:41:46 -05:00
parent 63c4f8ad3f
commit e525b169f2
3 changed files with 15 additions and 12 deletions

View File

@ -14,6 +14,8 @@ ARDOURSTACK_ROOT=$HOME/a3/inst
# the waf build tree to use when copying built/generated files # the waf build tree to use when copying built/generated files
BUILD_ROOT=../../build BUILD_ROOT=../../build
. ../define_versions.sh
# where harvid and xjadeo binaries are cached # where harvid and xjadeo binaries are cached
if test -z "$CACHEDIR" -o ! -d "$CACHEDIR"; then if test -z "$CACHEDIR" -o ! -d "$CACHEDIR"; then
CACHEDIR=`pwd` CACHEDIR=`pwd`
@ -233,8 +235,8 @@ echo export 'PATH=/usr/local/bin:/opt/bin:$PATH' >> $ENVIRONMENT
# create startup helper script # create startup helper script
sed -e "/^%ENV%/r $ENVIRONMENT" -e '/^%ENV%/d' -e 's/%VER%/'"${release_version}"'/' < ardour.sh.in > $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/ardour3 rm $ENVIRONMENT && chmod 775 $APPBIN/ardour${major_version}
MAIN_EXECUTABLE=ardour-${release_version} MAIN_EXECUTABLE=ardour-${release_version}
echo "Copying ardour executable ...." echo "Copying ardour executable ...."
@ -638,7 +640,7 @@ fi
# #
# Add the uninstaller # 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 chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
#Sanity Check file #Sanity Check file

View File

@ -8,11 +8,11 @@
# #
################################### ###################################
MAJOR_VERSION=3
PGM_NAME="Ardour" PGM_NAME="Ardour"
PGM_VENDOR="Ardour" PGM_VENDOR="Ardour"
PGM_EXEC_FILE="ardour3" PGM_EXEC_FILE="ardour${MAJOR_VERSION}"
THE_SHELL="/bin/sh" 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 # Create link to the program in user bin
echo "" echo ""
echo "Creating link ${PGM_NAME}3 in ${USER_BIN_DIR}" echo "Creating link ${PGM_NAME}${MAJOR_VERSION} in ${USER_BIN_DIR}"
echo "" echo ""
if [ -d "${USER_BIN_DIR}" ]; then if [ -d "${USER_BIN_DIR}" ]; then
if [ -e "${USER_BIN_DIR}/${PGM_NAME}3" ]; then if [ -e "${USER_BIN_DIR}/${PGM_NAME}${MAJOR_VERSION}" ]; then
${SUPER} rm -f ${USER_BIN_DIR}/${PGM_NAME}3 ${SUPER} rm -f ${USER_BIN_DIR}/${PGM_NAME}${MAJOR_VERSION}
fi fi
cd "${USER_BIN_DIR}" 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}" cd "${PKG_PATH}"
else else

View File

@ -7,6 +7,7 @@
# #
##################################### #####################################
MAJOR_VERSION="%REPLACE_MAJOR_VERSION%"
PGM_NAME="%REPLACE_PGM%" PGM_NAME="%REPLACE_PGM%"
PGM_VENDOR="%REPLACE_VENDOR%" PGM_VENDOR="%REPLACE_VENDOR%"
@ -160,14 +161,14 @@ then
fi fi
# delete the bin link if it is linked to this version # 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 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}") BIN_LINK_TARGET_DIR=$(dirname "${BIN_LINK_TARGET}")
if [ "${BIN_LINK_TARGET_DIR}" = "${PGM_PATH}/bin" ]; if [ "${BIN_LINK_TARGET_DIR}" = "${PGM_PATH}/bin" ];
then then
${SUPER} rm -f "${USER_BIN_DIR}/${PGM_NAME}3" ${SUPER} rm -f "${USER_BIN_DIR}/${PGM_NAME}${MAJOR_VERSION}"
fi fi
fi fi