summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d3323209d71474c15033c5d1c2fd2850c5558867 (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
55
56
57
58
59
60
61
62
# Maintainer: Klaus Alexander Seistrup <klaus@seistrup.dk>
# -*- sh -*-

pkgname='python-metno-locationforecast'
_pkgname="${pkgname#python-}"
pkgver=1.1.0
pkgrel=1
pkgdesc='Python interface for the MET Norway Locationforecast/2.0 weather service'
arch=('any')
license=('MIT')
url='https://github.com/Rory-Sullivan/metno-locationforecast'
source=(
  "$_pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v${pkgver}.tar.gz"
  'setup-py.diff'
)
depends=(
  'python'
  'python-requests'
)
makedepends=(
  'python-setuptools'
)
provided=("$pkgname")
conflicts=("$pkgname" "$pkgname-git")
sha256sums=(
  'b24fb745fcb307e74e885b632ffdbc8a53a5401d2a8f094a66f02ce1b78bbbf7'
  'd8c2128c2deb3dc5ac2b0d27817269f2b830466b3b6553b96bea2d1c7c4fd14a'
)
sha512sums=(
  'a61866e020385409e892d441ec5dbdb53e4f235af2521e9e53a1a5d69479344244e4ddd8fc6033d0d4c63df8c1eec9a15894f59b9e140edec0de619b72ae42e5'
  '40586fa435fc1071391bfb7ef4aed6e9b16328ca8d66f3c8cc61858d99294396d50fa80482d9e1dc65939112e18408341e39d06063795f259f89899ad836c6f4'
)
b2sums=(
  'ab91bab97ac500ed9e11f2ba30e9636c37aa70e77c5336e2a8b2ec60b9d3c7b963a54f11d1817b3c7c54334229aac33743b015f714b38b977bf7a09c9b9f9172'
  '09f0f08eb3bfb6a1be64e65cb4ec1d1d8714ef3c73faa181b5652090aee7ab33ce166a41a14b959bf0a2fc69cc11e75b35fcf3295ea3c6486f5de66e64145d75'
)

prepare() {
  cd "$_pkgname-$pkgver" || exit 1

  patch -Np1 -i "$srcdir/setup-py.diff"
}

build() {
  cd "$srcdir/$_pkgname-$pkgver" || exit 1

  python setup.py build
}

package() {
  cd "$srcdir/$_pkgname-$pkgver" || exit 1

  python setup.py install --root="$pkgdir" --prefix=/usr --optimize=1 --skip-build

  install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  for mdfile in CHANGELOG.md README.md; do
    install -Dm0644 "$mdfile" "$pkgdir/usr/share/doc/$pkgname/$mdfile"
  done
}

# eof