aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinhard Leichtfuß <alguien@respiranto.de>2018-03-31 22:57:45 +0200
committerEinhard Leichtfuß <alguien@respiranto.de>2018-03-31 22:57:45 +0200
commit78414340e45cac927015f0aacc6c2ec04b513a48 (patch)
tree994fba7732d4dc788808008cf48ab7fbf772f065
parent4445342c6d35641800e3f688d6f11efbeda6a1cf (diff)
Add sample PKGBUILD for svn packages.
-rw-r--r--svn/sample.PKGBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/svn/sample.PKGBUILD b/svn/sample.PKGBUILD
new file mode 100644
index 0000000..c15da54
--- /dev/null
+++ b/svn/sample.PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Einhard Leichtfuß <alguien@respiranto.de>
+%CONTRS%
+_lang=%LANG%
+_pkgname=dict-freedict-${_lang}
+pkgname=${_pkgname}-svn
+pkgver=r0
+_pkgver=${pkgver//_/-}
+pkgrel=1
+pkgdesc="%LANG_A% -> %LANG_B% dictionary for dictd et al. from Freedict.org"
+arch=('any')
+url="http://www.freedict.org/"
+license=('GPL')
+optdepends=('dictd: dict client and server')
+makedepends=('subversion' 'dictd' 'freedict-tools')
+provides=(${_pkgname})
+conflicts=(${_pkgname})
+install=${pkgname}.install
+source=("svn+https://github.com/freedict/fd-dictionaries/trunk/${_lang}")
+md5sums=('SKIP')
+
+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}/${_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
+}