summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 73031b6197a355e748736b4e7ab76c8e7c1ba9f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Maintainer: Einhard Leichtfuß <alguien@respiranto.de>
#
# Generated by aur-fd-scripts - https://git.respiranto.de/aur-fd-scripts.git/

_lang=eng-fra
_pkgname="dict-freedict-${_lang}"
pkgname="${_pkgname}-svn"
_pkgver=r1905
pkgver="${_pkgver//-/_}"
pkgrel=2
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=('subversion' 'freedict-tools')
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"
	local _ver="$(svnversion)"
	printf "r%s" "${_ver//[[:alpha:]]}"
}

build()
{
	cd "$_lang"
	make FREEDICT_TOOLS=/usr/lib/freedict-tools build-dictd
}

package()
{
	install -m 755 -d "${pkgdir}/usr/share/dictd"
	install -m 644 -t "${pkgdir}/usr/share/dictd/" \
		"${_lang}/build/dictd/${_lang}".{dict.dz,index}

	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
}