diff options
author | K.B.Dharun Krishna | 2023-07-29 10:27:43 +0530 |
---|---|---|
committer | K.B.Dharun Krishna | 2023-07-29 10:27:43 +0530 |
commit | 58eb56afb4c3d66837bbe54a34498d2c2245b4a8 (patch) | |
tree | 3e67c29d8b300fc2c0430bef4a6d051fb57c29b4 | |
parent | 258ad0998922bc153dcf707140fe205d95ea86a6 (diff) | |
download | aur-58eb56afb4c3d66837bbe54a34498d2c2245b4a8.tar.gz |
Add Vib
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 54 | ||||
-rw-r--r-- | install.sh | 78 |
3 files changed, 36 insertions, 120 deletions
@@ -1,15 +1,13 @@ -pkgbase = pkgbase - pkgdesc = Slovak -> English dictionary for dictd et al. from Freedict.org - pkgver = 0.2 +pkgbase = vib + pkgdesc = Vib (Vanilla Image Builder) is a tool that allow generating Containerfile(s) using a Flatpak-like recipe and syntax. + pkgver = 0.2.10 pkgrel = 1 - url = https://freedict.org/ - install = install.sh - arch = any - license = GPL - makedepends = dictd - makedepends = freedict-tools - optdepends = dictd: dict client and server - source = https://download.freedict.org/dictionaries/slk-eng/0.2.1/freedict-slk-eng-0.2.1.src.tar.xz - sha512sums = ba7669020a12f64f7d2e2b6dfa90f1376df4a2fe764273bdb06f1e04998ee6dac9584b47f20f8e14cbaae5bf7271dd221032bcc34bd1ff7c93a93cf9de4429ac + url = https://github.com/Vanilla-OS/Vib + arch = x86_64 + arch = aarch64 + license = GPL3 + makedepends = go + source = -0.2.10.tar.gz::https://github.com/Vanilla-OS/Vib/archive/refs/tags/v0.2.10.tar.gz + sha512sums = 1f0ea16323f8a5e58a0b85700dcff6f63d73bf61397f7f26e0751ab34b6b096d85c58726b3fe14d0dccfcc84de63a692c5ddd238b1d8fb1896c07f7e30c2569a -pkgname = dict-freedict-slk-eng +pkgname = vib @@ -1,36 +1,32 @@ -# Maintainer : Juraj Matuš <matus.juraj at yandex dot com> +# Maintainer : K.B.Dharun Krishna <kbdharunkrishna@gmail.com> -_lang=slk-eng -pkgname=dict-freedict-${_lang} -pkgver=0.2 +pkgname=vib +pkgver=0.2.10 pkgrel=1 -pkgdesc="Slovak -> English dictionary for dictd et al. from Freedict.org" -arch=('any') -url="https://freedict.org/" -license=('GPL') -optdepends=('dictd: dict client and server') -makedepends=('dictd' 'freedict-tools') -install=install.sh -source=("https://download.freedict.org/dictionaries/${_lang}/${pkgver}.${pkgrel}/freedict-${_lang}-${pkgver}.${pkgrel}.src.tar.xz") -sha512sums=('ba7669020a12f64f7d2e2b6dfa90f1376df4a2fe764273bdb06f1e04998ee6dac9584b47f20f8e14cbaae5bf7271dd221032bcc34bd1ff7c93a93cf9de4429ac') +pkgdesc="Vib (Vanilla Image Builder) is a tool that allow generating Containerfile(s) using a Flatpak-like recipe and syntax." +arch=(x86_64 aarch64) +url='https://github.com/Vanilla-OS/Vib' +license=(GPL3) +makedepends=(go) +source=("$Vib-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz") +sha512sums=('1f0ea16323f8a5e58a0b85700dcff6f63d73bf61397f7f26e0751ab34b6b096d85c58726b3fe14d0dccfcc84de63a692c5ddd238b1d8fb1896c07f7e30c2569a') -build() -{ - cd $_lang - make FREEDICT_TOOLS=/usr/lib/freedict-tools build-dictd +prepare(){ + cd "Vib-${pkgver}" + mkdir -p build/ } -package() -{ - install -m 755 -d "${pkgdir}/usr/share/dictd" - install -m 644 -t "${pkgdir}/usr/share/dictd/" \ - ${_lang}/build/dictd/${_lang}.{dict.dz,index} +build() { + cd "Vib-${pkgver}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -o build +} - for file in ${_lang}/{AUTHORS,README,NEWS,ChangeLog} - do - if test -f ${file} - then - install -m 644 -Dt "${pkgdir}/usr/share/doc/freedict/${_lang}/" ${file} - fi - done +package() { + cd "Vib-${pkgver}" + install -Dm755 "build/vib" "${pkgdir}/usr/bin/${pkgname}" } diff --git a/install.sh b/install.sh deleted file mode 100644 index ddc8827df6df..000000000000 --- a/install.sh +++ /dev/null @@ -1,78 +0,0 @@ -basename=slk-eng -pkgname=dict-freedict-$basename -dictd_conf=/etc/dict/dictd.conf -datadir=/usr/share/dictd -conf="database $basename { - data $datadir/$basename.dict.dz - index $datadir/$basename.index -}" - -post_install() -{ - echo - if pacman -Qq dictd > /dev/null 2>&1 - then - if grep -q "^database *$basename" "$dictd_conf" - then - echo "$pkgname already configured in $dictd_conf" - else - echo "Adding configuration for $pkgname to $dictd_conf" - echo "$conf" >> "$dictd_conf" - fi - - if systemctl -q is-active dictd.service - then - echo "Restarting dictd service in order to" \ - "use the new dictionary database" - systemctl restart dictd.service - else - echo "Starting dictd service in order to" \ - "use the new dictionary database" - systemctl start dictd.service - fi - else - echo "dictd does not appear to be installed." - echo "In order to use this database you should either" \ - "install dictd or alternatively" \ - "another dict server and configure it on your own." - fi - echo -} - -post_upgrade() -{ - if pacman -Qq dictd > /dev/null 2>&1 && \ - systemctl -q is-active dictd.service - then - echo -e "\nRestarting dictd service in order to" \ - "use the updated dictionary database" - systemctl restart dictd.service - fi -} - -post_remove() -{ - if pacman -Qq dictd > /dev/null 2>&1 - then - current_conf="$(grep -A 3 "^database *$basename" "$dictd_conf")" - if test -n "$current_conf" - then - echo - if test "$current_conf" = "$conf" - then - echo "Removing configuration for $pkgname from $dictd_conf" - sed -i "/database $basename {/,/}/d" "$dictd_conf" - else - echo "User created / modified configuration" \ - "for $pkgname in $dictd_conf is left untouched." - fi - fi - - if systemctl -q is-active dictd.service - then - echo "Restarting dictd service in order to" \ - "stop using the removed dictionary database" - systemctl restart dictd.service - fi - fi -} |