blob: faa7bf7d5e508dbb0e767b2cbc7bea6209355a78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# To use Qt5 build, define 'QT5_BUILD' environment variable. Example:
# QT5_BUILD= makepkg -si
pkgname=torrent-file-editor
pkgver=0.3.18
pkgrel=3
pkgdesc='Qt based GUI tool designed to create and edit .torrent files'
arch=('x86_64')
url="https://${pkgname}.github.io/"
license=('GPL-3.0-or-later')
depends=()
makedepends=('cmake')
_buildflags=()
if [[ -v 'QT5_BUILD' ]]; then
depends+=('qt5-base')
makedepends+=('qt5-tools')
_buildflags+=('QT6_BUILD=OFF' 'QT5_BUILD=ON')
else
depends+=('qt6-base' 'qt6-5compat')
makedepends+=('qt6-tools')
_buildflags+=('QT6_BUILD=ON' 'QT5_BUILD=OFF')
fi
_buildflags=("${_buildflags[@]/#/'-D'}")
_snapshot="${pkgname}-${pkgver}"
source=("https://github.com/${pkgname}/${pkgname}/releases/download/v${pkgver}/${_snapshot}.tar.gz")
sha256sums=('78b69e0151c5998b4df8b69225e7930c18b7d4419eeaabcad769df0f38a86292')
build() {
cmake -B 'build' -S "${_snapshot}" \
-DCMAKE_INSTALL_PREFIX=/usr \
"${_buildflags[@]}"
cmake --build 'build'
}
package() {
DESTDIR="${pkgdir}" cmake --install 'build'
}
|