diff options
author | Piotr Rogoża | 2018-03-20 23:56:55 +0100 |
---|---|---|
committer | Piotr Rogoża | 2018-03-20 23:56:55 +0100 |
commit | 468fc9e4e666240bd5f6f6addc90d3cfe2fe84bc (patch) | |
tree | 4d39f7a07aed009bb155b2fe0f990d089a484477 | |
download | aur-kydpdict-git.tar.gz |
Initial package kydpdict-git
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 50 | ||||
-rw-r--r-- | kydpdict.install | 22 |
3 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8660a8d0d1c4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +# Generated by mksrcinfo v8 +# Tue Mar 20 22:56:24 UTC 2018 +pkgbase = kydpdict-git + pkgdesc = Qt interface for YDP Collins and PWN Oxford dictionaries + pkgver = r389.224576a + pkgrel = 1 + url = https://github.com/ytmytm/kydpdict + install = kydpdict.install + arch = i686 + arch = x86_64 + license = GPL + makedepends = git + makedepends = gcc + depends = qt3 + provides = kydpdict + conflicts = kydpdict + replaces = kydpdict + source = git+https://github.com/ytmytm/kydpdict + sha256sums = SKIP + +pkgname = kydpdict-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c9d0b8916790 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: dracorp aka Piotr Rogoza <piotr.r.public at gmail.com> + +pkgname=kydpdict-git +_pkgname=kydpdict +pkgver=r389.224576a +pkgrel=1 +pkgdesc='Qt interface for YDP Collins and PWN Oxford dictionaries ' +arch=('i686' 'x86_64') +url='https://github.com/ytmytm/kydpdict' +license=('GPL') +depends=(qt3) +makedepends=(git gcc) +provides=(kydpdict) +conflicts=(kydpdict) +replaces=(kydpdict) +install="kydpdict.install" +source=('git+https://github.com/ytmytm/kydpdict') +sha256sums=('SKIP') +_gitname='kydpdict' + +pkgver(){ + if [ -d "$srcdir"/$_gitname ]; then + cd "$srcdir"/$_gitname + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" ) + fi +} +prepare(){ + cd "$srcdir/$_pkgname" + tar zxf contrib/kydpdict-0.9.3-oxpwnsnd.tar.gz + patch -Np1 -i kydpdict-0.9.3-oxpwnsnd/kydpdict-0.9.3-pwnoxsnd.patch +} +build(){ + cd "$srcdir/$_pkgname" + ./configure --prefix=/usr --with-qt-dir=/usr/lib/qt3 --with-qt-includes=/usr/include/qt3 + sed 's/QT_LIB=-lqt-mt/QT_LIB=-lqt-mt -lz/' -i src/Makefile + make + gcc -O2 -Wall kydpdict-0.9.3-oxpwnsnd/exwaves.c -o exwaves +} +package(){ + cd "$srcdir"/$_gitname + make DESTDIR="$pkgdir/" install + install -Dm644 $_pkgname.png $pkgdir/usr/share/pixmaps/$_pkgname.png + install -Dm644 $_pkgname.desktop $pkgdir/usr/share/applications/$_pkgname.desktop + install -Dm644 contrib/$_pkgname.1 $pkgdir/usr/share/man/man1/$_pkgname.1 + install -dm755 $pkgdir/usr/share/man/pl/man1 + iconv -f iso8859-2 -t utf8 contrib/$_pkgname.pl.1 > $pkgdir/usr/share/man/pl/man1/$_pkgname.1 + install -Dm755 exwaves $pkgdir/usr/bin/exwaves +} diff --git a/kydpdict.install b/kydpdict.install new file mode 100644 index 000000000000..f39257c28b2a --- /dev/null +++ b/kydpdict.install @@ -0,0 +1,22 @@ +# arg 1: the new package version +pre_install() { + /bin/true +} + +# arg 1: the new package version +post_install() { + echo + echo "Oxford sound files support included. Follow these steps to use it:" + echo "1. Copy wave.wol and wave.000 to /usr/share/kydpdict." + echo "2. Use exwaves to get sound files in /usr/share/kydpdict/wave." + echo "3. Configure kydpdict to read sounds from /usr/share/kydpdict/wave." + echo "4. Set mpg321 as audio player (run 'pacman -S mpg321' if you don't have it)." + echo "5. Remove wave.wol and wave.000." + echo +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + post_install +} |