summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..b095d1443c3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Unknown Packager
+
+export PIP_CONFIG_FILE=/dev/null
+export PIP_DISABLE_PIP_VERSION_CHECK=true
+
+pkgname=ytrssil
+epoch=
+pkgver=0.0.1
+pkgrel=0
+pkgdesc='Subscribe to YouTube RSS feeds and keep track of watched videos'
+arch=(any)
+url=https://pypi.org/project/ytrssil/
+license=(BSD)
+depends=(python python-feedparser python-inject python-aiohttp)
+makedepends=(python-pip)
+source=(https://files.pythonhosted.org/packages/06/76/b68467510ccb1e42905fa21fcca575abdb26f68ff8186507e5c6f377bf57/${pkgname}-${pkgver}-py3-none-any.whl)
+md5sums=(caf1e22867eedc5f53410639e33fd63d)
+noextract=(${pkgname}-${pkgver}-py3-none-any.whl)
+
+_dist_name() {
+ find "$srcdir" -mindepth 1 -maxdepth 1 -type d -printf '%f ' | grep -v '^_tmpenv$'
+}
+
+package() {
+ cd "$srcdir"
+ # pypa/pip#3063: pip always checks for a globally installed version.
+ python -mvenv --clear --system-site-packages _tmpenv
+ _tmpenv/bin/pip install --prefix="$pkgdir/usr" \
+ --no-deps --ignore-installed --no-warn-script-location \
+ "$(ls ./*.whl 2>/dev/null || echo ./"$(_dist_name)")"
+ if [[ -d "$pkgdir/usr/bin" ]]; then # Fix entry points.
+ for f in "$pkgdir/usr/bin/"*; do
+ if [[ $(head -n1 "$f") = "#!$(readlink -f _tmpenv)/bin/python" ]]; then
+ sed -i '1c#!/usr/bin/python' "$f"
+ fi
+ done
+ fi
+ if [[ -d "$pkgdir/usr/etc" ]]; then
+ mv "$pkgdir/usr/etc" "$pkgdir/etc"
+ fi
+}