/[gentoo-x86]/net-irc/atheme-services/atheme-services-9999.ebuild
Gentoo

Contents of /net-irc/atheme-services/atheme-services-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Thu May 17 00:48:10 2012 UTC (2 years, 1 month ago) by jdhore
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +2 -2 lines
Update the EGIT_REPO_URI as atheme.org git has moved to GitHub.

(Portage version: 2.2.0_alpha105/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-irc/atheme-services/atheme-services-9999.ebuild,v 1.4 2012/05/13 06:27:44 jdhore Exp $
4
5 EAPI=4
6
7 inherit git-2 user eutils flag-o-matic perl-module
8
9 MY_P=${P/_/-}
10
11 DESCRIPTION="A portable and secure set of open-source and modular IRC services"
12 HOMEPAGE="http://atheme.net/"
13 EGIT_REPO_URI="git://github.com/atheme/atheme.git"
14 EGIT_HAS_SUBMODULES="true"
15
16 LICENSE="BSD"
17 SLOT="0"
18 KEYWORDS=""
19 IUSE="cracklib largenet ldap nls +pcre perl profile ssl"
20
21 RDEPEND="=dev-libs/libmowgli-9999:2
22 cracklib? ( sys-libs/cracklib )
23 ldap? ( net-nds/openldap )
24 nls? ( sys-devel/gettext )
25 perl? ( dev-lang/perl )
26 pcre? ( dev-libs/libpcre )
27 ssl? ( dev-libs/openssl )"
28 DEPEND="${RDEPEND}
29 virtual/pkgconfig"
30
31 pkg_setup() {
32 # the dependency calculation puts all of the .c files together and
33 # overwhelms cc1 with this flag :-(
34 filter-flags -combine
35
36 if use profile; then
37 # bug #371119
38 ewarn "USE=\"profile\" is incompatible with the hardened profile's -pie flag."
39 ewarn "Disabling PIE. Please ignore any warning messages about -nopie being invalid."
40 append-flags -nopie
41 fi
42
43 enewgroup ${PN}
44 enewuser ${PN} -1 -1 /var/lib/atheme ${PN}
45 }
46
47 # To stop perl-module overriding this function
48 src_unpack() {
49 git-2_src_unpack
50 }
51
52 src_prepare() {
53 # fix docdir
54 sed -i -e 's/\(^DOCDIR.*=.\)@DOCDIR@/\1@docdir@/' extra.mk.in || die
55
56 # basic logging config directive fix
57 sed -i -e '/^logfile/s;var/\(.*\.log\);'"${EPREFIX}"'/var/log/atheme/\1;g' dist/* || die
58
59 # QA against bundled libs.
60 # But comment it out in the live ebuild
61 # because it only contains a git submodule
62 # and removing it MAY break everything.
63 #rm -rf libmowgli-2 || die
64 }
65
66 src_configure() {
67 econf \
68 atheme_cv_c_gcc_w_error_implicit_function_declaration=no \
69 --sysconfdir="${EPREFIX}"/etc/${PN} \
70 --docdir="${EPREFIX}"/usr/share/doc/${PF} \
71 --localstatedir="${EPREFIX}"/var \
72 --enable-fhs-paths \
73 --disable-warnings \
74 --enable-contrib \
75 $(use_enable largenet large-net) \
76 $(use_with cracklib) \
77 $(use_with ldap) \
78 $(use_with nls) \
79 $(use_enable profile) \
80 $(use_with perl) \
81 $(use_with pcre) \
82 $(use_enable ssl)
83 }
84
85 src_compile() {
86 emake V=1
87 }
88
89 src_install() {
90 emake DESTDIR="${D}" install
91
92 insinto /etc/${PN}
93 for conf in dist/*.example; do
94 # The .cron file isn't meant to live in /etc/${PN}, so only
95 # install a .example version.
96 [[ ${conf} == *cron* ]] && continue
97
98 newins ${conf} $(basename ${conf} .example)
99 done
100
101 fowners -R 0:${PN} /etc/${PN}
102 keepdir /var/{lib,log}/atheme
103 fowners ${PN}:${PN} /var/{lib,log,run}/atheme
104 fperms -R go-w,o-rx /etc/${PN}
105 fperms 750 /etc/${PN} /var/{lib,log,run}/atheme
106
107 newinitd "${FILESDIR}"/${PN}.initd ${PN}
108
109 mv "${ED}"/usr/bin/{,atheme-}dbverify || die
110
111 # contributed scripts and such:
112 insinto /usr/share/doc/${PF}/contrib
113 doins contrib/*.{c,pl,php,py,rb}
114
115 if use perl; then
116 perlinfo
117 insinto "${VENDOR_LIB#${EPREFIX}}"
118 doins -r contrib/Atheme{,.pm}
119 fi
120 }

  ViewVC Help
Powered by ViewVC 1.1.20