diff options
-rw-r--r-- | testing/nheko/APKBUILD | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/testing/nheko/APKBUILD b/testing/nheko/APKBUILD new file mode 100644 index 0000000000..e1a7258a74 --- /dev/null +++ b/testing/nheko/APKBUILD @@ -0,0 +1,55 @@ +# Contributor: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> +pkgname=nheko +pkgver=0.1.0 +pkgrel=0 +pkgdesc="Qt5-based client for Matrix protocol" +url="https://github.com/mujx/nheko" +arch="all" +license="GPL-3.0+" +depends="" +depends_dev="" +makedepends="cmake qt5-qtbase-dev qt5-qttools-dev qt5-qtmultimedia-dev lmdb-dev $depends_dev" +install="" +source="nheko-$pkgver.tar.bz2::https://github.com/mujx/nheko/releases/download/v$pkgver/nheko.tar.bz2" +builddir="$srcdir/nheko" + +build() { + cd "$builddir" + if [ "$CBUILD" != "$CHOST" ]; then + CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" + fi + mkdir -p build + cd "$builddir"/build + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=True \ + -DCMAKE_SKIP_RPATH=True \ + -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + ${CMAKE_CROSSOPTS} .. + make +} + +check() { + cd "$builddir"/build + CTEST_OUTPUT_ON_FAILURE=TRUE ctest +} + +package() { + cd "$builddir"/build + install -D -m755 nheko "$pkgdir"/usr/bin/nheko + install -D -m644 libs/matrix-structs/libmatrix_structs.so "$pkgdir"/usr/lib/libmatrix_structs.so + install -D -m644 ../resources/nheko-256.png "$pkgdir"/usr/share/pixmaps/nheko-256.png + install -D -m644 ../resources/nheko.desktop "$pkgdir"/usr/share/applications/nheko.desktop + + local size dir + for size in 16 32 48 64 128 256 512; do + dir="$pkgdir"/usr/share/icons/hicolor/${size}x${size}/apps + install -D -m644 ../resources/nheko-${size}.png "$dir"/nheko.png; + done +} + +sha512sums="0de58235c66c7374937ecfadc65cbe34dc99a497a7efc79b55517355418d5093136037dbbae4193835d62f755b2e889f84edeacb1408c3e31770ca3c3bb477d1 nheko-0.1.0.tar.bz2" |