From a14a7a0ccc9de76aeab0b2e4bbf58f1a79deedc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 3 Jul 2024 10:19:30 +0200 Subject: New upstream version 5.3.0GA --- distribution/posix/CMakeLists.txt | 12 +++++------- distribution/posix/postinst | 9 +-------- distribution/posix/prerm | 9 +-------- 3 files changed, 7 insertions(+), 23 deletions(-) (limited to 'distribution/posix') diff --git a/distribution/posix/CMakeLists.txt b/distribution/posix/CMakeLists.txt index 6e44581..f202791 100644 --- a/distribution/posix/CMakeLists.txt +++ b/distribution/posix/CMakeLists.txt @@ -8,10 +8,11 @@ set(CPACK_RPM_PACKAGE_GROUP "Applications/Engineering") set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}////xtrkcad-desc.txt") set(CPACK_PACKAGE_FILE_NAME "xtrkcad-setup-${XTRKCAD_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}") -if(XTRKCAD_PACKAGE_GA_RELEASE) - set(CPACK_INSTALL_PREFIX "/usr" ) -else() +if(XTRKCAD_BETA MATCHES "-beta") set(CPACK_INSTALL_PREFIX "/usr/local" ) +else() + set(CPACK_INSTALL_PREFIX "/usr" ) + set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/postinst;${CMAKE_CURRENT_SOURCE_DIR}/prerm") endif() set(CPACK_PACKAGING_INSTALL_PREFIX ${CPACK_INSTALL_PREFIX}) @@ -59,7 +60,7 @@ set(CPACK_RPM_CHANGELOG_FILE "${CMAKE_CURRENT_SOURCE_DIR}////changelog.txt") set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) -set(CPACK_DEBIAN_PACKAGE_NAME "XTrkCad") +set(CPACK_DEBIAN_PACKAGE_NAME "XTrkCad${XTRKCAD_BETA}") set(CPACK_DEBIAN_PACKAGE_VERSION "1:${XTRKCAD_VERSION}") @@ -95,7 +96,4 @@ set(CPACK_PACKAGE_EXECUTABLES "xtrkcad;XTrkCad-5.2.1-Beta") set(CPACK_CREATE_DESKTOP_LINKS "xtrkcad") -set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/postinst;${CMAKE_CURRENT_SOURCE_DIR}/prerm") - include(CPack) - diff --git a/distribution/posix/postinst b/distribution/posix/postinst index 914534d..969aa7e 100755 --- a/distribution/posix/postinst +++ b/distribution/posix/postinst @@ -7,14 +7,7 @@ else LOGF=/dev/null fi -if [ -d /usr/local/share/xtrkcad ] ; then - INSTALLDIR=/usr/local/share/xtrkcad -elif [ -d /usr/share/xtrkcad ] ; then - INSTALLDIR=/usr/share/xtrkcad -else - echo No existing XTrkCad install >> ${LOGF} - exit 1 -fi +INSTALLDIR=/usr/share/xtrkcad ( su -c "sh ${INSTALLDIR}/xtrkcad-setup install ${INSTALLDIR}" -l $SUDO_USER ) >> ${LOGF} 2>&1 diff --git a/distribution/posix/prerm b/distribution/posix/prerm index 3c5db28..b5ae917 100755 --- a/distribution/posix/prerm +++ b/distribution/posix/prerm @@ -7,14 +7,7 @@ else LOGF=/dev/null fi -if [ -d /usr/local/share/xtrkcad ] ; then - INSTALLDIR=/usr/local/share/xtrkcad -elif [ -d /usr/share/xtrkcad ] ; then - INSTALLDIR=/usr/share/xtrkcad -else - echo No existing XTrkCad install >> ${LOGF} - exit 1 -fi +INSTALLDIR=/usr/share/xtrkcad ( su -c "sh ${INSTALLDIR}/xtrkcad-setup remove ${INSTALLDIR}" -l $SUDO_USER ) >> ${LOGF} 2>&1 -- cgit v1.2.3