This repository was archived by the owner on Sep 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +37
-4
lines changed Expand file tree Collapse file tree 4 files changed +37
-4
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,13 @@ language: cpp
7
7
compiler :
8
8
- gcc
9
9
10
+ env :
11
+ - PATH="/usr/local/opt/qt/bin:$PATH"
12
+
10
13
before_install :
11
14
- brew update
12
15
- brew install jq
13
- - brew install cartr/qt4/qt@4
16
+ - brew install qt5
14
17
- brew install asciidoc
15
18
16
19
before_script :
@@ -23,8 +26,17 @@ before_script:
23
26
24
27
script :
25
28
- ./build-for-osx.sh
26
- - wget `curl -s https://api.github.com/repos/openscap/scap-security-guide/releases/latest?access_token=$GITHUB_TOKEN | jq -r ".assets[] | select(.name | test(\"(scap-security-guide-[0-9].[0-9].[0-9]*).zip\")) | .browser_download_url"` -O ssg.zip
27
- - mkdir -p `pwd`/scap-workbench.app/Contents/Resources/ssg/ && unzip ssg.zip -d `pwd`/scap-workbench.app/Contents/Resources/ssg/
29
+ # Parse release page json to obtain link to latest content zip file and download it
30
+ - |
31
+ REL_TAG=`curl -s "https://github.com/ComplianceAsCode/content/releases/latest" | grep -o 'tag/[v.0-9]*' | awk -F/ '{print $2}'`
32
+ REL_TAG_NUM=`echo ${REL_TAG} | cut -d"v" -f2`
33
+ DWN_LINK=https://github.com/ComplianceAsCode/content/releases/download/${REL_TAG}/scap-security-guide-${REL_TAG_NUM}.zip
34
+ if [ -z "${DWN_LINK}" ] ; then
35
+ echo "Could not get the ZIP URL! It is empty!"
36
+ exit 1
37
+ fi
38
+ - wget "${DWN_LINK}" -O ssg.zip
39
+ - mkdir -p `pwd`/build-osx/scap-workbench.app/Contents/Resources/ssg/ && unzip ssg.zip && cp -a scap-security-guide-*/* `pwd`/build-osx/scap-workbench.app/Contents/Resources/ssg/
28
40
- cd build-osx && sh osx-create-dmg.sh
29
41
30
42
deploy :
Original file line number Diff line number Diff line change @@ -125,6 +125,23 @@ set(SCAP_WORKBENCH_LINK_LIBRARIES
125
125
Qt5::Widgets Qt5::XmlPatterns
126
126
${OPENSCAP_LIBRARIES} )
127
127
128
+ # ---------- RPATHS for linking
129
+
130
+ # see https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling
131
+
132
+ # when building, use the install RPATH
133
+ # (but later on when installing)
134
+ set (CMAKE_BUILD_WITH_INSTALL_RPATH ON )
135
+
136
+ set (CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR} )
137
+
138
+ # add the automatically determined parts of the RPATH
139
+ # which point to directories outside the build tree to the install RPATH
140
+ set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )
141
+
142
+ # Turn on RPATH for OSX
143
+ set (CMAKE_MACOSX_RPATH ON )
144
+
128
145
configure_file ("include/Config.h.in" "${CMAKE_CURRENT_BINARY_DIR} /Config.h" )
129
146
# It is not trivial to make the resulting file executable :-(
130
147
# People will have to `bash runwrapper.sh ...` in the meantime.
Original file line number Diff line number Diff line change
1
+ set -e
2
+
1
3
mkdir -p build-osx/
2
4
pushd build-osx/
3
5
cmake -D SCAP_WORKBENCH_LOCAL_SCAN_ENABLED=false -D SCAP_AS_RPM_EXECUTABLE=" " ../
4
6
make -j 4
5
7
mkdir -p ./scap-workbench.app/Contents/Frameworks/
6
8
cp /usr/local/lib/libpcre.1.dylib ./scap-workbench.app/Contents/Frameworks/
7
- cp /usr/local/lib/libopenscap.8 .dylib ./scap-workbench.app/Contents/Frameworks/
9
+ cp /usr/local/lib/libopenscap* .dylib ./scap-workbench.app/Contents/Frameworks/
8
10
chmod 755 ./scap-workbench.app/Contents/Frameworks/* .dylib
9
11
echo " Copy fresh extracted SSG zip into ` pwd` /scap-workbench.app/Contents/Resources/ssg/"
10
12
echo " so that SSG README.md is at ` pwd` /scap-workbench.app/Contents/Resources/ssg/README.md"
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -e
4
+
3
5
# Original by Andy Maloney
4
6
# http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/
5
7
# Changes specific to SCAP Workbench by Martin Preisler <[email protected] >
You can’t perform that action at this time.
0 commit comments