summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4dea74f19fe17436b0ed749db7b78be98c65d73a (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
43
44
45
46
47
48
49
50
51
52
53
# Maintainer: bkuri <aur+nzbget-git@bkuri.com>
# Contributor: selfdenial <selfdenial@pm.me>
# Contributor: Nicola Hinssen <nicola.hinssen@gmail.com>
# Contributor: Jan Holthuis <holthuis.jan@googlemail.com>

pkgname=nzbget-git
pkgver=24.1.r2453.03916079
pkgrel=1
pkgdesc="Download from Usenet using .nzb files"
arch=('x86_64')
url="https://github.com/nzbgetcom/nzbget"
license=('GPL')
depends=('libxml2' 'openssl' 'boost-libs')
makedepends=('autoconf' 'git')
optdepends=('python: run scripts'
            'unrar: unpacking archives' 
            'p7zip: unpacking archives' 
            'par2cmdline: verificate and repair PAR 2.0 files')
provides=('nzbget' 'nzbget-systemd')
conflicts=('nzbget' 'nzbget-systemd')
install=nzbget.install
source=("$pkgname::git+https://github.com/nzbgetcom/nzbget.git#branch=develop"
        "nzbget.service")
sha256sums=('SKIP'
            'e92d2d09e56930475c9f28641a3326a17aa187834e1bd6328a65b6ed7cc25e99')

pkgver() {
  cd "$pkgname"
  printf "%s.r%s.%s" "$(git describe --tags | sed 's/^v//;s/-.*//g')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/$pkgname"

  autoreconf --install
  ./configure --prefix=/usr --sbindir='/usr/bin' --enable-parcheck --with-tlslib=OpenSSL
  make
}

package() {
  cd "$srcdir/$pkgname"

  make DESTDIR="$pkgdir/" install

  install -d "${pkgdir}/usr/share/nzbget"
  install -m 644 -t "${pkgdir}/usr/share/nzbget" README.md

  cd "$srcdir"

  install -d "${pkgdir}/usr/lib/systemd/system"
  install -m 644 -t "${pkgdir}/usr/lib/systemd/system" nzbget.service
  install -dm 750 "${pkgdir}/var/lib/nzbget"
}