/[gentoo-x86]/net-irc/ultimate/ultimate-3.0.2-r2.ebuild
Gentoo

Contents of /net-irc/ultimate/ultimate-3.0.2-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Jan 8 06:39:09 2014 UTC (11 months, 2 weeks ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +3 -3 lines
Inherit the user eclass for enewuser/etc...

(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key D2E96200)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-irc/ultimate/ultimate-3.0.2-r2.ebuild,v 1.3 2012/08/11 14:28:40 maekke Exp $
4
5 EAPI=4
6
7 AT_M4DIR=autoconf
8 inherit autotools eutils fixheadtails prefix ssl-cert user
9
10 MY_P=Ultimate${PV/_/.}
11
12 DESCRIPTION="An IRCd server based on DALnet's DreamForge IRCd"
13 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
14 HOMEPAGE="http://www.shadow-realm.org/"
15
16 KEYWORDS="~amd64 ~ppc ~sparc x86 ~amd64-linux"
17 SLOT="0"
18 LICENSE="GPL-2"
19 IUSE="ssl"
20
21 RDEPEND="sys-libs/zlib
22 ssl? ( dev-libs/openssl )"
23 DEPEND="${RDEPEND}
24 virtual/pkgconfig"
25
26 S=${WORKDIR}/${MY_P}
27
28 src_prepare() {
29 rm -rf zlib || die
30
31 cp "${FILESDIR}"/${P}-config.patch.in "${T}"/${P}-config.patch || die
32 eprefixify "${T}"/${P}-config.patch
33 epatch "${T}"/${P}-config.patch
34
35 epatch "${FILESDIR}"/${P}-system-zlib-r1.patch
36 epatch "${FILESDIR}"/${P}-make-failfast.patch
37 epatch "${FILESDIR}"/${P}-open-mode.patch
38 epatch "${FILESDIR}"/${P}-entropy-path.patch
39
40 mv autoconf/configure.in ./ || die
41 ht_fix_file configure.in
42 eautoreconf
43 }
44
45 src_configure() {
46 econf \
47 --sysconfdir="${EPREFIX}"/etc/ultimateircd \
48 --localstatedir="${EPREFIX}"/var/lib/ultimateircd \
49 --disable-ccdv \
50 $(use_enable ssl openssl)
51 }
52
53 src_compile() {
54 # Must rerun the depend stage because we removed the zlib/ dir to
55 # which the stale dependencies still refer.
56 emake depend
57 emake
58 }
59
60 src_install() {
61 dodir /etc/ultimateircd
62 keepdir /var/{lib,log,run}/ultimateircd
63
64 einstall \
65 sysconfdir="${ED}"/etc/ultimateircd \
66 localstatedir="${ED}"/var/lib/ultimateircd \
67 networksubdir='$(sysconfdir)/networks'
68
69 rm -rf "${ED}"/usr/{{ircd,kill,rehash},bin/{ircdchk,ssl-{cert,search}.sh}} "${ED}"/var/lib/ultimateircd/logs || die
70 dosym /var/log/ultimateircd /var/lib/ultimateircd/logs
71
72 mv "${ED}"/usr/bin/ircd "${ED}"/usr/bin/ultimateircd || die
73 mv "${ED}"/usr/bin/mkpasswd "${ED}"/usr/bin/ultimateircd-mkpasswd || die
74
75 newinitd "${FILESDIR}"/ultimateircd.rc.2 ultimateircd
76 newconfd "${FILESDIR}"/ultimateircd.conf.2 ultimateircd
77 }
78
79 pkg_preinst() {
80 if ! use prefix; then
81 enewuser ultimateircd
82 fowners ultimateircd /var/{lib,log,run}/ultimateircd
83 fowners -R ultimateircd /etc/ultimateircd
84 fi
85
86 fperms -R go-rwx /etc/ultimateircd
87 fperms 0700 /var/{lib,log,run}/ultimateircd
88 }
89
90 pkg_postinst() {
91 if use ssl && [[ ! -e ${EROOT}etc/ultimateircd/ircd.crt ]]; then
92 install_cert /etc/ultimateircd/ircd
93 use prefix || chown ultimateircd "${EROOT}"etc/ultimateircd/ircd.{key,crt,pem}
94 fi
95 }

  ViewVC Help
Powered by ViewVC 1.1.20