summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b0eb0e173ea56afed7a127f1993d552e6d4b61e9 (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
# Maintainer: malacology
# Contributor: lilydjwg <lilydjwg@gmail.com>

pkgname=archrepo2-git
epoch=2
pkgver=0.5.r18.gc003123
pkgrel=2
pkgdesc="Arch Linux repository manager"
arch=('any')
url="https://github.com/lilydjwg/archrepo2"
license=('MIT')
depends=('python' 'python-setuptools' 'python-tornado' 'python-pyinotify' 'pacman')
makedepends=('git')
source=('git://github.com/lilydjwg/archrepo2.git')
md5sums=('SKIP')
backup=(etc/archrepo2.ini)

_gitroot=archrepo2

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

build() {
  cd $srcdir/$_gitroot
  python3 setup.py build
}

package() {
  cd $srcdir/$_gitroot
  python3 setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dm644 misc/archrepo2.service $pkgdir/usr/lib/systemd/system/archrepo2.service
  install -Dm644 misc/archrepo2.ini.example $pkgdir/etc/archrepo2.ini
}

# vim:set ts=2 sw=2 et: