summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMichael Bromilow2025-01-12 16:15:29 +0000
committerMichael Bromilow2025-01-12 16:15:29 +0000
commit34944e1e4ccd92f237e5c3a71e983c4225c34a7c (patch)
treea72cd8efc1f9012399389092899dd72462aa9cd7 /PKGBUILD
downloadaur-34944e1e4ccd92f237e5c3a71e983c4225c34a7c.tar.gz
Create PKGBUILD, .SRCINFO, LICENSE
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD35
1 files changed, 35 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e432c6ec7c4e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Michael Bromilow <dev at mail subdomain of bromilow dot uk>
+# Contributor: Tércio Martins <echo dGVyY2lvd2VuZGVsQGdtYWlsLmNvbQo= | base64 -d>
+
+_pkgname=rectangle-packer
+pkgname=python-${_pkgname}-git
+pkgver=2.0.2.r16.g46fa636
+pkgrel=1
+pkgdesc="Pack a set of rectangles into a bounding box with minimum area"
+arch=('i686' 'pentium4' 'x86_64')
+url="https://github.com/Penlect/rectangle-packer"
+license=('MIT')
+depends=('python' 'cython')
+makedepends=('git' 'python-build' 'python-installer' 'python-setuptools')
+provides=('python-rectangle-packer')
+conflicts=('python-rectangle-packer')
+source=("${_pkgname}::git+${url}.git")
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "${srcdir}/${_pkgname}"
+ git describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}"
+ python -m build --wheel --no-isolation
+}
+
+package() {
+ cd "${srcdir}/${_pkgname}"
+ python -m installer --destdir="${pkgdir}" dist/*.whl
+
+ install -Dm 644 "LICENSE.md" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
+}