Date: Friday, April 16, 2021 @ 22:15:42 Author: bgyorgy Revision: 919577
upgpkg: torrential 1.1.0-5: Add symlink for the binary, fix metainfo file Modified: torrential/trunk/PKGBUILD ----------+ PKGBUILD | 64 +++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 29 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-04-16 21:40:35 UTC (rev 919576) +++ PKGBUILD 2021-04-16 22:15:42 UTC (rev 919577) @@ -1,25 +1,26 @@ # Maintainer: Balló György <ballogyor+arch at gmail dot com> pkgname=torrential +_id=com.github.davidmhewitt.torrential pkgver=1.1.0 -pkgrel=4 -pkgdesc="Simple BitTorrent client for elementary OS" -arch=(x86_64) -url="https://github.com/davidmhewitt/torrential" -license=(GPL) -depends=(granite libevent libnatpmp miniupnpc) -makedepends=(cmake git vala) +pkgrel=5 +pkgdesc='Simple BitTorrent client for Pantheon' +arch=('x86_64') +url='https://github.com/davidmhewitt/torrential' +license=('GPL') +depends=('granite' 'libevent' 'libnatpmp' 'miniupnpc') +makedepends=('cmake' 'git' 'vala') _commit=1d731f992e4567e102d1ffa28a0c44c4322eba76 # tags/1.1.0 -source=("git+https://github.com/davidmhewitt/torrential#commit=$_commit" - "transmission-torrential::git+https://github.com/davidmhewitt/transmission" - "git+https://github.com/transmission/dht" - "git+https://github.com/transmission/libb64" - "git+https://github.com/transmission/libevent" - "git+https://github.com/transmission/libnatpmp" - "git+https://github.com/transmission/libutp" - "git+https://github.com/transmission/miniupnpc" - "no-unity.patch" - "patch-vala.patch") +source=("git+https://github.com/davidmhewitt/torrential.git#commit=$_commit" + 'transmission-torrential::git+https://github.com/davidmhewitt/transmission.git' + 'git+https://github.com/transmission/dht.git' + 'git+https://github.com/transmission/libb64.git' + 'git+https://github.com/transmission/libevent.git' + 'git+https://github.com/transmission/libnatpmp.git' + 'git+https://github.com/transmission/libutp.git' + 'git+https://github.com/transmission/miniupnpc.git' + 'no-unity.patch' + 'patch-vala.patch') sha256sums=('SKIP' 'SKIP' 'SKIP' @@ -37,8 +38,20 @@ } prepare() { - [[ -d build ]] || mkdir build cd $pkgname + + # Remove Unity support + patch -Np1 -i ../no-unity.patch + + # Fix build with vala 0.52 + patch -Np1 -i ../patch-vala.patch + + # Don't treat warnings as fatal + sed -i '/--fatal-warnings/d' CMakeLists.txt + + # Fix metainfo file + sed -i "/<id>/a <launchable type=\"desktop-id\">$_id.desktop</launchable>" data/$_id.appdata.xml + git submodule init git submodule set-url transmission "$srcdir/transmission-torrential" git submodule update @@ -52,21 +65,14 @@ git submodule set-url third-party/libutp "$srcdir/libutp" git submodule set-url third-party/miniupnpc "$srcdir/miniupnpc" git submodule update - - cd .. - patch -Np1 -i ../no-unity.patch - patch -Np1 -i ../patch-vala.patch - sed -i '/--fatal-warnings/d' CMakeLists.txt } build() { - cd build - cmake -G "Unix Makefiles" ../$pkgname/ \ - -DCMAKE_INSTALL_PREFIX=/usr - make + cmake -S $pkgname -B build -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX='/usr' + cmake --build build } package() { - cd build - make DESTDIR="$pkgdir" install + DESTDIR="$pkgdir" cmake --install build + ln -s $_id "$pkgdir/usr/bin/$pkgname" }
