From 5c1fccdcfaceda06e7cd61f13fd2affeebea12ab Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Tue, 9 May 2017 20:57:24 +0300 Subject: [PATCH] Add PKGBUILD Thanks @ha:matrix.org for the initial script --- dist/AUR/PKGBUILD | 49 +++++++++++++++++++++++++++++++++++++++++ resources/nheko.desktop | 11 +++++++++ 2 files changed, 60 insertions(+) create mode 100644 dist/AUR/PKGBUILD create mode 100644 resources/nheko.desktop diff --git a/dist/AUR/PKGBUILD b/dist/AUR/PKGBUILD new file mode 100644 index 00000000..1d525ad3 --- /dev/null +++ b/dist/AUR/PKGBUILD @@ -0,0 +1,49 @@ +# Maintainer: Konstantinos Sideris + +pkgname=nheko-git +pkgver=0.1.0.e78e43c86a39 +pkgrel=1 +pkgdesc="Desktop client for the Matrix protocol" +arch=('i686' 'x86_64') + +url="https://github.com/mujx/nheko" +license=('GPL3') + +depends=('qt5-base') +makedepends=('git' 'cmake' 'gcc' 'fontconfig') + +source=($pkgname::git+https://github.com/mujx/nheko.git) +md5sums=('SKIP') + +pkgver() { + cd "$pkgname" + printf "0.1.0.%s" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$pkgname" + cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release + make -C build -j2 +} + +package() { + # Creating needed directories + install -dm755 "$pkgdir/usr/bin" + install -dm755 "$pkgdir/usr/share/pixmaps/" + install -dm755 "$pkgdir/usr/share/applications/" + + # Program + install -Dm755 "$pkgname/build/nheko" "$pkgdir/usr/bin/nheko" + + # Desktop launcher + install -Dm644 "$srcdir/$pkgname/resources/nheko-256.png" "$pkgdir/usr/share/pixmaps/nheko.png" + install -Dm644 "$srcdir/$pkgname/resources/nheko.desktop" "$pkgdir/usr/share/applications/nheko.desktop" + + # Icons + local icon_size icon_dir + for icon_size in 16 32 48 64 128 256 512; do + icon_dir="$pkgdir/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps" + install -d "$icon_dir" + install -m644 "$srcdir/$pkgname/resources/nheko-${icon_size}.png" "$icon_dir/nheko.png" + done +} diff --git a/resources/nheko.desktop b/resources/nheko.desktop new file mode 100644 index 00000000..f8a20fea --- /dev/null +++ b/resources/nheko.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=nheko +Version=0.1 +Comment=Desktop client for Matrix +Exec=nheko +Icon=nheko +Type=Application +Categories=Network;InstantMessaging;Qt; +Encoding=UTF-8 +StartupWMClass=nheko +Terminal=false