summaryrefslogtreecommitdiff
path: root/distribution/posix
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2024-11-14 19:35:45 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2024-11-14 19:35:45 +0100
commitdf5520aa2dae5b3ce7abf8733dcdd152898af163 (patch)
tree00d3047bfb14f682bfb5a21010c731ed649bfed7 /distribution/posix
parentdf247efec654e512242e4f4f1b0212034f9e01fe (diff)
parentec3c0f6f6e7153fa797dc57a0e95779cbc63a23b (diff)
Merge branch 'release/debian/1_5.3.0GA-1'debian/1_5.3.0GA-1
Diffstat (limited to 'distribution/posix')
-rw-r--r--distribution/posix/CMakeLists.txt33
-rwxr-xr-xdistribution/posix/postinst14
-rwxr-xr-xdistribution/posix/prerm15
3 files changed, 56 insertions, 6 deletions
diff --git a/distribution/posix/CMakeLists.txt b/distribution/posix/CMakeLists.txt
index 3356005..f202791 100644
--- a/distribution/posix/CMakeLists.txt
+++ b/distribution/posix/CMakeLists.txt
@@ -8,7 +8,13 @@ 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}")
-set(CPACK_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} )
+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})
# get the specific configuration for each packager
@@ -17,7 +23,7 @@ set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/package.txt)
set(CPACK_PACKAGE_VENDOR "XTrackCAD Fork Project")
# common dependencies for all Linux builds
-set(CPACK_RPM_PACKAGE_REQUIRES "glibc gtk2 zip zlib")
+set(CPACK_RPM_PACKAGE_REQUIRES "glibc gtk2 zlib")
set(CPACK_RPM_BUILDREQUIRES
"gcc, cmake >= 2.4.7, pkgconfig, gtk2-devel"
@@ -31,6 +37,12 @@ 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"
@@ -48,19 +60,29 @@ 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}")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
-set(CPACK_DEBIAN_PACKAGE_DEPENDS "zip")
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "xdg-utils")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "xtrkcad@sillub.com")
set(CPACK_PACKAGE_CONTACT "xtrkcad@sillub.com")
-set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "XTrkCad description")
+set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "XTrkCad supports any scale, has libraries of popular brands of \
+turnouts and sectional track (plus you add your own easily), can \
+automatically use spiral transition curves when joining track \
+XTrkCad lets you manipulate track much like you would with actual \
+flex-track to modify, extend and join tracks and turnouts. \
+Additional features include tunnels, 'post-it' notes, on-screen \
+ruler, parts list, 99 drawing layers, undo/redo commands, \
+benchwork, 'Print to BitMap', elevations, train simulation and \
+car inventory. \
+")
+
set(CPACK_DEBIAN_PACKAGE_SECTION "contrib/graphics")
@@ -75,4 +97,3 @@ set(CPACK_PACKAGE_EXECUTABLES "xtrkcad;XTrkCad-5.2.1-Beta")
set(CPACK_CREATE_DESKTOP_LINKS "xtrkcad")
include(CPack)
-
diff --git a/distribution/posix/postinst b/distribution/posix/postinst
new file mode 100755
index 0000000..969aa7e
--- /dev/null
+++ b/distribution/posix/postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+LOGF=/tmp/xtrkcad-setup.log
+if [ -f "${LOGF}" ] ; then
+ chmod 666 ${LOGF}
+ echo postinst: $* >> ${LOGF}
+else
+ LOGF=/dev/null
+fi
+
+INSTALLDIR=/usr/share/xtrkcad
+
+( su -c "sh ${INSTALLDIR}/xtrkcad-setup install ${INSTALLDIR}" -l $SUDO_USER ) >> ${LOGF} 2>&1
+
+exit 0
diff --git a/distribution/posix/prerm b/distribution/posix/prerm
new file mode 100755
index 0000000..b5ae917
--- /dev/null
+++ b/distribution/posix/prerm
@@ -0,0 +1,15 @@
+#!/bin/sh
+LOGF=/tmp/xtrkcad-setup.log
+if [ -f "${LOGF}" ] ; then
+ chmod 666 ${LOGF}
+ echo prerm: $* >> ${LOGF}
+else
+ LOGF=/dev/null
+fi
+
+INSTALLDIR=/usr/share/xtrkcad
+
+( su -c "sh ${INSTALLDIR}/xtrkcad-setup remove ${INSTALLDIR}" -l $SUDO_USER ) >> ${LOGF} 2>&1
+
+exit 0
+