1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# Setup packaging ...
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "XTrackCAD is a CAD program for designing model railroad layouts.")
set(CPACK_GENERATOR "DEB" "RPM" "STGZ")
set(CPACK_SOURCE_GENERATOR "TGZ" "TBZ2" "ZIP")
set(CPACK_PACKAGE_RELEASE 1)
set(CPACK_RPM_PACKAGE_LICENSE "GPL")
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()
set(CPACK_INSTALL_PREFIX "/usr/local" )
endif()
set(CPACK_PACKAGING_INSTALL_PREFIX ${CPACK_INSTALL_PREFIX})
# get the specific configuration for each packager
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 zlib")
set(CPACK_RPM_BUILDREQUIRES
"gcc, cmake >= 2.4.7, pkgconfig, gtk2-devel"
"gettext, gettext-devel, glibc-devel"
)
# Add dependency to webkitgtk if configured
if(NOT XTRKCAD_USE_BROWSER)
set(CPACK_RPM_PACKAGE_REQUIRES
"${CPACK_RPM_PACKAGE_REQUIRES} webkitgtk")
# 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"
"/usr/local/share"
"/usr/local/bin"
"/usr/share/locale"
"/usr/share/locale/*"
"/usr/local/share/locale"
"/usr/local/share/locale/*"
"/usr/share/applications"
"/usr/share/pixmaps"
)
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_VERSION "1:${XTRKCAD_VERSION}")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
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 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")
set(CPACK_DEBIAN_PACKAGE_COMPRESSION "gzip")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "xtrkcad.org")
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)
|