[arch-commits] Commit in rofimoji/trunk (PKGBUILD)

Daniel M. Capella polyzen at archlinux.org
Sun Jun 20 02:07:06 UTC 2021


    Date: Sunday, June 20, 2021 @ 02:07:04
  Author: polyzen
Revision: 965733

upgpkg: rofimoji 5.2.0-2: Cleanup

Modified:
  rofimoji/trunk/PKGBUILD

----------+
 PKGBUILD |   22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-06-20 01:18:28 UTC (rev 965732)
+++ PKGBUILD	2021-06-20 02:07:04 UTC (rev 965733)
@@ -2,7 +2,7 @@
 
 pkgname=rofimoji
 pkgver=5.2.0
-pkgrel=1
+pkgrel=2
 pkgdesc='Character picker for rofi'
 arch=('any')
 url=https://github.com/fdw/rofimoji
@@ -22,6 +22,12 @@
 source=("$url/archive/$pkgver/$pkgname-$pkgver.tar.gz")
 b2sums=('9df9024215ba6998d2a2d396ed7b5da905d43eb5506bd2de3ffd163d727f30c2ac4b7e5fd27d44ea1af0ce54c8ac0a4a06b19bafab1e62d1bd5e4a3cfcf41a9c')
 
+prepare() {
+  cd $pkgname-$pkgver
+  # Remove data_files section https://github.com/pypa/wheel/issues/92
+  sed -i '/\[options.data_files\]/,/^$/d' setup.cfg
+}
+
 build() {
   cd $pkgname-$pkgver
   python -m build --wheel --skip-dependency-check --no-isolation
@@ -31,18 +37,16 @@
   cd $pkgname-$pkgver
   export PYTHONHASHSEED=0
   python -m install --optimize=1 --destdir="$pkgdir" dist/*.whl
+  install -Dm644 -t "$pkgdir"/usr/share/man/man1 src/picker/docs/$pkgname.1
 
-  cd "$pkgdir"
   # https://github.com/FFY00/python-install/pull/6
-  chmod +x usr/bin/$pkgname
+  chmod +x "$pkgdir"/usr/bin/$pkgname
 
-  # Symlink license file and move data files where they belong
+  # Symlink license file
   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
-  install -d usr/share/{licenses/$pkgname,man/man1}
-  ln -s $site_packages/${pkgname//-/_}-$pkgver.dist-info/LICENSE \
-    usr/share/licenses/$pkgname/LICENSE
-  mv {./$site_packages,usr}/share/man/man1/$pkgname.1
-  rm -r ./$site_packages/share
+  install -d "$pkgdir"/usr/share/licenses/$pkgname
+  ln -s $site_packages/$pkgname-$pkgver.dist-info/LICENSE \
+    "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }
 
 # vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list