-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
114 lines (92 loc) · 2.67 KB
/
CMakeLists.txt
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
102
103
104
105
106
107
108
109
110
111
112
113
114
# Use CMake to build a Debian package
project( web-softplc-bnd-config )
cmake_minimum_required( VERSION 3.5 FATAL_ERROR )
set( CPACK_PACKAGE_VERSION_MAJOR 1 )
set( CPACK_PACKAGE_VERSION_MINOR 0 ) # 18-Apr-2022
set( CPACK_PACKAGE_VERSION_PATCH 0 )
set( CPACK_PACKAGE_CONTACT "Dick Hollenbeck <[email protected]>" )
set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "SoftPLC Network and Personality Configuration Web UI for BnD" )
set( DOCROOT web-root/softplc-bnd-config )
install(
FILES
web-softplc-bnd-config.service
DESTINATION
etc/systemd/system
)
install(
FILES
web-softplc-bnd-config.conf
DESTINATION
etc
)
install(
FILES
${DOCROOT}/httpd.conf
DESTINATION
${DOCROOT}
)
install(
FILES
${DOCROOT}/favicon.ico
${DOCROOT}/index.html
js
css
DESTINATION
${DOCROOT}
)
install(
FILES
${DOCROOT}/cgi-bin/net-config-form-handler.sh
${DOCROOT}/cgi-bin/net-config-restart.sh
${DOCROOT}/cgi-bin/net-config-read-current-settings.sh
${DOCROOT}/cgi-bin/cgi-funcs.sh
DESTINATION
${DOCROOT}/cgi-bin
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ
)
install(
FILES
${DOCROOT}/favicon.ico
${DOCROOT}/index.html
${DOCROOT}/saved.html
${DOCROOT}/net-config.js
DESTINATION
${DOCROOT}
)
install(
FILES
${DOCROOT}/config/NETWORKS.LST
DESTINATION
${DOCROOT}/config
)
install(
FILES
${DOCROOT}/images/sm_splc_colorlogo_trans.png
${DOCROOT}/images/BnD_Master_Logo_A.png
DESTINATION
${DOCROOT}/images
)
file( WRITE ${CMAKE_BINARY_DIR}/conffiles
"/etc/web-softplc-bnd-config.conf" "\n"
)
set( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${CMAKE_BINARY_DIR}/conffiles )
set( CMAKE_INSTALL_PREFIX "" )
# CPack variables
set( CPACK_DEBIAN_PACKAGE_NAME web-softplc-bnd-config )
set( CPACK_DEBIAN_PACKAGE_ARCHITECTURE all )
set( CPACK_DEBIAN_PACKAGE_SECTION embedded )
set( CPACK_DEBIAN_PACKAGE_PRIORITY optional )
set( CPACK_DEBIAN_PACKAGE_DEPENDS "busybox, web-bootstrap" )
set( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
${CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA}
${CMAKE_CURRENT_SOURCE_DIR}/postinst
${CMAKE_CURRENT_SOURCE_DIR}/prerm
)
set( CPACK_GENERATOR "DEB" )
set( CPACK_SET_DESTDIR ON )
set( CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}" )
set( CPACK_PACKAGE_FILE_NAME "${CPACK_DEBIAN_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}" )
include( CPack )