2019-01-09 00:34:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
|
|
|
# building in temporary directory to keep system clean
|
|
|
|
# use RAM disk if possible (as in: not building on CI system like Travis, and RAM disk is available)
|
|
|
|
if [ "$CI" == "" ] && [ -d /dev/shm ]; then
|
|
|
|
TEMP_BASE=/dev/shm
|
|
|
|
else
|
|
|
|
TEMP_BASE=/tmp
|
|
|
|
fi
|
|
|
|
|
|
|
|
BUILD_DIR=$(mktemp -d -p "$TEMP_BASE" AppImageLauncher-build-XXXXXX)
|
|
|
|
|
2019-02-23 01:45:05 +00:00
|
|
|
# make sure to clean up build dir, even if errors occur
|
|
|
|
cleanup () {
|
|
|
|
if [ -d "$BUILD_DIR" ]; then
|
|
|
|
rm -rf "$BUILD_DIR"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
trap cleanup EXIT
|
|
|
|
|
2019-01-09 00:34:46 +00:00
|
|
|
# store repo root as variable
|
|
|
|
REPO_ROOT=$(readlink -f $(dirname $(dirname $0)))
|
|
|
|
OLD_CWD=$(readlink -f .)
|
|
|
|
|
|
|
|
# switch to build dir
|
|
|
|
pushd "$BUILD_DIR"
|
|
|
|
|
|
|
|
# configure build files with cmake
|
|
|
|
# we need to explicitly set the install prefix, as CMake's default is /usr/local for some reason...
|
2022-12-25 13:21:38 +00:00
|
|
|
cmake -G Ninja \
|
2021-03-02 18:40:22 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
|
-DRELEASE=ON \
|
|
|
|
-DBUILD_AUDACIOUS=ON \
|
2022-10-14 13:13:31 +00:00
|
|
|
-DBUILD_DOCS=ON \
|
2021-03-02 18:40:22 +00:00
|
|
|
-DBUILD_HTTP=ON \
|
|
|
|
-DBUILD_ICAL=ON \
|
|
|
|
-DBUILD_ICONV=ON \
|
|
|
|
-DBUILD_IRC=ON \
|
|
|
|
-DBUILD_IRC=ON \
|
|
|
|
-DBUILD_JOURNAL=ON \
|
|
|
|
-DBUILD_LUA_CAIRO=ON \
|
|
|
|
-DBUILD_LUA_IMLIB2=ON \
|
|
|
|
-DBUILD_LUA_RSVG=ON \
|
|
|
|
-DBUILD_MYSQL=ON \
|
|
|
|
-DBUILD_NVIDIA=ON \
|
|
|
|
-DBUILD_PULSEAUDIO=ON \
|
|
|
|
-DBUILD_RSS=ON \
|
2022-12-24 15:57:50 +00:00
|
|
|
-DBUILD_WAYLAND=OFF \
|
2021-03-02 18:40:22 +00:00
|
|
|
-DBUILD_WLAN=ON \
|
|
|
|
-DBUILD_X11=ON \
|
|
|
|
-DBUILD_XMMS2=ON \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
2022-12-25 13:21:38 +00:00
|
|
|
"$REPO_ROOT" \
|
|
|
|
--target install -- DESTDIR=AppDir
|
2019-01-09 00:34:46 +00:00
|
|
|
|
|
|
|
# build project and install files into AppDir
|
2022-12-25 13:21:38 +00:00
|
|
|
ninja
|
|
|
|
ninja install
|
2019-01-09 00:34:46 +00:00
|
|
|
|
|
|
|
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
|
|
|
|
|
|
|
# make them executable
|
|
|
|
chmod +x linuxdeploy-x86_64.AppImage
|
|
|
|
|
|
|
|
./linuxdeploy-x86_64.AppImage \
|
2021-03-02 18:40:22 +00:00
|
|
|
--appdir AppDir \
|
|
|
|
-e AppDir/usr/bin/conky \
|
|
|
|
-i AppDir/usr/share/icons/hicolor/scalable/apps/conky-logomark-violet.svg \
|
|
|
|
-d AppDir/usr/share/applications/conky.desktop
|
2019-01-09 00:34:46 +00:00
|
|
|
|
2019-02-23 00:24:30 +00:00
|
|
|
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
|
|
|
|
2019-02-23 00:39:21 +00:00
|
|
|
chmod +x appimagetool-x86_64.AppImage
|
2019-02-23 00:24:30 +00:00
|
|
|
|
2019-02-23 02:12:15 +00:00
|
|
|
./appimagetool-x86_64.AppImage AppDir --sign --sign-key E3034071
|
2019-02-23 00:24:30 +00:00
|
|
|
|
2022-09-12 18:15:12 +00:00
|
|
|
for f in conky*.AppImage
|
|
|
|
do
|
|
|
|
sha256sum $f > $f.sha256
|
|
|
|
done
|
|
|
|
|
|
|
|
mv conky*.AppImage* "$OLD_CWD"
|
2022-10-14 13:13:31 +00:00
|
|
|
|
2022-10-15 04:34:06 +00:00
|
|
|
# gzip & copy the man page, which will be attached to releases
|
|
|
|
gzip doc/conky.1
|
|
|
|
mv doc/conky.1.gz "$OLD_CWD"
|