summaryrefslogtreecommitdiff
path: root/community/dictd
diff options
context:
space:
mode:
Diffstat (limited to 'community/dictd')
-rw-r--r--community/dictd/PKGBUILD13
-rw-r--r--community/dictd/dictd92
-rw-r--r--community/dictd/dictd.service2
-rw-r--r--community/dictd/dictd.xinetd2
4 files changed, 7 insertions, 102 deletions
diff --git a/community/dictd/PKGBUILD b/community/dictd/PKGBUILD
index 793d663e8..6b68492d5 100644
--- a/community/dictd/PKGBUILD
+++ b/community/dictd/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 79187 2012-10-31 09:43:20Z spupykin $
+# $Id: PKGBUILD 91830 2013-05-28 17:03:45Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: SmackleFunky <smacklefunky@optusnet.com.au>
# Contributor: Enrico Morelli <morelli@cerm.unifi.it>
pkgname=dictd
pkgver=1.12.1
-pkgrel=1
+pkgrel=3
pkgdesc="Online dictionary client and server"
url="http://sourceforge.net/projects/dict/"
license=('GPL')
@@ -20,7 +20,6 @@ backup=(etc/dict/dictd.conf
etc/dict/colorit.conf)
options=('!emptydirs')
source=("http://downloads.sourceforge.net/dict/$pkgname-$pkgver.tar.gz"
- dictd
dict.conf
dictd.conf
dictd.confd
@@ -29,25 +28,23 @@ source=("http://downloads.sourceforge.net/dict/$pkgname-$pkgver.tar.gz"
dictd.xinetd
colorit.conf)
md5sums=('62696491174c22079f664830d07c0623'
- '6542df4fc585773fc03f1a088730126b'
'fb72f7d8c55f84b1b37bbc8d33a8e55a'
'64cd6ffdb40fb3367224f91ac44926ac'
'838887fee38ae4cebd652d399b1f2266'
- '574e316d1f08885882d7b3075e1ea522'
+ 'd94fa6c43514c158c80e85f856c65365'
'b8cabf913876e544d919c7f20ff8db9e'
- 'b7dbc9529df13ff895dae2b4abd080d6'
+ 'bd3fd3f68625bad0c23754686ae2e99c'
'978c9c079a0fc8d7d42a4cd4000190e7')
build() {
cd $srcdir/$pkgname-$pkgver
- ./configure --enable-dictorg --prefix=/usr --sysconfdir=/etc/dict
+ ./configure --enable-dictorg --prefix=/usr --sysconfdir=/etc/dict --sbindir=/usr/bin
make
}
package() {
cd $srcdir/$pkgname-$pkgver
make DESTDIR=$pkgdir install
- install -D -m 0755 $srcdir/dictd $pkgdir/etc/rc.d/dictd
install -D -m 0644 $srcdir/dictd.xinetd $pkgdir/etc/xinetd.d/dictd
install -D -m 0644 $srcdir/dictd.conf $pkgdir/etc/dict/dictd.conf
install -D -m 0644 $srcdir/dict.conf $pkgdir/etc/dict/dict.conf
diff --git a/community/dictd/dictd b/community/dictd/dictd
deleted file mode 100644
index 4f435d6f0..000000000
--- a/community/dictd/dictd
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/bin/bash
-
-. /etc/conf.d/dictd
-. /etc/rc.conf
-
-. /etc/rc.d/functions
-
-preconfiguration() {
- stat_busy "Check dictd configuration"
- if [ ! -e ${DICTD_CONF} ]; then
- echo "No configuration"
- stat_fail
- exit 1
- fi
- stat_done
-
- # The new way of doing this is to scan /usr/lib/dict and tweek the conf
- stat_busy "Scanning for dictionaries..."
- if [ ! -d "${DICTD_DICTDIR}" ]; then
- echo "No dictionaries found"
- stat_fail
- exit 1
- fi
- stat_done
- pushd ${DICTD_DICTDIR} >/dev/null
- INDEXFILES=`ls *.index`
- if [ -z "$INDEXFILES" ]; then
- echo "No dictionaries found"
- stat_fail
- exit 1
- fi
-
- cat $DICTD_CONF | sed -e '/^#LASTLINE/,$d' > $DICTD_TMPCONF
- echo "#LASTLINE" >> $DICTD_TMPCONF
-
- CNT=0
- for i in $INDEXFILES
- do
- DNAME=`echo $i | awk -F . '{print $1;}'`
- #two possible names for a matching dictionary, check which is there.
- if [ -f ${DNAME}.dict.dz ]; then
- DICT=${DNAME}.dict.dz
- elif [ -f ${DNAME}.dict ];then
- DICT=${DNAME}.dict
- else
- echo "Index $i has no matching dictionaray..."
- fi
-
- #ok, go an index, and a dixtionary, append.
- echo "database $DNAME { data \"${DICTD_DICTDIR}/${DICT}\"" >> $DICTD_TMPCONF
- echo " index \"${DICTD_DICTDIR}/$i\" }" >> $DICTD_TMPCONF
-
- CNT=`expr $CNT + 1`
- done
- popd >/dev/null
- mv ${DICTD_TMPCONF} ${DICTD_CONF}
- echo "$CNT dictionary indexes found."
-}
-
-PID=`pidof -o %PPID /usr/sbin/dictd`
-
-case "$1" in
- start)
- preconfiguration || exit 1
- stat_busy "Start dictd daemon"
- /usr/sbin/dictd $DICTD_ARGS -- $DICTD_EARGS
- if [ $? -gt 0 ]; then
- stat_fail
- else
- add_daemon dictd
- stat_done
- fi
- ;;
-
- stop)
- stat_busy "Stop dictd daemon"
- kill $PID 2>/dev/null 1>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm_daemon dictd
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
diff --git a/community/dictd/dictd.service b/community/dictd/dictd.service
index fa219f72a..f62bf275f 100644
--- a/community/dictd/dictd.service
+++ b/community/dictd/dictd.service
@@ -5,7 +5,7 @@ After=network.target
[Service]
Type=forking
EnvironmentFile=-/etc/conf.d/dictd
-ExecStart=/usr/sbin/dictd $DICTD_ARGS -- $DICTD_EARGS
+ExecStart=/usr/bin/dictd $DICTD_ARGS -- $DICTD_EARGS
[Install]
WantedBy=multi-user.target
diff --git a/community/dictd/dictd.xinetd b/community/dictd/dictd.xinetd
index a3e3773dc..0ae5cb411 100644
--- a/community/dictd/dictd.xinetd
+++ b/community/dictd/dictd.xinetd
@@ -7,6 +7,6 @@ service dict
protocol = tcp
wait = no
user = daemon
- server = /usr/sbin/dictd
+ server = /usr/bin/dictd
server_args = -c /etc/dict/dictd.conf -i --locale en_US.UTF-8
}