diff options
author | Fernando Ortiz | 2020-03-26 18:06:56 -0500 |
---|---|---|
committer | Fernando Ortiz | 2020-03-26 18:06:56 -0500 |
commit | 25185423130e5247966c021e9126000afd603607 (patch) | |
tree | cad468e22be73fc1a8f11615acc4e26f796f3cab | |
parent | 16b4d1ec981a4eea85a6d17921a2a14dd617055a (diff) | |
download | aur-25185423130e5247966c021e9126000afd603607.tar.gz |
next version
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rwxr-xr-x | pkgsum.sh | 15 | ||||
-rwxr-xr-x | update.sh | 20 |
5 files changed, 50 insertions, 9 deletions
@@ -1,6 +1,6 @@ pkgbase = python-pyalsaaudio-git pkgdesc = ALSA wrappers for Python (development version) - pkgver = 0.8.2.r0.g5cbc886 + pkgver = 0.8.4.r25.g12f8076 pkgrel = 1 url = http://larsimmisch.github.io/pyalsaaudio/ arch = i686 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..21da693e0ea8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.bak +*.gz +*.xz +src +pkg +pyalsaaudio @@ -2,30 +2,30 @@ pkgbase=python-pyalsaaudio-git pkgname=(python-pyalsaaudio-git python2-pyalsaaudio-git) -pkgver=0.8.2.r0.g5cbc886 +_pkgname=pyalsaaudio +pkgver=0.8.4.r25.g12f8076 pkgrel=1 pkgdesc="ALSA wrappers for Python (development version)" arch=('i686' 'x86_64') url="http://larsimmisch.github.io/pyalsaaudio/" license=('custom: PSF') makedepends=('python-setuptools' 'python2-setuptools' 'alsa-lib') -source=("git+https://github.com/larsimmisch/pyalsaaudio.git") +source=("git+https://github.com/larsimmisch/${_pkgname}.git") md5sums=('SKIP') pkgver() { - cd pyalsaaudio - git describe --long --tags | sed 's/-/.r/;s/-/./' + cd ${_pkgname} + git describe --long --tags | sed 's/^v//; s/-/.r/; s/-/./g' } prepare() { # copy folder, so we can cleanly build for both python versions - cp -rup pyalsaaudio python-pyalsaaudio - cp -rup pyalsaaudio python2-pyalsaaudio + cp -rup ${_pkgname} python2-pyalsaaudio } build() { # build for python 3 - cd python-pyalsaaudio + cd ${_pkgname} python setup.py build # build for python 2 @@ -40,7 +40,7 @@ package_python-pyalsaaudio-git() { conflicts=('python-pyalsaaudio') provides=('python-pyalsaaudio') - cd python-pyalsaaudio + cd ${_pkgname} python setup.py install --root="$pkgdir/" --optimize=1 install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE diff --git a/pkgsum.sh b/pkgsum.sh new file mode 100755 index 000000000000..e908ad353016 --- /dev/null +++ b/pkgsum.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +#taken from https://bbs.archlinux.org/viewtopic.php?id=131666 by falconindy +awk -v newsums="$(makepkg -g)" ' +BEGIN { + if (!newsums) exit 1 +} + +/^[[:blank:]]*(md|sha)[[:digit:]]+sums=/,/\)[[:blank:]]*$/ { + if (!i) print newsums; i++ + next +} + +1 +' PKGBUILD > PKGBUILD.new && mv PKGBUILD{.new,}
\ No newline at end of file diff --git a/update.sh b/update.sh new file mode 100755 index 000000000000..232ed9b9cc8b --- /dev/null +++ b/update.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +latest_version=$(source ./PKGBUILD && rm -rf ${_pkgname} && url=$(echo ${source[0]} | sed "s/git+//") && git clone ${url} $_pkgname && pkgver) +current_version=$(cat PKGBUILD | grep pkgver= | awk -F'=' '{print $2}') + +if ! [ "$latest_version" = "$current_version" ]; then + echo Updating the package with the latest version + echo latest: $latest_version + echo current: $current_version + sed -i.bak "s/$current_version/$latest_version/g" PKGBUILD + sed -i.bak "s/pkgrel=[^d.]/pkgrel=1/g" PKGBUILD + ./pkgsum.sh + if which makepkg &> /dev/null; then + makepkg --printsrcinfo > .SRCINFO + else + mksrcinfo + fi +else + echo Nothing to update. +fi |