summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 55d5535e0e6eef96fd7d45519ebf84cc53104613 (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
54
# Maintainer: Anthony Ruhier <anthony.ruhier@gmail.com>
# Many thanks to Justin Dray, maintainer of sickrage, for his PKGBUILD used as
# a base for this one.

pkgname=headphones-git
pkgver=0.5.18.r159.gda9287d7
pkgrel=2
pkgdesc="Music downloader for usenet and torrents."
arch=('any')
url="https://github.com/rembo10/headphones"
license=('GPL3')
depends=('python2')
optdepends=('sabnzbd: usenet downloader'
            'nzbget: usenet downloader'
            'transmission-cli: torrent downloader (CLI and daemon)'
            'transmission-gtk: torrent downloader (GTK+)'
            'transmission-qt: torrent downloader (Qt)'
            'deluge: torrent downloader'
            'rtorrent: torrent downloader'
            'jackett: torrent indexer proxy')
makedepends=('git')
provides=('headphones')
conflicts=('headphones')
options=('!strip')
install='headphones.install'
source=('git+https://github.com/rembo10/headphones.git'
        'headphones-system.service'
        'headphones-user.service'
        'headphones.sysusers'
        'headphones.tmpfiles')

sha256sums=('SKIP'
            '60ef2bc4c0bc1d23d4fe43202759cb24d9f456bd00cb8841ee11b2c4cbce917e'
            '9b753f7c3a7f81db01e814b2edb6b44a8c7b1e755c70a394082ca5fce5e2c5d7'
            '348abc0627d63762a97655b5893c306e5b923857be5d0b876e9df5fea7ef9ed9'
            'f1e537c6853c3d641ec2266283b726a8fa5ed8f78c4325d295e66bb4d4868585')

pkgver() {
  cd "${srcdir}/headphones"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}

package() {
  install -d -m 755 "${pkgdir}/usr/lib/headphones"
  cp -a "${srcdir}/headphones"/* "${pkgdir}/usr/lib/headphones"
  rm -rf "${pkgdir}/usr/lib/headphones/.git"

  install -D -m 644 headphones-system.service "${pkgdir}/usr/lib/systemd/system/headphones.service"
  install -D -m 644 headphones-user.service "${pkgdir}/usr/lib/systemd/user/headphones.service"
  install -D -m 644 headphones.sysusers "${pkgdir}/usr/lib/sysusers.d/headphones.conf"
  install -D -m 644 headphones.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/headphones.conf"
}

# vim: set ts=2 sw=2 ft=sh noet: