summaryrefslogtreecommitdiff
path: root/distribution/posix
diff options
context:
space:
mode:
Diffstat (limited to 'distribution/posix')
-rw-r--r--distribution/posix/CMakeLists.txt14
-rwxr-xr-xdistribution/posix/postinst6
-rwxr-xr-xdistribution/posix/prerm6
3 files changed, 15 insertions, 11 deletions
diff --git a/distribution/posix/CMakeLists.txt b/distribution/posix/CMakeLists.txt
index f202791..d80322a 100644
--- a/distribution/posix/CMakeLists.txt
+++ b/distribution/posix/CMakeLists.txt
@@ -12,8 +12,8 @@ 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_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/postinst;${CMAKE_CURRENT_SOURCE_DIR}/prerm")
set(CPACK_PACKAGING_INSTALL_PREFIX ${CPACK_INSTALL_PREFIX})
@@ -37,12 +37,6 @@ if(NOT XTRKCAD_USE_BROWSER)
# message(AUTHOR_WARNING "Add dependency to webkitgtk for viewing help!")
endif()
-#Add dependency to MiniXML (mxml) if configured
-if(XTRKCAD_CREATE_SVG)
- set(CPACK_RPM_PACKAGE_REQUIRES
- "${CPACK_RPM_PACKAGE_REQUIRES} mxml")
-endif()
-
# exclude these directories from the rpm
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
"/usr/local"
@@ -56,6 +50,12 @@ set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
"/usr/share/pixmaps"
)
+set(CPACK_RPM_DEFAULT_DIR_PERMISSIONS
+ OWNER_READ OWNER_WRITE OWNER_EXECUTE
+ GROUP_READ GROUP_EXECUTE
+ WORLD_READ WORLD_EXECUTE)
+
+
set(CPACK_RPM_CHANGELOG_FILE "${CMAKE_CURRENT_SOURCE_DIR}////changelog.txt")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
diff --git a/distribution/posix/postinst b/distribution/posix/postinst
index 969aa7e..d4e22cb 100755
--- a/distribution/posix/postinst
+++ b/distribution/posix/postinst
@@ -1,5 +1,5 @@
#!/bin/sh
-LOGF=/tmp/xtrkcad-setup.log
+LOGF=${HOME}/xtrkcad-setup.log
if [ -f "${LOGF}" ] ; then
chmod 666 ${LOGF}
echo postinst: $* >> ${LOGF}
@@ -7,7 +7,9 @@ else
LOGF=/dev/null
fi
-INSTALLDIR=/usr/share/xtrkcad
+# Note: when branching for Beta, change the next line to /usr/local/share/xtrkcad-beta
+# when building for GA, change the next line back to /usr/share/xtrkcad
+INSTALLDIR=/usr/local/share/xtrkcad-beta
( 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 b5ae917..71cfd00 100755
--- a/distribution/posix/prerm
+++ b/distribution/posix/prerm
@@ -1,5 +1,5 @@
#!/bin/sh
-LOGF=/tmp/xtrkcad-setup.log
+LOGF=${HOME}/xtrkcad-setup.log
if [ -f "${LOGF}" ] ; then
chmod 666 ${LOGF}
echo prerm: $* >> ${LOGF}
@@ -7,7 +7,9 @@ else
LOGF=/dev/null
fi
-INSTALLDIR=/usr/share/xtrkcad
+# Note: when branching for Beta, change the next line to /usr/local/share/xtrkcad-beta
+# when building for GA, change the next line back to /usr/share/xtrkcad
+INSTALLDIR=/usr/local/share/xtrkcad-beta
( su -c "sh ${INSTALLDIR}/xtrkcad-setup remove ${INSTALLDIR}" -l $SUDO_USER ) >> ${LOGF} 2>&1