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

pkgname=archrepo2-git
epoch=2
pkgver=0.5.r23.g954068b
pkgrel=2
pkgdesc="Arch Linux repository manager"
arch=('any')
url="https://github.com/lilydjwg/archrepo2"
license=('MIT')
depends=('python' 'python-tornado' 'python-pyinotify' 'pacman' 'pyalpm')
makedepends=('git' 'python-setuptools')
source=('git+https://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: