summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTinu Weber2019-05-02 10:51:33 +0200
committerTinu Weber2019-05-02 11:01:23 +0200
commitd84025f891c4dfc33c57e0580aef5de8ac6aca50 (patch)
tree8edf7aa356b9b80a7b23c1524cad28bdedf9cee4
parent2661c7204c46a16580314748a5b95554a55a25c6 (diff)
downloadaur-epfl-menu-git.tar.gz
r16-6: Fix dependencies and license location + minor other changes
* Put my gnugen.ch homepage URL rather than my EPFL e-mail address in the maintainer line (more sustainable). * Rearrange variable declarations more logically (the "mandatory quadruple" (pkgname, pkgver, pkgrel, arch) first, the optional ones (pkgdesc, url, license) second). * Get rid of the _pkgname variable; it just makes things hard to read. * Add python to depends; the program itself *directly* depends on it. * Add coreutils to makedepends; we use `mkdir` and `head`. * Use %d format specifier for the commit count (the output should be numerical anyway). * License files should always go in /usr/share/licenses/$pkgname; no need to strip the -git away from the directory name there.
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD24
2 files changed, 16 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c402347b012c..a9bbdb03286a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,20 @@
pkgbase = epfl-menu-git
pkgdesc = Pretty-print the lunch and supper menus at the EPFL
pkgver = r16.2406823
- pkgrel = 5
+ pkgrel = 6
url = https://github.com/gcmalloc/epfl-menu
arch = any
license = custom:Beerware
+ makedepends = coreutils
makedepends = python-setuptools
+ depends = python
provides = epfl-menu
conflicts = epfl-menu
source = git+https://github.com/gcmalloc/epfl-menu
md5sums = SKIP
pkgname = epfl-menu-git
+ depends = python
depends = python-beautifulsoup4
depends = python-urllib3
diff --git a/PKGBUILD b/PKGBUILD
index b58e7402d2b9..e88f32d2f0c4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,16 +1,16 @@
-# Maintainer: Tinu Weber <martin.weber@epfl.ch>
+# Maintainer: Tinu Weber <https://gnugen.ch/~mtweber>
pkgname=epfl-menu-git
-_pkgname=epfl-menu
pkgver=r16.2406823
-pkgrel=5
+pkgrel=6
+arch=(any)
pkgdesc='Pretty-print the lunch and supper menus at the EPFL'
-arch=(any)
url='https://github.com/gcmalloc/epfl-menu'
license=(custom:Beerware)
-makedepends=(python-setuptools)
+depends=(python)
+makedepends=(coreutils python-setuptools)
conflicts=(epfl-menu)
provides=(epfl-menu)
@@ -19,21 +19,21 @@ source=('git+https://github.com/gcmalloc/epfl-menu')
md5sums=(SKIP)
pkgver() {
- cd "$srcdir/$_pkgname"
- printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ cd epfl-menu
+ printf 'r%d.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
- cd "$srcdir/$_pkgname"
+ cd epfl-menu
python3 setup.py build
}
package() {
- depends=(python-beautifulsoup4 python-urllib3)
+ depends+=(python-beautifulsoup4 python-urllib3)
- cd "$srcdir/$_pkgname"
+ cd epfl-menu
python3 setup.py install --root="$pkgdir" --optimize=1
- mkdir -p "$pkgdir"/usr/share/licenses/epfl-menu
- head -n 8 epfl/menu.py > "$pkgdir"/usr/share/licenses/epfl-menu/LICENSE
+ mkdir -p "$pkgdir"/usr/share/licenses/"$pkgname"
+ head -n8 epfl/menu.py >"$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}