summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2013-11-12 20:20:21 +0000
committerPacho Ramos <pacho@gentoo.org>2013-11-12 20:20:21 +0000
commited5f128ffeae74a3180e2496bf715adb3490110b (patch)
tree2e4fa5b741d053a98c4fd68a144aa6cef971fbaf /app-text/dictd
parentRemove old (diff)
downloadgentoo-2-ed5f128ffeae74a3180e2496bf715adb3490110b.tar.gz
gentoo-2-ed5f128ffeae74a3180e2496bf715adb3490110b.tar.bz2
gentoo-2-ed5f128ffeae74a3180e2496bf715adb3490110b.zip
Add unit file (#489666 by Juan and Alexander Tsoy), drop old.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'app-text/dictd')
-rw-r--r--app-text/dictd/ChangeLog9
-rw-r--r--app-text/dictd/dictd-1.11.1-r1.ebuild97
-rw-r--r--app-text/dictd/dictd-1.12.1-r1.ebuild (renamed from app-text/dictd/dictd-1.12.0.ebuild)37
-rw-r--r--app-text/dictd/files/1.10.11/dictd.conf8
-rw-r--r--app-text/dictd/files/dictd.service10
5 files changed, 45 insertions, 116 deletions
diff --git a/app-text/dictd/ChangeLog b/app-text/dictd/ChangeLog
index 25d2ca25ad79..29d814101f17 100644
--- a/app-text/dictd/ChangeLog
+++ b/app-text/dictd/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-text/dictd
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/dictd/ChangeLog,v 1.92 2013/01/29 08:38:29 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/dictd/ChangeLog,v 1.93 2013/11/12 20:20:20 pacho Exp $
+
+*dictd-1.12.1-r1 (12 Nov 2013)
+
+ 12 Nov 2013; Pacho Ramos <pacho@gentoo.org> +dictd-1.12.1-r1.ebuild,
+ +files/dictd.service, -dictd-1.11.1-r1.ebuild, -dictd-1.12.0.ebuild,
+ files/1.10.11/dictd.conf:
+ Add unit file (#489666 by Juan and Alexander Tsoy), drop old.
*dictd-1.12.1 (29 Jan 2013)
diff --git a/app-text/dictd/dictd-1.11.1-r1.ebuild b/app-text/dictd/dictd-1.11.1-r1.ebuild
deleted file mode 100644
index 6e07b0441088..000000000000
--- a/app-text/dictd/dictd-1.11.1-r1.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/dictd/dictd-1.11.1-r1.ebuild,v 1.8 2012/05/24 04:43:00 vapier Exp $
-
-EAPI=2
-
-inherit eutils user
-
-DESCRIPTION="Dictionary Client/Server for the DICT protocol"
-HOMEPAGE="http://www.dict.org/"
-SRC_URI="mirror://sourceforge/dict/${P}.tar.gz"
-
-SLOT="0"
-# We install rfc so - ISOC-rfc
-LICENSE="GPL-2 ISOC-rfc"
-KEYWORDS="alpha amd64 ~hppa ia64 ~mips ppc ppc64 sparc x86"
-IUSE="dbi judy minimal"
-
-# <gawk-3.1.6 makes tests fail.
-DEPEND="sys-apps/coreutils
- sys-libs/zlib
- dev-libs/libmaa
- dbi? ( dev-db/libdbi )
- judy? ( dev-libs/judy )
- >=sys-apps/coreutils-6.10"
-RDEPEND="${DEPEND}
- >=sys-apps/gawk-3.1.6"
-
-pkg_setup() {
- enewgroup dictd # used in src_test()
- enewuser dictd -1 -1 -1 dictd
-}
-
-src_prepare() {
- epatch "${FILESDIR}/dictd-1.10.11-colorit-nopp-fix.patch"
-}
-
-src_configure() {
- econf \
- $(use_with dbi plugin-dbi) \
- $(use_with judy plugin-judy) \
- --sysconfdir=/etc/dict
-}
-
-src_compile() {
- if use minimal; then
- emake dictfmt dictzip dictzip || die
- else
- emake || die "make failed"
- fi
-}
-
-src_test() {
- use minimal && return 0 # All tests are for dictd which we don't build...
- if [[ ${EUID} -eq 0 ]]; then
- # If dictd is run as root user (-userpriv) it drops its privileges to
- # dictd user and group. Give dictd group write access to test directory.
- chown :dictd "${WORKDIR}" "${S}/test"
- chmod 770 "${WORKDIR}" "${S}/test"
- fi
- emake test || die
-}
-
-src_install() {
- if use minimal; then
- emake DESTDIR="${D}" install.dictzip install.dict install.dictfmt || die "install failed"
- else
- emake DESTDIR="${D}" install || die "install failed"
-
- dodoc doc/{dicf.ms,rfc.ms,rfc.sh,rfc2229.txt} || die "installing docs part 2 failed"
- dodoc doc/{security.doc,toc.ms} || die "installing docs part 3 failed"
-
- # conf files. For dict.conf see below.
- insinto /etc/dict
- for f in dictd.conf site.info colorit.conf; do
- doins "${FILESDIR}/1.10.11/${f}" || die "failed to install ${f}"
- done
-
- # startups for dictd
- newinitd "${FILESDIR}/1.10.11/dictd.initd" dictd || die "failed to install dictd.initd"
- newconfd "${FILESDIR}/1.10.11/dictd.confd" dictd || die "failed to install dictd.confd"
- fi
-
- insinto /etc/dict
- doins "${FILESDIR}/1.10.11/dict.conf" || die
- # Install docs
- dodoc README TODO ChangeLog ANNOUNCE NEWS || die "installing docs part 1 failed"
-}
-
-pkg_postinst() {
- echo
- elog "To start and use ${PN} you need to emerge at least one dictionary from"
- elog "the app-dicts category with the package name starting with 'dictd-'."
- elog "To install all available dictionaries, emerge app-dicts/dictd-dicts."
- elog "${PN} will NOT start without at least one dictionary."
- echo
-}
diff --git a/app-text/dictd/dictd-1.12.0.ebuild b/app-text/dictd/dictd-1.12.1-r1.ebuild
index 462e7c5df4df..b09e91545912 100644
--- a/app-text/dictd/dictd-1.12.0.ebuild
+++ b/app-text/dictd/dictd-1.12.1-r1.ebuild
@@ -1,10 +1,9 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/dictd/dictd-1.12.0.ebuild,v 1.4 2012/05/24 04:43:00 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/dictd/dictd-1.12.1-r1.ebuild,v 1.1 2013/11/12 20:20:20 pacho Exp $
-EAPI="4"
-
-inherit eutils user
+EAPI=5
+inherit eutils readme.gentoo systemd user
DESCRIPTION="Dictionary Client/Server for the DICT protocol"
HOMEPAGE="http://www.dict.org/ http://sourceforge.net/projects/dict/"
@@ -17,15 +16,26 @@ KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~
IUSE="dbi judy minimal"
# <gawk-3.1.6 makes tests fail.
-RDEPEND="sys-apps/coreutils
+RDEPEND="
sys-libs/zlib
dev-libs/libmaa
dbi? ( dev-db/libdbi )
judy? ( dev-libs/judy )
- >=sys-apps/coreutils-6.10"
+ >=sys-apps/coreutils-6.10
+"
DEPEND="${RDEPEND}
>=sys-apps/gawk-3.1.6
- virtual/yacc"
+ virtual/yacc
+"
+
+DOC_CONTENTS="
+ To start and use ${PN} you need to emerge at least one dictionary from
+ the app-dicts category with the package name starting with 'dictd-'.
+ To install all available dictionaries, emerge app-dicts/dictd-dicts.
+ ${PN} will NOT start without at least one dictionary.\n
+ \nIf you are running systemd, you will need to review the instructions
+ explained in /etc/dict/dictd.conf comments.
+"
pkg_setup() {
enewgroup dictd # used in src_test()
@@ -74,6 +84,7 @@ src_install() {
dodoc doc/{dicf.ms,rfc.ms,rfc.sh,rfc2229.txt}
dodoc doc/{security.doc,toc.ms}
+ newdoc examples/dictd1.conf dictd.conf.example
# conf files. For dict.conf see below.
insinto /etc/dict
@@ -84,19 +95,13 @@ src_install() {
# startups for dictd
newinitd "${FILESDIR}/1.10.11/dictd.initd" dictd
newconfd "${FILESDIR}/1.10.11/dictd.confd" dictd
+ systemd_dounit "${FILESDIR}"/${PN}.service
fi
insinto /etc/dict
doins "${FILESDIR}/1.10.11/dict.conf"
# Install docs
dodoc README TODO ChangeLog ANNOUNCE NEWS
-}
-pkg_postinst() {
- echo
- elog "To start and use ${PN} you need to emerge at least one dictionary from"
- elog "the app-dicts category with the package name starting with 'dictd-'."
- elog "To install all available dictionaries, emerge app-dicts/dictd-dicts."
- elog "${PN} will NOT start without at least one dictionary."
- echo
+ readme.gentoo_create_doc
}
diff --git a/app-text/dictd/files/1.10.11/dictd.conf b/app-text/dictd/files/1.10.11/dictd.conf
index 16e41e5cac76..0de4c201773a 100644
--- a/app-text/dictd/files/1.10.11/dictd.conf
+++ b/app-text/dictd/files/1.10.11/dictd.conf
@@ -10,11 +10,15 @@ access {
allow *
}
-# Dictionaries are listed below. During dictd startup the initrc script will
+# Dictionaries are listed below. During dictd startup the OpenRC init script will
# scan ${DLIBDIR} (see /etc/conf.d/dictd) and adds all of the dictionaries it
# finds here.
#
-# NOTE: Initrc script will wipe everything below #LASTLINE and replace it with
+# On the other hand, if you are running systemd, you will need to look at
+# /usr/share/doc/dictd-${PV}/dictd.conf.example as reference to know the format
+# of the lines you will need to manually add below.
+#
+# NOTE: OpenRC init script will wipe everything below #LASTLINE and replace it with
# what it finds. So add all of your things above. If this is a problem, report
# bug at https://bugs.gentoo.org, please.
#
diff --git a/app-text/dictd/files/dictd.service b/app-text/dictd/files/dictd.service
new file mode 100644
index 000000000000..f5efde6c6f1f
--- /dev/null
+++ b/app-text/dictd/files/dictd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Dictd Dictionary Server Daemon
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/dictd --listen-to 127.0.0.1
+
+[Install]
+WantedBy=multi-user.target