Changeset View
Changeset View
Standalone View
Standalone View
appimage/kdevelop-recipe-centos6.sh
Show All 13 Lines | 13 | { | |||
---|---|---|---|---|---|
14 | git fetch | 14 | git fetch | ||
15 | git stash || true | 15 | git stash || true | ||
16 | git rebase $(git rev-parse --abbrev-ref --symbolic-full-name @{u}) || true | 16 | git rebase $(git rev-parse --abbrev-ref --symbolic-full-name @{u}) || true | ||
17 | git stash pop || true | 17 | git stash pop || true | ||
18 | } | 18 | } | ||
19 | 19 | | |||
20 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | 20 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
21 | 21 | | |||
22 | QTVERSION=5.7.1 | 22 | QTDIR=/opt/qt5 | ||
23 | QVERSION_SHORT=5.7 | | |||
24 | QTDIR=/usr/local/Qt-${QTVERSION}/ | | |||
25 | 23 | | |||
26 | if [ -z "$KDEVELOP_VERSION" ]; then | 24 | if [ -z "$KDEVELOP_VERSION" ]; then | ||
27 | KDEVELOP_VERSION=5.2 | 25 | KDEVELOP_VERSION=5.3 | ||
28 | fi | 26 | fi | ||
29 | if [ -z "$KDEV_PG_QT_VERSION" ]; then | 27 | if [ -z "$KDEV_PG_QT_VERSION" ]; then | ||
30 | KDEV_PG_QT_VERSION=2.0 | 28 | KDEV_PG_QT_VERSION=v2.1.0 | ||
31 | fi | 29 | fi | ||
32 | KF5_VERSION=v5.32.0 | 30 | KF5_VERSION=v5.51.0 | ||
33 | KDE_PLASMA_VERSION=master # need libksysguard master (contains a0e69617442d720c76da5ebe3323e7a977929db4 -- patch which makes plasma dep optional) | 31 | KDE_PLASMA_VERSION=v5.13.4 # note: need libksysguard commit a0e69617442d720c76da5ebe3323e7a977929db4 (patch which makes plasma dep optional) | ||
34 | KDE_APPLICATION_VERSION=v16.12.3 | 32 | KDE_APPLICATION_VERSION=v18.08.0 | ||
35 | GRANTLEE_VERSION=v5.1.0 | 33 | GRANTLEE_VERSION=v5.1.0 | ||
36 | 34 | | |||
37 | export LLVM_ROOT=/opt/llvm/ | 35 | export LLVM_ROOT=/opt/llvm/ | ||
38 | export PATH=/opt/rh/python27/root/usr/bin/:$PATH | 36 | export PATH=/opt/rh/python27/root/usr/bin/:$PATH | ||
39 | export LD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib64:$LD_LIBRARY_PATH | 37 | export LD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib64:$LD_LIBRARY_PATH | ||
40 | 38 | | |||
41 | # qjsonparser, used to add metadata to the plugins needs to work in a en_US.UTF-8 environment. That's | 39 | # qjsonparser, used to add metadata to the plugins needs to work in a en_US.UTF-8 environment. That's | ||
42 | # not always set correctly in CentOS 6.7 | 40 | # not always set correctly in CentOS 6.7 | ||
43 | export LC_ALL=en_US.UTF-8 | 41 | export LC_ALL=en_US.UTF-8 | ||
44 | export LANG=en_us.UTF-8 | 42 | export LANG=en_us.UTF-8 | ||
45 | 43 | | |||
46 | # Determine which architecture should be built | 44 | # Determine which architecture should be built | ||
47 | if [[ "$(arch)" = "i686" || "$(arch)" = "x86_64" ]] ; then | 45 | if [[ "$(arch)" = "i686" || "$(arch)" = "x86_64" ]] ; then | ||
48 | ARCH=$(arch) | 46 | ARCH=$(arch) | ||
49 | else | 47 | else | ||
50 | echo "Architecture could not be determined" | 48 | echo "Architecture could not be determined" | ||
51 | exit 1 | 49 | exit 1 | ||
52 | fi | 50 | fi | ||
53 | 51 | | |||
54 | # Make sure we build from the /, parts of this script depends on that. We also need to run as root... | 52 | # Make sure we build from the /, parts of this script depends on that. We also need to run as root... | ||
55 | cd / | 53 | cd / | ||
56 | 54 | | |||
57 | # Build AppImageKit | | |||
58 | #rm -Rf /AppImageKit | | |||
59 | if [ ! -d AppImageKit ] ; then | | |||
60 | git clone --depth 1 https://github.com/probonopd/AppImageKit.git /AppImageKit | | |||
61 | fi | | |||
62 | | ||||
63 | cd /AppImageKit/ | | |||
64 | git checkout stable/v1.0 | | |||
65 | git_pull_rebase_helper | | |||
66 | git reset --hard | | |||
67 | ./build.sh | | |||
68 | cd / | | |||
69 | | ||||
70 | # Use the new compiler | 55 | # Use the new compiler | ||
71 | . /opt/rh/devtoolset-4/enable | 56 | . /opt/rh/devtoolset-6/enable | ||
72 | 57 | | |||
73 | # TODO: Use these vars more | 58 | # TODO: Use these vars more | ||
74 | export FAKEROOT=/kdevelop.appdir | 59 | export FAKEROOT=/kdevelop.appdir | ||
75 | export PREFIX=/kdevelop.appdir/usr/ | 60 | export PREFIX=/kdevelop.appdir/usr/ | ||
76 | export SRC=$HOME/src/ | 61 | export SRC=$HOME/src/ | ||
77 | export BUILD=$HOME/build | 62 | export BUILD=$HOME/build | ||
78 | export CMAKE_PREFIX_PATH=$QTDIR:/kdevelop.appdir/share/llvm/ | 63 | export CMAKE_PREFIX_PATH=$QTDIR:/kdevelop.appdir/share/llvm/ | ||
79 | 64 | | |||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | 90 | { ( | |||
127 | fi | 112 | fi | ||
128 | 113 | | |||
129 | cd $PROJECT | 114 | cd $PROJECT | ||
130 | git checkout $VERSION | 115 | git checkout $VERSION | ||
131 | git rebase $(git rev-parse --abbrev-ref --symbolic-full-name @{u}) || true # git rebase will fail if a tag is checked out | 116 | git rebase $(git rev-parse --abbrev-ref --symbolic-full-name @{u}) || true # git rebase will fail if a tag is checked out | ||
132 | git stash pop || true | 117 | git stash pop || true | ||
133 | cd .. | 118 | cd .. | ||
134 | 119 | | |||
135 | if [ "$PROJECT" = "knotifications" ]; then | 120 | if [ ! -z "$PATCH_FILE" ]; then | ||
136 | cd $PROJECT | 121 | pushd $PROJECT | ||
137 | echo "patching knotifications" | 122 | echo "Patching $PROJECT with $PATCH_FILE" | ||
138 | git reset --hard | 123 | git reset --hard | ||
139 | cat > no_phonon.patch << EOF | 124 | patch -p1 < $PATCH_FILE | ||
140 | diff --git a/CMakeLists.txt b/CMakeLists.txt | 125 | popd | ||
141 | index b97425f..8f15f08 100644 | | |||
142 | --- a/CMakeLists.txt | | |||
143 | +++ b/CMakeLists.txt | | |||
144 | @@ -59,10 +59,10 @@ find_package(KF5Config ${KF5_DEP_VERSION} REQUIRED) | | |||
145 | find_package(KF5Codecs ${KF5_DEP_VERSION} REQUIRED) | | |||
146 | find_package(KF5CoreAddons ${KF5_DEP_VERSION} REQUIRED) | | |||
147 | | ||||
148 | -find_package(Phonon4Qt5 4.6.60 REQUIRED NO_MODULE) | | |||
149 | +find_package(Phonon4Qt5 4.6.60 NO_MODULE) | | |||
150 | set_package_properties(Phonon4Qt5 PROPERTIES | | |||
151 | DESCRIPTION "Qt-based audio library" | | |||
152 | - TYPE REQUIRED | | |||
153 | + TYPE OPTIONAL | | |||
154 | PURPOSE "Required to build audio notification support") | | |||
155 | if (Phonon4Qt5_FOUND) | | |||
156 | add_definitions(-DHAVE_PHONON4QT5) | | |||
157 | EOF | | |||
158 | cat no_phonon.patch |patch -p1 | | |||
159 | cd .. | | |||
160 | fi | 126 | fi | ||
161 | 127 | | |||
162 | # create build dir | 128 | # create build dir | ||
163 | mkdir -p $BUILD/$PROJECT | 129 | mkdir -p $BUILD/$PROJECT | ||
164 | 130 | | |||
165 | # go there | 131 | # go there | ||
166 | cd $BUILD/$PROJECT | 132 | cd $BUILD/$PROJECT | ||
167 | 133 | | |||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
213 | build_framework threadweaver | 179 | build_framework threadweaver | ||
214 | build_framework attica | 180 | build_framework attica | ||
215 | build_framework knewstuff | 181 | build_framework knewstuff | ||
216 | build_framework syntax-highlighting | 182 | build_framework syntax-highlighting | ||
217 | build_framework ktexteditor | 183 | build_framework ktexteditor | ||
218 | build_framework kpackage | 184 | build_framework kpackage | ||
219 | build_framework kdeclarative | 185 | build_framework kdeclarative | ||
220 | build_framework kcmutils | 186 | build_framework kcmutils | ||
221 | build_framework knotifications | 187 | (PATCH_FILE=$SCRIPT_DIR/knotifications_no_phonon.patch build_framework knotifications) | ||
222 | build_framework knotifyconfig | 188 | build_framework knotifyconfig | ||
223 | build_framework kdoctools | 189 | build_framework kdoctools | ||
224 | build_framework breeze-icons -DBINARY_ICONS_RESOURCE=1 | 190 | build_framework breeze-icons -DBINARY_ICONS_RESOURCE=1 | ||
225 | build_framework kpty | 191 | build_framework kpty | ||
226 | build_framework kinit | 192 | build_framework kinit | ||
227 | fi | 193 | fi | ||
228 | 194 | | |||
229 | # KDE Plasma | 195 | # KDE Plasma | ||
230 | build_project libksysguard $KDE_PLASMA_VERSION | 196 | build_project libksysguard $KDE_PLASMA_VERSION | ||
231 | build_project kdecoration $KDE_PLASMA_VERSION # for breeze | 197 | build_project kdecoration $KDE_PLASMA_VERSION # for breeze | ||
232 | build_project breeze $KDE_PLASMA_VERSION | 198 | build_project breeze $KDE_PLASMA_VERSION | ||
233 | 199 | | |||
234 | # KDE Applications | 200 | # KDE Applications | ||
235 | build_project libkomparediff2 $KDE_APPLICATION_VERSION | 201 | build_project libkomparediff2 $KDE_APPLICATION_VERSION | ||
236 | build_project kate $KDE_APPLICATION_VERSION # for snippet plugin, see T3826 | 202 | build_project kate $KDE_APPLICATION_VERSION # for snippet plugin, see T3826 | ||
237 | build_project konsole $KDE_APPLICATION_VERSION | 203 | build_project konsole $KDE_APPLICATION_VERSION | ||
238 | 204 | | |||
239 | # Extra | 205 | # Extra | ||
240 | (CUSTOM_GIT_URL=https://github.com/steveire/grantlee.git build_project grantlee $GRANTLEE_VERSION) | 206 | (CUSTOM_GIT_URL=https://github.com/steveire/grantlee.git PATCH_FILE=$SCRIPT_DIR/grantlee_avoid_recompilation.patch build_project grantlee $GRANTLEE_VERSION) | ||
241 | 207 | | |||
242 | # KDevelop | 208 | # KDevelop | ||
243 | build_project kdevelop-pg-qt $KDEV_PG_QT_VERSION | 209 | build_project kdevelop-pg-qt $KDEV_PG_QT_VERSION | ||
244 | build_project kdevelop $KDEVELOP_VERSION | 210 | build_project kdevelop $KDEVELOP_VERSION | ||
245 | build_project kdev-php $KDEVELOP_VERSION | 211 | build_project kdev-php $KDEVELOP_VERSION | ||
246 | 212 | | |||
247 | # Build kdev-python | 213 | # Build kdev-python | ||
248 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH/kdevelop.appdir/usr/lib/ | 214 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH/kdevelop.appdir/usr/lib/ | ||
249 | build_project kdev-python $KDEVELOP_VERSION | 215 | build_project kdev-python $KDEVELOP_VERSION | ||
250 | 216 | | |||
251 | # Install some colorschemes | 217 | # Install some colorschemes | ||
252 | cd $SRC | 218 | cd $BUILD | ||
253 | $SCRIPT_DIR/install_colorschemes.sh | 219 | $SCRIPT_DIR/../release-scripts/install_colorschemes.py /kdevelop.appdir/usr/share | ||
254 | 220 | | |||
255 | cd /kdevelop.appdir | 221 | cd /kdevelop.appdir | ||
256 | 222 | | |||
257 | # FIXME: How to find out which subset of plugins is really needed? I used strace when running the binary | 223 | # FIXME: How to find out which subset of plugins is really needed? I used strace when running the binary | ||
258 | mkdir -p ./usr/lib/qt5/plugins/ | 224 | mkdir -p ./usr/lib/qt5/plugins/ | ||
259 | 225 | | |||
260 | if [ -e $(dirname $QTDIR/plugins/bearer) ] ; then | 226 | PLUGINS=$($QTDIR/bin/qmake -query QT_INSTALL_PLUGINS) | ||
261 | PLUGINS=$(dirname $QTDIR/plugins/bearer) | 227 | | ||
262 | else | 228 | echo "Using plugin dir: $PLUGINS" | ||
263 | PLUGINS=../../$QTVERSION_SHORT/gc*/plugins/ | | |||
264 | fi | | |||
265 | echo $PLUGINS # /usr/lib64/qt5/plugins if build system Qt is found | | |||
266 | cp -r $PLUGINS/bearer ./usr/lib/qt5/plugins/ | 229 | cp -r $PLUGINS/bearer ./usr/lib/qt5/plugins/ | ||
267 | cp -r $PLUGINS/generic ./usr/lib/qt5/plugins/ | 230 | cp -r $PLUGINS/generic ./usr/lib/qt5/plugins/ | ||
268 | cp -r $PLUGINS/imageformats ./usr/lib/qt5/plugins/ | 231 | cp -r $PLUGINS/imageformats ./usr/lib/qt5/plugins/ | ||
269 | cp -r $PLUGINS/platforms ./usr/lib/qt5/plugins/ | 232 | cp -r $PLUGINS/platforms ./usr/lib/qt5/plugins/ | ||
270 | cp -r $PLUGINS/iconengines ./usr/lib/qt5/plugins/ | 233 | cp -r $PLUGINS/iconengines ./usr/lib/qt5/plugins/ | ||
271 | cp -r $PLUGINS/platforminputcontexts ./usr/lib/qt5/plugins/ | 234 | cp -r $PLUGINS/platforminputcontexts ./usr/lib/qt5/plugins/ | ||
272 | # cp -r $PLUGINS/platformthemes ./usr/lib/qt5/plugins/ | 235 | # cp -r $PLUGINS/platformthemes ./usr/lib/qt5/plugins/ | ||
236 | cp -r $PLUGINS/sqldrivers ./usr/lib/qt5/plugins/ # qsqlite is required for the Welcome Page plugin and for QtHelp | ||||
273 | cp -r $PLUGINS/xcbglintegrations ./usr/lib/qt5/plugins/ | 237 | cp -r $PLUGINS/xcbglintegrations ./usr/lib/qt5/plugins/ | ||
274 | 238 | | |||
239 | mkdir -p ./usr/lib/qt5/qml | ||||
240 | QML_DIR=$QTDIR/qml | ||||
241 | # for the Welcome Page plugin | ||||
242 | cp -r $QML_DIR/QtQuick ./usr/lib/qml | ||||
243 | cp -r $QML_DIR/QtQuick.2 ./usr/lib/qml | ||||
244 | | ||||
275 | cp -R /kdevelop.appdir/usr/lib/grantlee/ /kdevelop.appdir/usr/lib/qt5/plugins/ | 245 | cp -R /kdevelop.appdir/usr/lib/grantlee/ /kdevelop.appdir/usr/lib/qt5/plugins/ | ||
276 | rm -Rf /kdevelop.appdir/usr/lib/grantlee | 246 | rm -Rf /kdevelop.appdir/usr/lib/grantlee | ||
277 | 247 | | |||
248 | mkdir -p /kdevelop.appdir/$LLVM_ROOT/lib/ | ||||
249 | cp -r $LLVM_ROOT/lib/clang /kdevelop.appdir/$LLVM_ROOT/lib | ||||
250 | | ||||
278 | cp -ru /usr/share/mime/* /kdevelop.appdir/usr/share/mime | 251 | cp -ru /usr/share/mime/* /kdevelop.appdir/usr/share/mime | ||
279 | update-mime-database /kdevelop.appdir/usr/share/mime/ | 252 | update-mime-database /kdevelop.appdir/usr/share/mime/ | ||
280 | 253 | | |||
281 | cp -R ./usr/lib/plugins/* ./usr/lib/qt5/plugins/ | 254 | cp -R ./usr/lib/plugins/* ./usr/lib/qt5/plugins/ | ||
282 | rm -Rf ./usr/lib/plugins/ | 255 | rm -Rf ./usr/lib/plugins/ | ||
283 | 256 | | |||
284 | cp $(ldconfig -p | grep libsasl2.so.2 | cut -d ">" -f 2 | xargs) ./usr/lib/ | 257 | cp $(ldconfig -p | grep libsasl2.so.2 | cut -d ">" -f 2 | xargs) ./usr/lib/ | ||
285 | # Fedora 23 seemed to be missing SOMETHING from the Centos 6.7. The only message was: | 258 | # Fedora 23 seemed to be missing SOMETHING from the Centos 6.7. The only message was: | ||
Show All 22 Lines | 279 | for FILE in $FILES ; do | |||
308 | ldd "${FILE}" | grep "=>" | awk '{print $3}' | xargs -I '{}' cp -vu '{}' usr/lib || true | 281 | ldd "${FILE}" | grep "=>" | awk '{print $3}' | xargs -I '{}' cp -vu '{}' usr/lib || true | ||
309 | done | 282 | done | ||
310 | 283 | | |||
311 | # The following are assumed to be part of the base system | 284 | # The following are assumed to be part of the base system | ||
312 | rm -f usr/lib/libcom_err.so.2 || true | 285 | rm -f usr/lib/libcom_err.so.2 || true | ||
313 | rm -f usr/lib/libcrypt.so.1 || true | 286 | rm -f usr/lib/libcrypt.so.1 || true | ||
314 | rm -f usr/lib/libdl.so.2 || true | 287 | rm -f usr/lib/libdl.so.2 || true | ||
315 | rm -f usr/lib/libexpat.so.1 || true | 288 | rm -f usr/lib/libexpat.so.1 || true | ||
316 | #rm -f usr/lib/libfontconfig.so.1 || true | 289 | rm -f usr/lib/libfontconfig.so.1 || true | ||
317 | rm -f usr/lib/libgcc_s.so.1 || true | 290 | rm -f usr/lib/libgcc_s.so.1 || true | ||
318 | rm -f usr/lib/libglib-2.0.so.0 || true | 291 | rm -f usr/lib/libglib-2.0.so.0 || true | ||
319 | rm -f usr/lib/libgpg-error.so.0 || true | 292 | rm -f usr/lib/libgpg-error.so.0 || true | ||
320 | rm -f usr/lib/libgssapi_krb5.so.2 || true | 293 | rm -f usr/lib/libgssapi_krb5.so.2 || true | ||
321 | rm -f usr/lib/libgssapi.so.3 || true | 294 | rm -f usr/lib/libgssapi.so.3 || true | ||
322 | rm -f usr/lib/libhcrypto.so.4 || true | 295 | rm -f usr/lib/libhcrypto.so.4 || true | ||
323 | rm -f usr/lib/libheimbase.so.1 || true | 296 | rm -f usr/lib/libheimbase.so.1 || true | ||
324 | rm -f usr/lib/libheimntlm.so.0 || true | 297 | rm -f usr/lib/libheimntlm.so.0 || true | ||
Show All 36 Lines | |||||
361 | # We don't bundle the developer stuff | 334 | # We don't bundle the developer stuff | ||
362 | rm -rf usr/include || true | 335 | rm -rf usr/include || true | ||
363 | rm -rf usr/lib/cmake || true | 336 | rm -rf usr/lib/cmake || true | ||
364 | rm -rf usr/lib/pkgconfig || true | 337 | rm -rf usr/lib/pkgconfig || true | ||
365 | rm -rf usr/share/ECM/ || true | 338 | rm -rf usr/share/ECM/ || true | ||
366 | rm -rf usr/share/gettext || true | 339 | rm -rf usr/share/gettext || true | ||
367 | rm -rf usr/share/pkgconfig || true | 340 | rm -rf usr/share/pkgconfig || true | ||
368 | 341 | | |||
369 | strip -g $(find usr) || true | 342 | strip -g $(find usr/bin usr/lib -type f) || true | ||
370 | 343 | | |||
371 | # We do not bundle this, so let's not search that inside the AppImage. | 344 | # We do not bundle this, so let's not search that inside the AppImage. | ||
372 | # Fixes "Qt: Failed to create XKB context!" and lets us enter text | 345 | # Fixes "Qt: Failed to create XKB context!" and lets us enter text | ||
373 | #sed -i -e 's|././/share/X11/|/usr/share/X11/|g' ./usr/lib/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so | 346 | #sed -i -e 's|././/share/X11/|/usr/share/X11/|g' ./usr/lib/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so | ||
374 | #sed -i -e 's|././/share/X11/|/usr/share/X11/|g' ./usr/lib/libQt5XcbQpa.so.5 | 347 | #sed -i -e 's|././/share/X11/|/usr/share/X11/|g' ./usr/lib/libQt5XcbQpa.so.5 | ||
375 | 348 | | |||
376 | # Workaround for: | 349 | # Workaround for: | ||
377 | # D-Bus library appears to be incorrectly set up; | 350 | # D-Bus library appears to be incorrectly set up; | ||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | |||||
430 | 403 | | |||
431 | export APPIMAGE_STARTUP_QML2_IMPORT_PATH=\$QML2_IMPORT_PATH | 404 | export APPIMAGE_STARTUP_QML2_IMPORT_PATH=\$QML2_IMPORT_PATH | ||
432 | export APPIMAGE_STARTUP_LD_LIBRARY_PATH=\$LD_LIBRARY_PATH | 405 | export APPIMAGE_STARTUP_LD_LIBRARY_PATH=\$LD_LIBRARY_PATH | ||
433 | export APPIMAGE_STARTUP_QT_PLUGIN_PATH=\$QT_PLUGIN_PATH | 406 | export APPIMAGE_STARTUP_QT_PLUGIN_PATH=\$QT_PLUGIN_PATH | ||
434 | export APPIMAGE_STARTUP_XDG_DATA_DIRS=\$XDG_DATA_DIRS | 407 | export APPIMAGE_STARTUP_XDG_DATA_DIRS=\$XDG_DATA_DIRS | ||
435 | export APPIMAGE_STARTUP_PATH=\$PATH | 408 | export APPIMAGE_STARTUP_PATH=\$PATH | ||
436 | export APPIMAGE_STARTUP_PYTHONHOME=\$PYTHONHOME | 409 | export APPIMAGE_STARTUP_PYTHONHOME=\$PYTHONHOME | ||
437 | 410 | | |||
411 | export KDEV_CLANG_BUILTIN_DIR=\$DIR/opt/llvm/lib/clang/6.0.1/include | ||||
438 | export KDEV_DISABLE_PLUGINS=KDevWelcomePage | 412 | export KDEV_DISABLE_PLUGINS=KDevWelcomePage | ||
439 | 413 | | |||
440 | cd \$HOME | 414 | cd \$HOME | ||
441 | 415 | | |||
442 | kdevelop \$@ | 416 | kdevelop \$@ | ||
443 | EOF | 417 | EOF | ||
444 | chmod +x AppRun | 418 | chmod +x AppRun | ||
445 | 419 | | |||
446 | cat > kdevelop.desktop << EOF | 420 | # use normal desktop file, but remove actions, not yet handled by appimaged & Co | ||
447 | [Desktop Entry] | 421 | cp $SRC/kdevelop/app/org.kde.kdevelop.desktop kdevelop.desktop | ||
448 | GenericName=Integrated development environment | 422 | sed -i -e '/^Actions=/d;/^\[Desktop Action /Q' kdevelop.desktop | ||
449 | Name=KDevelop | | |||
450 | MimeType=text/plain; | | |||
451 | Exec=AppRun -b %U | | |||
452 | StartupNotify=true | | |||
453 | X-KDE-HasTempFileOption=true | | |||
454 | Icon=kdevelop | | |||
455 | X-DocPath=kdevelop/index.html | | |||
456 | Type=Application | | |||
457 | Terminal=false | | |||
458 | InitialPreference=9 | | |||
459 | Categories=Qt;KDE;Utility;TextEditor; | | |||
460 | EOF | | |||
461 | 423 | | |||
462 | cp $SRC/kdevelop/app/icons/48-apps-kdevelop.png kdevelop.png | 424 | cp $SRC/kdevelop/app/icons/48-apps-kdevelop.png kdevelop.png | ||
463 | cp -R /usr/lib/python3.6 /kdevelop.appdir/usr/lib/ | 425 | cp -R /usr/lib/python3.6 /kdevelop.appdir/usr/lib/ | ||
464 | rm -Rf /kdevelop.appdir/usr/lib/python3.6/{test,config-3.5m,__pycache__,site-packages,lib-dynload,distutils,idlelib,unittest,tkinter,ensurepip} | 426 | rm -Rf /kdevelop.appdir/usr/lib/python3.6/{test,config-3.5m,__pycache__,site-packages,lib-dynload,distutils,idlelib,unittest,tkinter,ensurepip} | ||
465 | 427 | | |||
466 | mkdir -p /kdevelop.appdir/usr/share/kdevelop/ | 428 | mkdir -p /kdevelop.appdir/usr/share/kdevelop/ | ||
429 | | ||||
430 | # Breeze cruft | ||||
467 | cp $BUILD/breeze-icons/icons/breeze-icons.rcc /kdevelop.appdir/usr/share/kdevelop/icontheme.rcc | 431 | cp $BUILD/breeze-icons/icons/breeze-icons.rcc /kdevelop.appdir/usr/share/kdevelop/icontheme.rcc | ||
468 | rm -Rf /kdevelop.appdir/usr/share/icons/breeze* # not needed because of the rcc | 432 | rm -Rf /kdevelop.appdir/usr/share/icons/breeze* # not needed because of the rcc | ||
433 | rm -Rf /kdevelop.appdir/usr/share/wallpapers | ||||
434 | | ||||
469 | rm -f /kdevelop.appdir/usr/bin/llvm* | 435 | rm -f /kdevelop.appdir/usr/bin/llvm* | ||
470 | rm -f /kdevelop.appdir/usr/bin/clang* | 436 | rm -f /kdevelop.appdir/usr/bin/clang* | ||
471 | rm -f /kdevelop.appdir/usr/bin/opt | 437 | rm -f /kdevelop.appdir/usr/bin/opt | ||
472 | rm -f /kdevelop.appdir/usr/bin/lli | 438 | rm -f /kdevelop.appdir/usr/bin/lli | ||
473 | rm -f /kdevelop.appdir/usr/bin/sancov | 439 | rm -f /kdevelop.appdir/usr/bin/sancov | ||
474 | rm -f /kdevelop.appdir/usr/bin/cmake | 440 | rm -f /kdevelop.appdir/usr/bin/cmake | ||
475 | rm -f /kdevelop.appdir/usr/bin/python | 441 | rm -f /kdevelop.appdir/usr/bin/python | ||
476 | rm -Rf /kdevelop.appdir/usr/lib/pkgconfig | 442 | rm -Rf /kdevelop.appdir/usr/lib/pkgconfig | ||
477 | rm -Rf /kdevelop.appdir/usr/share/man | 443 | rm -Rf /kdevelop.appdir/usr/share/man | ||
478 | rm -Rf /kdevelop.appdir/usr/share/locale | 444 | rm -Rf /kdevelop.appdir/usr/share/locale | ||
479 | rm -Rf /kdevelop.appdir/usr/lib/libLTO.so | 445 | rm -Rf /kdevelop.appdir/usr/lib/libLTO.so | ||
480 | 446 | | |||
481 | #At first it seems like "we shouldn't ship X11", but actually we should; the X11 protocol is sort of guaranteed to stay compatible, | 447 | #At first it seems like "we shouldn't ship X11", but actually we should; the X11 protocol is sort of guaranteed to stay compatible, | ||
482 | #while these libraries are not. | 448 | #while these libraries are not. | ||
483 | # rm -Rf /kdevelop.appdir/usr/lib/libxcb* | 449 | # rm -Rf /kdevelop.appdir/usr/lib/libxcb* | ||
484 | # add that back in | 450 | # add that back in | ||
485 | # cp /usr/lib64/libxcb-keysyms.so.1 /kdevelop.appdir/usr/lib/ | 451 | # cp /usr/lib64/libxcb-keysyms.so.1 /kdevelop.appdir/usr/lib/ | ||
486 | # rm -Rf /kdevelop.appdir/usr/lib/{libX11.so.6,libXau.so.6,libXext.so.6,libXi.so.6,libXxf86vm.so.1,libX11-xcb.so.1,libXdamage.so.1,libXfixes.so.3,libXrender.so.1} | 452 | # rm -Rf /kdevelop.appdir/usr/lib/{libX11.so.6,libXau.so.6,libXext.so.6,libXi.so.6,libXxf86vm.so.1,libX11-xcb.so.1,libXdamage.so.1,libXfixes.so.3,libXrender.so.1} | ||
487 | 453 | | |||
488 | rm -f /kdevelop.appdir/usr/bin/llc | 454 | rm -f /kdevelop.appdir/usr/bin/llc | ||
489 | rm -f /kdevelop.appdir/usr/bin/bugpoint | 455 | rm -f /kdevelop.appdir/usr/bin/bugpoint | ||
490 | 456 | | |||
491 | find /kdevelop.appdir -name '*.a' -exec rm {} \; | 457 | find /kdevelop.appdir -name '*.a' -exec rm {} \; | ||
492 | 458 | | |||
459 | echo "Final listing of files which will end up in the AppImage:" | ||||
460 | find /kdevelop.appdir | ||||
461 | | ||||
493 | cd / | 462 | cd / | ||
494 | 463 | | |||
495 | APP=KDevelop | 464 | APP=KDevelop | ||
496 | 465 | | |||
497 | VERSION="git" | 466 | VERSION="git" | ||
498 | 467 | | |||
499 | if [[ "$ARCH" = "x86_64" ]] ; then | 468 | if [[ "$ARCH" = "x86_64" ]] ; then | ||
500 | APPIMAGE=$APP"-"$VERSION"-x86_64.AppImage" | 469 | APPIMAGE=$APP"-"$VERSION"-x86_64.AppImage" | ||
501 | fi | 470 | fi | ||
502 | if [[ "$ARCH" = "i686" ]] ; then | 471 | if [[ "$ARCH" = "i686" ]] ; then | ||
503 | APPIMAGE=$APP"-"$VERSION"-i386.AppImage" | 472 | APPIMAGE=$APP"-"$VERSION"-i386.AppImage" | ||
504 | fi | 473 | fi | ||
505 | echo $APPIMAGE | 474 | echo $APPIMAGE | ||
506 | 475 | | |||
476 | # Get appimagetool | ||||
477 | mkdir -p $SRC/appimagetool | ||||
478 | pushd $SRC/appimagetool | ||||
479 | wget -c -O appimagetool https://github.com/AppImage/AppImageKit/releases/download/11/appimagetool-x86_64.AppImage | ||||
480 | chmod +x ./appimagetool | ||||
481 | ./appimagetool --appimage-extract # no fuse on this docker instance... | ||||
482 | export PATH=$PWD/squashfs-root/usr/bin:$PATH | ||||
483 | popd | ||||
484 | | ||||
507 | mkdir -p /out | 485 | mkdir -p /out | ||
508 | 486 | | |||
509 | rm -f /out/*.AppImage || true | 487 | rm -f /out/*.AppImage || true | ||
510 | AppImageKit/AppImageAssistant.AppDir/package /kdevelop.appdir/ /out/$APPIMAGE | 488 | appimagetool /kdevelop.appdir/ /out/$APPIMAGE | ||
511 | 489 | | |||
512 | chmod a+rwx /out/$APPIMAGE # So that we can edit the AppImage outside of the Docker container | 490 | chmod a+rwx /out/$APPIMAGE # So that we can edit the AppImage outside of the Docker container |