diff options
author | Vladimir Svyatski | 2019-05-07 01:38:44 +0300 |
---|---|---|
committer | Vladimir Svyatski | 2019-05-07 01:45:54 +0300 |
commit | db40b455bb88759484aae0a4a971d75f1c49bbff (patch) | |
tree | 8fcbbe73daacd3df84d4d7f345cd04b190c3267d | |
download | aur-db40b455bb88759484aae0a4a971d75f1c49bbff.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 44 | ||||
-rw-r--r-- | install-actions.sh | 21 |
3 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0910245514af --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +# Generated by makepkg 5.1.3 +# Mon May 6 22:39:29 UTC 2019 +pkgbase = kmeldb-ui +pkgdesc = Kenwood Music Editor Light replacement for Linux systems. +pkgver = 0.4.0 +pkgrel = 1 +url = https://vsvyatski.github.io/kmeldb-ui +install = install-actions.sh +arch = any +license = GPL3 +makedepends = rsync +makedepends = python +makedepends = python-wheel +depends = python-pyqt5>=5.5.0 +optdepends = qt5-translations>=5.5.0 +source = https://github.com/vsvyatski/kmeldb-ui/archive/v0.4.0.tar.gz +sha256sums = b664be402a409089123fc6caa95b265737b2bae2822428cf327e87ac3679eebd + +pkgname = kmeldb-ui + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ecdd359515f9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Vladimir Svyatski <vsvyatski@yandex.ru> + +pkgname=kmeldb-ui +pkgver=0.4.0 +pkgrel=1 +pkgdesc='Kenwood Music Editor Light replacement for Linux systems.' +arch=('any') +url="https://vsvyatski.github.io/kmeldb-ui" +license=('GPL3') +depends=('python-pyqt5>=5.5.0') +optdepends=('qt5-translations>=5.5.0') +makedepends=('rsync' 'python' 'python-wheel') +source=("https://github.com/vsvyatski/$pkgname/archive/v$pkgver.tar.gz") +sha256sums=('b664be402a409089123fc6caa95b265737b2bae2822428cf327e87ac3679eebd') +install=install-actions.sh + +build() { + cd "$pkgname-$pkgver" + sh build.sh + echo Generating virtual environment... + python3 -m venv --system-site-packages dist/kmeldb-ui/venv + dist/kmeldb-ui/venv/bin/pip3 install -r dist/kmeldb-ui/requirements.txt +} + +check() { + # Let's quickly verify if the contents of the "dist" folder after building look fine. + set -e + + cd "$pkgname-$pkgver" + test -d dist/kmeldb-ui + + cd dist/kmeldb-ui + test -d kmeldb_cli -a -d translations -a -d venv + test $(find -maxdepth 1 -type f -name "*.py" | wc -l) = 11 + test $(find -maxdepth 1 -type f -name "*.sh" | wc -l) = 2 + test -f kenwooddbgen.png + test -f LICENSE -a -f requirements.txt +} + +package() { + cd "$pkgname-$pkgver" + mkdir "$pkgdir/opt" && cp -r dist/kmeldb-ui "$pkgdir/opt" + mkdir -p "$pkgdir/usr/share/applications/" && cp packaging/com.github.vsvyatski.kmeldb-ui.desktop "$pkgdir/usr/share/applications" +} diff --git a/install-actions.sh b/install-actions.sh new file mode 100644 index 000000000000..9a89c8aee941 --- /dev/null +++ b/install-actions.sh @@ -0,0 +1,21 @@ +post_install() { + cd /opt/kmeldb-ui + + chmod 755 ./kenwooddbgen.sh + + # creating __pycache__ folders and adding proper permissions so that Python can generate + # compiled bytecode running under standard user account + mkdir ./__pycache__ + chmod 777 ./__pycache__ + mkdir ./kmeldb_cli/kmeldb/__pycache__ + chmod 777 ./kmeldb_cli/kmeldb/__pycache__ + + cd - +} + +pre_remove() { + # Some files (generated by postinstall, for example) are left. + # We need to clean the mess. + [ -d /opt/kmeldb-ui/__pycache__ ] && rm -r /opt/kmeldb-ui/__pycache__ + [ -d /opt/kmeldb-ui/kmeldb_cli/kmeldb/__pycache__ ] && rm -r /opt/kmeldb-ui/kmeldb_cli/kmeldb/__pycache__ +} |