summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD19
-rw-r--r--dict-freedict-eng-fra.install30
3 files changed, 28 insertions, 26 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 953bdb8b8c9..2491eb98d3b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = dict-freedict-eng-fra
- pkgdesc = English -> French dictionary for dictd et al. from Freedict.org
+ pkgdesc = English -> French dictionary for dictd et al. from FreeDict.org
pkgver = 0.1.6
- pkgrel = 4
+ pkgrel = 5
url = https://freedict.org/
install = dict-freedict-eng-fra.install
arch = any
@@ -12,4 +12,3 @@ pkgbase = dict-freedict-eng-fra
sha512sums = 7b7decb42f36617958303b8640616acc06e82aecd955e78949b67e083a7dbbdc4c668fee9cfcda20f219897767f64daabc942b3c3c01ed1f5e8d6ee56262e8a7
pkgname = dict-freedict-eng-fra
-
diff --git a/PKGBUILD b/PKGBUILD
index f989eeefda1..b6e0077afe2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,22 +3,23 @@
# Generated by aur-fd-scripts - https://git.respiranto.de/aur-fd-scripts.git/
_lang=eng-fra
-pkgname=dict-freedict-${_lang}
+pkgname="dict-freedict-${_lang}"
pkgver=0.1.6
-pkgrel=4
-pkgdesc="English -> French dictionary for dictd et al. from Freedict.org"
+pkgver="${pkgver//_/-}"
+pkgrel=5
+pkgdesc="English -> French dictionary for dictd et al. from FreeDict.org"
arch=('any')
url="https://freedict.org/"
license=('GPL')
optdepends=('dictd: dict client and server')
makedepends=('freedict-tools')
-install=${pkgname}.install
+install="${pkgname}.install"
source=("https://download.freedict.org/dictionaries/${_lang}/${pkgver}/freedict-${_lang}-${pkgver}.src.tar.xz")
sha512sums=('7b7decb42f36617958303b8640616acc06e82aecd955e78949b67e083a7dbbdc4c668fee9cfcda20f219897767f64daabc942b3c3c01ed1f5e8d6ee56262e8a7')
build()
{
- cd $_lang
+ cd "$_lang"
make FREEDICT_TOOLS=/usr/lib/freedict-tools build-dictd
}
@@ -26,13 +27,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-eng-fra.install b/dict-freedict-eng-fra.install
index d017c18b26a..7d852f8c7c8 100644
--- a/dict-freedict-eng-fra.install
+++ b/dict-freedict-eng-fra.install
@@ -1,10 +1,12 @@
+# Generated by aur-fd-scripts - https://git.respiranto.de/aur-fd-scripts.git/
+
basename=eng-fra
-pkgname=dict-freedict-$basename
+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
+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