summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e88f32d2f0c4e426ba0e29814c266e8b8a5594f9 (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
# Maintainer: Tinu Weber <https://gnugen.ch/~mtweber>

pkgname=epfl-menu-git
pkgver=r16.2406823
pkgrel=6
arch=(any)

pkgdesc='Pretty-print the lunch and supper menus at the EPFL'
url='https://github.com/gcmalloc/epfl-menu'
license=(custom:Beerware)

depends=(python)
makedepends=(coreutils python-setuptools)

conflicts=(epfl-menu)
provides=(epfl-menu)

source=('git+https://github.com/gcmalloc/epfl-menu')
md5sums=(SKIP)

pkgver() {
  cd epfl-menu
  printf 'r%d.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd epfl-menu
  python3 setup.py build
}

package() {
  depends+=(python-beautifulsoup4 python-urllib3)

  cd epfl-menu
  python3 setup.py install --root="$pkgdir" --optimize=1

  mkdir -p "$pkgdir"/usr/share/licenses/"$pkgname"
  head -n8 epfl/menu.py >"$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}