summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2022-07-25 13:39:25 -0300
committerDaniel Bermond2022-07-25 13:39:25 -0300
commit47577269bf5ce86c59c01dec8c84f69f65527875 (patch)
treea5915567e506f70393b81d71a8ccb61f7df36efc
downloadaur-python-srt-git.tar.gz
Initial commit
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD40
2 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..67f5ebecfb3a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = python-srt-git
+ pkgdesc = Tools and python library for parsing, modifying, and composing SRT files (git version)
+ pkgver = 3.5.2.r7.g1247ed7
+ pkgrel = 1
+ url = https://github.com/cdown/srt/
+ arch = any
+ license = MIT
+ checkdepends = python-hypothesis
+ checkdepends = python-pytest
+ makedepends = git
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-setuptools
+ makedepends = python-wheel
+ depends = python
+ provides = python-srt
+ conflicts = python-srt
+ conflicts = python-pysrt
+ source = python-srt::git+https://github.com/cdown/srt.git
+ sha256sums = SKIP
+
+pkgname = python-srt-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..24855311ba41
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer : Daniel Bermond <dbermond@archlinux.org>
+
+pkgname=python-srt-git
+pkgver=3.5.2.r7.g1247ed7
+pkgrel=1
+pkgdesc='Tools and python library for parsing, modifying, and composing SRT files (git version)'
+arch=('any')
+url='https://github.com/cdown/srt/'
+license=('MIT')
+depends=('python')
+makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
+checkdepends=('python-hypothesis' 'python-pytest')
+provides=('python-srt')
+conflicts=('python-srt' 'python-pysrt')
+source=('python-srt'::'git+https://github.com/cdown/srt.git')
+sha256sums=('SKIP')
+
+pkgver() {
+ git -C python-srt describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
+}
+
+build() {
+ cd python-srt
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ cd python-srt
+ pytest
+}
+
+package() {
+ python -m installer --destdir="$pkgdir" python-srt/dist/*.whl
+
+ local _pyver
+ _pyver="$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')"
+ install -d -m755 "${pkgdir}/usr/share/licenses/${pkgname}"
+ ln -s "../../../lib/python${_pyver}/site-packages/srt-${pkgver/.r*/}.dist-info/LICENSE" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}