summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2022-12-30 10:11:53 -0700
committerMark Wagie2022-12-30 10:11:53 -0700
commit4dead1d7bf200f680fdfebe4fd7b6145993987af (patch)
tree11f9e5badfa3f8ccc03d8bb2a0dc0497de640fa8
parent387365fab8aaf3b9fa2df13f4a0f3bee27a9ba67 (diff)
downloadaur-4dead1d7bf200f680fdfebe4fd7b6145993987af.tar.gz
initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD32
3 files changed, 31 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 63ea45bb56a5..4b8ed5c3141f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,18 @@
pkgbase = python-x256
- pkgdesc = Find the nearest xterm 256 color index for an RGB
- pkgver = r20.d4bc9f7
+ pkgdesc = Find the nearest xterm 256 color index for an RGB.
+ pkgver = 0.0.3
pkgrel = 1
url = https://github.com/magarcia/python-x256
arch = any
license = MIT
- makedepends = git
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-setuptools
+ makedepends = python-wheel
depends = python
- source = git+https://github.com/magarcia/python-x256
- sha256sums = SKIP
+ source = https://files.pythonhosted.org/packages/source/x/x256/x256-0.0.3.tar.gz
+ source = https://github.com/magarcia/python-x256/raw/main/LICENSE
+ sha256sums = f855dbccd91e53f5890283d8203855743827e7eed595d5cf19544ba3d212e001
+ sha256sums = d4024ec3d57d5c02bb53e89ddeb92b72e8c26b5593acd0573b8993d224c39dba
pkgname = python-x256
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..4dab8d6386e3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+# Ignore everything
+*
+
+# But not these files...
+!.gitignore
+!PKGBUILD
+!.SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
index ecb3513b0d1b..86d0a62920c1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,27 @@
-# Maintainer: Pieter Goetschalckx <3.14.e.ter <at> gmail <dot> com>
-
+# Maintainer: Mark Wagie <mark dot wagie at tutanota dot com>
pkgname=python-x256
-pkgver=r20.d4bc9f7
+_name=${pkgname#python-}
+pkgver=0.0.3
pkgrel=1
-pkgdesc="Find the nearest xterm 256 color index for an RGB"
+pkgdesc="Find the nearest xterm 256 color index for an RGB."
arch=('any')
url="https://github.com/magarcia/python-x256"
license=('MIT')
depends=('python')
-makedepends=('git' 'python-setuptools')
-source=("git+https://github.com/magarcia/$pkgname")
-sha256sums=('SKIP')
-
-pkgver() {
- cd "$pkgname"
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
-}
+makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz"
+ "https://github.com/magarcia/python-x256/raw/main/LICENSE")
+sha256sums=('f855dbccd91e53f5890283d8203855743827e7eed595d5cf19544ba3d212e001'
+ 'd4024ec3d57d5c02bb53e89ddeb92b72e8c26b5593acd0573b8993d224c39dba')
build() {
- cd "$pkgname"
- python setup.py build
+ cd "$_name-$pkgver"
+ python -m build --wheel --no-isolation
}
package() {
- cd "$pkgname"
- python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ cd "$_name-$pkgver"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+
+ install -Dm644 "$srcdir/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/"
}