diff options
author | Einhard Leichtfuß | 2022-04-30 00:11:30 +0200 |
---|---|---|
committer | Einhard Leichtfuß | 2022-04-30 00:11:30 +0200 |
commit | db5e2f62b430e71ebb79375246a7604370c6343c (patch) | |
tree | 67527e34f690ab3807f29463efcc6be19f4fb794 | |
parent | 31490da5c1b1e416886c66d3c02c973fd61babc2 (diff) | |
download | aur-dict-freedict-fra-eng-svn.tar.gz |
Cosmetic changes; package mostly unchanged
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | dict-freedict-fra-eng-svn.install | 30 |
3 files changed, 45 insertions, 36 deletions
@@ -1,7 +1,7 @@ pkgbase = dict-freedict-fra-eng-svn - pkgdesc = French -> English dictionary for dictd et al. from Freedict.org - pkgver = r1870 - pkgrel = 1 + pkgdesc = French -> English dictionary for dictd et al. from FreeDict.org + pkgver = r1905 + pkgrel = 2 url = https://freedict.org/ install = dict-freedict-fra-eng-svn.install arch = any @@ -11,8 +11,7 @@ pkgbase = dict-freedict-fra-eng-svn optdepends = dictd: dict client and server provides = dict-freedict-fra-eng conflicts = dict-freedict-fra-eng - source = svn+https://github.com/freedict/fd-dictionaries/trunk/fra-eng - md5sums = SKIP + source = dict-freedict-fra-eng-svn::svn+https://github.com/freedict/fd-dictionaries/trunk/fra-eng + sha512sums = SKIP pkgname = dict-freedict-fra-eng-svn - @@ -3,32 +3,40 @@ # Generated by aur-fd-scripts - https://git.respiranto.de/aur-fd-scripts.git/ _lang=fra-eng -_pkgname=dict-freedict-${_lang} -pkgname=${_pkgname}-svn -pkgver=r1870 -pkgrel=1 -pkgdesc="French -> English dictionary for dictd et al. from Freedict.org" +_pkgname="dict-freedict-${_lang}" +pkgname="${_pkgname}-svn" +_pkgver=r1905 +pkgver="${_pkgver//-/_}" +pkgrel=2 +pkgdesc="French -> English dictionary for dictd et al. from FreeDict.org" arch=('any') url="https://freedict.org/" license=('GPL') optdepends=('dictd: dict client and server') makedepends=('subversion' 'freedict-tools') -provides=(${_pkgname}) -conflicts=(${_pkgname}) -install=${pkgname}.install -source=("svn+https://github.com/freedict/fd-dictionaries/trunk/${_lang}") -md5sums=('SKIP') +provides=("$_pkgname") +conflicts=("$_pkgname") +install="${pkgname}.install" +source=("${pkgname}::svn+https://github.com/freedict/fd-dictionaries/trunk/${_lang}") +sha512sums=('SKIP') + +prepare() +{ + # The Makefile expects the TEI XML file to reside in a directory named + # ${_lang}. + mv "$pkgname" "$_lang" +} pkgver() { - cd $_lang + cd "$_lang" local _ver="$(svnversion)" printf "r%s" "${_ver//[[:alpha:]]}" } build() { - cd $_lang + cd "$_lang" make FREEDICT_TOOLS=/usr/lib/freedict-tools build-dictd } @@ -36,13 +44,13 @@ package() { install -m 755 -d "${pkgdir}/usr/share/dictd" install -m 644 -t "${pkgdir}/usr/share/dictd/" \ - ${_lang}/build/dictd/${_lang}.{dict.dz,index} + "${_lang}/build/dictd/${_lang}".{dict.dz,index} - for file in ${_lang}/{AUTHORS,README,NEWS,ChangeLog} + for file in "$_lang"/{AUTHORS,README,NEWS,ChangeLog} do - if test -f ${file} + if test -f "$file" then - install -m 644 -Dt "${pkgdir}/usr/share/doc/freedict/${_lang}/" ${file} + install -m 644 -Dt "${pkgdir}/usr/share/doc/freedict/${_lang}/" "$file" fi done } diff --git a/dict-freedict-fra-eng-svn.install b/dict-freedict-fra-eng-svn.install index 9bdfe971ae39..9900a42db9b1 100644 --- a/dict-freedict-fra-eng-svn.install +++ b/dict-freedict-fra-eng-svn.install @@ -1,10 +1,12 @@ +# Generated by aur-fd-scripts - https://git.respiranto.de/aur-fd-scripts.git/ + basename=fra-eng -pkgname=dict-freedict-$basename-svn +pkgname="dict-freedict-${basename}-svn" dictd_conf=/etc/dict/dictd.conf datadir=/usr/share/dictd -conf="database $basename { - data $datadir/$basename.dict.dz - index $datadir/$basename.index +conf="database ${basename} { + data ${datadir}/${basename}.dict.dz + index ${datadir}/${basename}.index }" post_install() @@ -12,12 +14,12 @@ post_install() echo if pacman -Qq dictd > /dev/null 2>&1 then - if grep -q "^database *$basename" "$dictd_conf" + if grep -q "^database *${basename}" "${dictd_conf}" then - echo "$pkgname already configured in $dictd_conf" + echo "${pkgname} already configured in ${dictd_conf}" else - echo "Adding configuration for $pkgname to $dictd_conf" - echo "$conf" >> "$dictd_conf" + echo "Adding configuration for ${pkgname} to ${dictd_conf}" + echo "${conf}" >> "${dictd_conf}" fi if systemctl -q is-active dictd.service @@ -54,17 +56,17 @@ 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" + current_conf="$(grep -A 3 "^database *${basename}" "${dictd_conf}")" + if test -n "${current_conf}" then echo - if test "$current_conf" = "$conf" + if test "${current_conf}" = "${conf}" then - echo "Removing configuration for $pkgname from $dictd_conf" - sed -i "/database $basename {/,/}/d" "$dictd_conf" + 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." + "for ${pkgname} in ${dictd_conf} is left untouched." fi fi |