summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: eb35c090f158d6137182669053057ddb43dbfd08 (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
# packager: teraflops <cprieto.ortiz@gmail.com>
pkgname=bepasty-cli
pkgver=r55.d48e9d1
pkgrel=1
pkgdesc="CLI client for bepasty-server."
arch=('any')
url="https://github.com/bepasty/bepasty-client-cli"
license=('BSD')
depends=('python' 'python-requests' 'python-magic')
makedepends=('git' 'python-setuptools')
provides=('bepasty-cli')
conflicts=('bepasty-cli')
source=("${pkgname}::git+https://github.com/bepasty/bepasty-client-cli.git")
md5sums=('SKIP')
pkgver() {
  cd "${srcdir}/${pkgname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "${srcdir}/${pkgname}"
  sed -i 's/ftype = mime.from_buffer(first_chunk).decode()/ftype = mime.from_buffer(first_chunk)/' bepasty_cli/cli.py
}

build() {
  cd "${srcdir}/${pkgname}"
  python setup.py build
}

package() {
  cd "${srcdir}/${pkgname}"
  python setup.py install --root="${pkgdir}" --optimize=1
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

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