Subject: [PATCH] testing/bemenu: new aport

From: Cosmo Borsky <[email-masked]>
Date: Mon, 5 Aug 2019 18:01:11 +0000

https://github.com/Cloudef/bemenu
Dynamic menu library and client program inspired by dmenu
---
 testing/bemenu/APKBUILD | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 testing/bemenu/APKBUILD

diff --git a/testing/bemenu/APKBUILD b/testing/bemenu/APKBUILD
new file mode 100644
index 0000000000..b494834568
--- /dev/null
+++ b/testing/bemenu/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Cosmo Borsky <[email-masked]>
+# Maintainer: Cosmo Borsky <[email-masked]>
+pkgname="bemenu"
+pkgver="0.1.0"
+pkgrel=0
+pkgdesc="Dynamic menu library and client program inspired by dmenu with support for wayland compositors"
+url="https://github.com/Cloudef/bemenu"
+arch="x86_64" 
+license="GPL3 LGPL3"
+depends="pango"
+makedepends="cmake libxkbcommon libxinerama ncurses wayland"
+install=""
+subpackages=""
+source="
+	$pkgname-$pkgver.tar.gz::https://github.com/Cloudef/$pkgname/archive/$pkgver.tar.gz
+"
+builddir="$srcdir/"
+
+build() {
+	cd "bemenu-$pkgver"
+	cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib
+	make
+}
+
+check() {
+	cd "bemenu-$pkgver"
+	make test
+}
+
+package() {
+	cd "bemenu-$pkgver"
+	make DESTDIR="$pkgdir" install
+}
+
+sha512sums="309d58bed4c46b07c856d951a52c7f13adea560aefc921c96c79418424985bcb0e6b5b72c482186f4c42ab754d67c33002bf41f813761afa724ccc410246af3a  bemenu-0.1.0.tar.gz"
-- 
2.22.0

---

From: "Leo" <[email-masked]>
Date: Mon, 05 Aug 2019 15:29:10 -0300

> +arch="x86_64" 

Why explicitly only x86_64 ? 

> +license="GPL3 LGPL3"

Need to use SPDX identifiers for the license and a SPDX keyword to indicate the relationship between them

> +depends="pango"

Don't think this is necessary

> +makedepends="cmake libxkbcommon libxinerama ncurses wayland"

I think some require the -dev suffix

> +install=""

empty variable can be removed for brevity

> +subpackages=""

empty variable can be removed for brevity

> +	$pkgname-$pkgver.tar.gz::https://github.com/Cloudef/$pkgname/archive/$pkgver.tar.gz

Can be in a single line, don't use $pkgname in the source url

> +builddir="$srcdir/"

set to $srcdir/$pkgname-$pkgver

> +	cd "bemenu-$pkgver"

This line can be removed with the change to builddir=

> +	cd "bemenu-$pkgver"

Same here

> +	cd "bemenu-$pkgver"

And here

---

From: Cosmo Borsky <[email-masked]>
Date: Mon, 5 Aug 2019 15:53:06 -0400

pkg revision inbound

> Why explicitly only x86_64 ? 

The bemenu arch package is built towards x86_64, and I am only able to
test on x86_64 at the moment (aports bootstrap.sh fails, but I will be
testing in qemu)

Is there a preference to test various platforms before committing, or if
multiple platforms can be added in later with a pkg revision?

> Need to use SPDX identifiers for the license and a SPDX keyword to indicate the relationship between them

Noted and applied

>> +depends="pango"

Pango is listed as required for the [X11][1] and [Wayland][2] rendering
backends in bemenu. So is Cairo. I can drop into a bare chroot tomorrow
to test exact dependencies when building vs running.

[1]:
https://github.com/Cloudef/bemenu/blob/f27e35eabca8fbb2003c0a8658f961edd16380a4/lib/renderers/x11/CMakeLists.txt
[2]:
https://github.com/Cloudef/bemenu/blob/f27e35eabca8fbb2003c0a8658f961edd16380a4/lib/renderers/wayland/CMakeLists.txt

> empty variable can be removed for brevity

noted and applied

> Can be in a single line, don't use $pkgname in the source url

Okay, I saw $pkgname in the source url in a few different APKBUILDs on
aports. Looking back, I should have referenced main or community apks.

> This line can be removed with the change to builddir=

Noted and applied.

Thank you for the feedback!