/[gentoo-x86]/app-text/dictd/dictd-1.12.1-r1.ebuild
Gentoo

Contents of /app-text/dictd/dictd-1.12.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Mon Apr 6 00:18:31 2015 UTC (4 years, 10 months ago) by dlan
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +3 -3 lines
add keyword ~arm, tested on cortex-a9 board

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0xAABEFD55)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-text/dictd/dictd-1.12.1-r1.ebuild,v 1.8 2014/01/18 20:03:11 ago Exp $
4
5 EAPI=5
6 inherit eutils readme.gentoo systemd user
7
8 DESCRIPTION="Dictionary Client/Server for the DICT protocol"
9 HOMEPAGE="http://www.dict.org/ http://sourceforge.net/projects/dict/"
10 SRC_URI="mirror://sourceforge/dict/${P}.tar.gz"
11
12 SLOT="0"
13 # We install rfc so - ISOC-rfc
14 LICENSE="GPL-2 ISOC-rfc"
15 KEYWORDS="alpha amd64 ~arm ~hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
16 IUSE="dbi judy minimal"
17
18 # <gawk-3.1.6 makes tests fail.
19 RDEPEND="
20 sys-libs/zlib
21 dev-libs/libmaa
22 dbi? ( dev-db/libdbi )
23 judy? ( dev-libs/judy )
24 >=sys-apps/coreutils-6.10
25 "
26 DEPEND="${RDEPEND}
27 >=sys-apps/gawk-3.1.6
28 virtual/yacc
29 "
30
31 DOC_CONTENTS="
32 To start and use ${PN} you need to emerge at least one dictionary from
33 the app-dicts category with the package name starting with 'dictd-'.
34 To install all available dictionaries, emerge app-dicts/dictd-dicts.
35 ${PN} will NOT start without at least one dictionary.\n
36 \nIf you are running systemd, you will need to review the instructions
37 explained in /etc/dict/dictd.conf comments.
38 "
39
40 pkg_setup() {
41 enewgroup dictd # used in src_test()
42 enewuser dictd -1 -1 -1 dictd
43 }
44
45 src_prepare() {
46 epatch "${FILESDIR}"/dictd-1.10.11-colorit-nopp-fix.patch
47 epatch "${FILESDIR}"/dictd-1.12.0-build.patch
48
49 [[ ${CHOST} == *-darwin* ]] && \
50 sed -i -e 's:libtool:glibtool:g' Makefile.in
51 }
52
53 src_configure() {
54 econf \
55 $(use_with dbi plugin-dbi) \
56 $(use_with judy plugin-judy) \
57 --sysconfdir="${EPREFIX}"/etc/dict
58 }
59
60 src_compile() {
61 if use minimal; then
62 emake dictfmt dictzip dictzip
63 else
64 emake
65 fi
66 }
67
68 src_test() {
69 use minimal && return 0 # All tests are for dictd which we don't build...
70 if [[ ${EUID} -eq 0 ]]; then
71 # If dictd is run as root user (-userpriv) it drops its privileges to
72 # dictd user and group. Give dictd group write access to test directory.
73 chown :dictd "${WORKDIR}" "${S}/test"
74 chmod 770 "${WORKDIR}" "${S}/test"
75 fi
76 emake test
77 }
78
79 src_install() {
80 if use minimal; then
81 emake DESTDIR="${D}" install.dictzip install.dict install.dictfmt
82 else
83 emake DESTDIR="${D}" install
84
85 dodoc doc/{dicf.ms,rfc.ms,rfc.sh,rfc2229.txt}
86 dodoc doc/{security.doc,toc.ms}
87 newdoc examples/dictd1.conf dictd.conf.example
88
89 # conf files. For dict.conf see below.
90 insinto /etc/dict
91 for f in dictd.conf site.info colorit.conf; do
92 doins "${FILESDIR}/1.10.11/${f}"
93 done
94
95 # startups for dictd
96 newinitd "${FILESDIR}/1.10.11/dictd.initd" dictd
97 newconfd "${FILESDIR}/1.10.11/dictd.confd" dictd
98 systemd_dounit "${FILESDIR}"/${PN}.service
99 fi
100
101 insinto /etc/dict
102 doins "${FILESDIR}/1.10.11/dict.conf"
103 # Install docs
104 dodoc README TODO ChangeLog ANNOUNCE NEWS
105
106 readme.gentoo_create_doc
107 }

  ViewVC Help
Powered by ViewVC 1.1.20