diff options
author | sercari <sercari@esdebian.org> | 2010-05-13 01:00:30 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-13 01:00:30 +0200 |
commit | 4db9c3ab0a7f46674ba298caab2e8a125be539e4 (patch) | |
tree | de357ed5d9b3312fea4bbc12075b677511669f69 | |
parent | 139aca38935fdb1c36ae37d104ecf5e4348d605e (diff) | |
download | slackbuilds-4db9c3ab0a7f46674ba298caab2e8a125be539e4.tar.gz |
office/dictd: Added to 13.0 repository
-rw-r--r-- | office/dictd/README | 5 | ||||
-rw-r--r-- | office/dictd/README.SLACKWARE | 14 | ||||
-rw-r--r-- | office/dictd/config/db.list | 17 | ||||
-rw-r--r-- | office/dictd/config/dict.conf | 6 | ||||
-rw-r--r-- | office/dictd/config/dictd.conf | 18 | ||||
-rw-r--r-- | office/dictd/config/dictd.order | 3 | ||||
-rw-r--r-- | office/dictd/config/dictdconfig.alias | 8 | ||||
-rw-r--r-- | office/dictd/config/rc.dictd | 71 | ||||
-rw-r--r-- | office/dictd/dictd.SlackBuild | 83 | ||||
-rw-r--r-- | office/dictd/dictd.info | 10 | ||||
-rw-r--r-- | office/dictd/doinst.sh | 25 | ||||
-rw-r--r-- | office/dictd/slack-desc | 19 |
12 files changed, 279 insertions, 0 deletions
diff --git a/office/dictd/README b/office/dictd/README new file mode 100644 index 0000000000..1477045e4c --- /dev/null +++ b/office/dictd/README @@ -0,0 +1,5 @@ +dictd (dictionary server) + +This requires libmaa. + +See README.SLACKWARE for setup information. diff --git a/office/dictd/README.SLACKWARE b/office/dictd/README.SLACKWARE new file mode 100644 index 0000000000..acf15f1e6e --- /dev/null +++ b/office/dictd/README.SLACKWARE @@ -0,0 +1,14 @@ +You'll need to add the following to /etc/rc.d/rc.local (and make +sure /etc/rc.d/rc.dictd is executable): + + if [ -x /etc/rc.d/rc.dictd ]; then + /etc/rc.d/rc.dictd start + fi + +You might also want to add this to /etc/rc.d/rc.local_shutdown +(create that file if it doesn't exist, and make it executable): + + if [ -x /etc/rc.d/rc.dictd ]; then + /etc/rc.d/rc.dictd stop + fi + diff --git a/office/dictd/config/db.list b/office/dictd/config/db.list new file mode 100644 index 0000000000..7d69de0b7b --- /dev/null +++ b/office/dictd/config/db.list @@ -0,0 +1,17 @@ + +#database dbname1 +# { +# data /usr/share/dictd/dbname1.dict.dz +# index /usr/share/dictd/dbname1.index +#} +#database dbname2 +# { +# data /usr/share/dictd/dbname2.dict.dz +# index /usr/share/dictd/dbname2.index +#} +#database dbname3 +# { +# data /usr/share/dictd/dbname3.dict.dz +# index /usr/share/dictd/dbname3.index +#} + diff --git a/office/dictd/config/dict.conf b/office/dictd/config/dict.conf new file mode 100644 index 0000000000..b4543ee1e3 --- /dev/null +++ b/office/dictd/config/dict.conf @@ -0,0 +1,6 @@ +#servers +server localhost +server dict.org +server dict0.us.dict.org +server alt0.dict.org + diff --git a/office/dictd/config/dictd.conf b/office/dictd/config/dictd.conf new file mode 100644 index 0000000000..e41ec4f1d4 --- /dev/null +++ b/office/dictd/config/dictd.conf @@ -0,0 +1,18 @@ +# /etc/dictd/dictd.conf + + +# Site section here: + +# Access section here: + +access { +allow localhost +allow 127.0.0.1 +# this allows access only from local host +} + +# Database section here: + +include /etc/dictd/db.list + +# User section here: diff --git a/office/dictd/config/dictd.order b/office/dictd/config/dictd.order new file mode 100644 index 0000000000..2c7381db7f --- /dev/null +++ b/office/dictd/config/dictd.order @@ -0,0 +1,3 @@ + +web1913 gcide wn foldoc jargon vera devil elements easton hitchcock gazetteer +/usr/share/dictd/ diff --git a/office/dictd/config/dictdconfig.alias b/office/dictd/config/dictdconfig.alias new file mode 100644 index 0000000000..811594ea1b --- /dev/null +++ b/office/dictd/config/dictdconfig.alias @@ -0,0 +1,8 @@ +#!/usr/bin/perl -lp + +# The format of each line is: +# s/^<basename-of dictionary-file>/<preferred nickname>/; +# Lines preceded by a hash character (#) are ignored. + +s/^freedict/fd/; +s/^gazetteer/gaz/; diff --git a/office/dictd/config/rc.dictd b/office/dictd/config/rc.dictd new file mode 100644 index 0000000000..047c6c0cbd --- /dev/null +++ b/office/dictd/config/rc.dictd @@ -0,0 +1,71 @@ +#!/bin/sh +# script courtesy of Sergio Vicari <sercari@esdebian.org> + +DICTD=/usr/sbin/dictd + +# DICTD_OPTIONS="-put -command_line -options -for -dictd -here" +DICTD_OPTIONS="" + + +PIDFILE=/var/run/dictd.pid + +start() { + + if [ -x $DICTD ]; then + echo "dictd starting." + $DICTD $DICTD_OPTIONS + else + echo "rc.dictd: cannot find $DICTD or it's not executable" + fi +} + +stop() { + if [ -e "$PIDFILE" ]; then + echo "Stopping the dictd server." + pid=$(cat $PIDFILE) + kill $pid 1> /dev/null 2> /dev/null + # Just in case: + killall dictd 1> /dev/null 2> /dev/null + rm -f $PIDFILE + fi +} +reload() { + echo "Reloading dictd." + if [ -e "$PIDFILE" ]; then + pid=$(cat $PIDFILE) + kill -HUP $pid + else + killall -HUP dictd + fi +} + +status() { + if [ -e /var/run/dictd.pid ]; then + echo "the dictd server is running." + else + echo "dictd server is stopped." + fi +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + start + ;; + reload) + reload + ;; + status) + status + ;; + *) + echo $"Usage: $0 {start|stop|restart|reload|status}" + ;; +esac diff --git a/office/dictd/dictd.SlackBuild b/office/dictd/dictd.SlackBuild new file mode 100644 index 0000000000..1ebf6cfd66 --- /dev/null +++ b/office/dictd/dictd.SlackBuild @@ -0,0 +1,83 @@ +#!/bin/sh + +# Slackware build script for dictd +# Written by sercari <sercari@esdebian.org> + +PRGNAM=dictd +VERSION=1.11.1 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-2} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc/dictd \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --localstatedir=/var/lib \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +mkdir -p $PKG/etc/dictd +cat $CWD/config/dict.conf > $PKG/etc/dictd/dict.conf.new +cat $CWD/config/dictd.conf > $PKG/etc/dictd/dictd.conf.new +cat $CWD/config/dictd.order > $PKG/etc/dictd/dictd.order.new +cat $CWD/config/dictdconfig.alias > $PKG/etc/dictd/dictdconfig.alias.new +cat $CWD/config/db.list > $PKG/etc/dictd/db.list.new + +mkdir -p $PKG/etc/rc.d +cat $CWD/config/rc.dictd > $PKG/etc/rc.d/rc.dictd.new +chmod 0755 $PKG/etc/rc.d/rc.dictd.new + +mkdir -p $PKG/usr/share/dictd + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + ANNOUNCE COPYING ChangeLog INITSCRIPT INSTALL NEWS README TODO \ + ./doc/rfc2229.txt ./doc/security.doc examples \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/office/dictd/dictd.info b/office/dictd/dictd.info new file mode 100644 index 0000000000..70a0d528cf --- /dev/null +++ b/office/dictd/dictd.info @@ -0,0 +1,10 @@ +PRGNAM="dictd" +VERSION="1.11.1" +HOMEPAGE="http://sourceforge.net/dict" +DOWNLOAD="http://sourceforge.net/projects/dict/files/dictd/dictd-1.11.1/dictd-1.11.1.tar.gz/download" +MD5SUM="e18517f5ba5763a586d2e70fe0eae5ff" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="sercari" +EMAIL="sercari@esdebian.org" +APPROVED="rworkman" diff --git a/office/dictd/doinst.sh b/office/dictd/doinst.sh new file mode 100644 index 0000000000..df659df2e4 --- /dev/null +++ b/office/dictd/doinst.sh @@ -0,0 +1,25 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# Keep same perms on rc.dictd.new: +if [ -e etc/rc.d/rc.dictd ]; then + cp -a etc/rc.d/rc.dictd etc/rc.d/rc.dictd.new.incoming + cat etc/rc.d/rc.dictd.new > etc/rc.d/rc.dictd.new.incoming + mv etc/rc.d/rc.dictd.new.incoming etc/rc.d/rc.dictd.new +fi + +config etc/rc.d/rc.dictd.new +config etc/dictd/dict.conf.new +config etc/dictd/dictd.conf.new +config etc/dictd/db.list.new + diff --git a/office/dictd/slack-desc b/office/dictd/slack-desc new file mode 100644 index 0000000000..07d40d7221 --- /dev/null +++ b/office/dictd/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' on +# the right side marks the last column you can put a character in. You must make +# exactly 11 lines for the formatting to be correct. It's also customary to +# leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +dictd: dictd (DICT client and server) +dictd: +dictd: This package contains client/server software implementing the +dictd: Dictionary Server Protocol, as described in RFC 2229. +dictd: +dictd: The Dictionary Server Protocol (DICT) is a TCP transaction based +dictd: query/response protocol that allows a client to access dictionary +dictd: definitions from a set of natural language dictionary databases. +dictd: No dictionaries included for server. +dictd: +dictd: |