Gentoo Archives: gentoo-commits

From: "Dawid Weglinski (cla)" <cla@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-irc/unrealircd: unrealircd-3.2.7-r1.ebuild
Date: Sun, 09 Dec 2007 11:22:50
Message-Id: E1J1KFB-0000Sq-F9@stork.gentoo.org
1 cla 07/12/09 11:22:45
2
3 Added: unrealircd-3.2.7-r1.ebuild
4 Log:
5 Move docert call from src_install() to pkg_postinst() for bug #201682
6 (Portage version: 2.1.3.19)
7
8 Revision Changes Path
9 1.1 net-irc/unrealircd/unrealircd-3.2.7-r1.ebuild
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/unrealircd/unrealircd-3.2.7-r1.ebuild?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/unrealircd/unrealircd-3.2.7-r1.ebuild?rev=1.1&content-type=text/plain
13
14 Index: unrealircd-3.2.7-r1.ebuild
15 ===================================================================
16 # Copyright 1999-2007 Gentoo Foundation
17 # Distributed under the terms of the GNU General Public License v2
18 # $Header: /var/cvsroot/gentoo-x86/net-irc/unrealircd/unrealircd-3.2.7-r1.ebuild,v 1.1 2007/12/09 11:22:45 cla Exp $
19
20 inherit eutils ssl-cert versionator multilib
21
22 MY_P=Unreal${PV}
23
24 DESCRIPTION="aimed to be an advanced (not easy) IRCd"
25 HOMEPAGE="http://www.unrealircd.com/"
26 SRC_URI="http://unreal.brueggisite.de/${MY_P}.tar.gz
27 http://www.blurryfox.com/unreal/${MY_P}.tar.gz
28 mirror://gentoo/${MY_P}.tar.gz"
29
30 SLOT="0"
31 LICENSE="GPL-2"
32 KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
33 IUSE="hub ipv6 ssl zlib curl prefixaq showlistmodes"
34
35 RDEPEND="ssl? ( dev-libs/openssl )
36 zlib? ( sys-libs/zlib )
37 curl? ( net-misc/curl )"
38 DEPEND="${RDEPEND}
39 >=sys-apps/sed-4"
40
41 S="${WORKDIR}/Unreal${PV}"
42
43 pkg_setup() {
44 if use curl && ( ! built_with_use net-misc/curl ares || built_with_use net-misc/curl ipv6 )
45 then
46 eerror "You need net-misc/curl compiled with the ares USE flag to be able to use"
47 eerror "net-irc/unrealircd with the curl USE flag. Please note that ares support"
48 eerror "for net-misc/curl is incompatible with the ipv6 USE flag."
49 die "need net-misc/curl with ares support"
50 fi
51
52 enewuser unrealircd
53 }
54
55 src_unpack() {
56 unpack ${A}
57 cd "${S}"
58
59 sed -i \
60 -e "s:ircd\.pid:/var/run/unrealircd/ircd.pid:" \
61 -e "s:ircd\.log:/var/log/unrealircd/ircd.log:" \
62 -e "s:debug\.log:/var/log/unrealircd/debug.log:" \
63 -e "s:ircd\.tune:/var/lib/unrealircd/ircd.tune:" \
64 include/config.h
65 }
66
67 src_compile() {
68 local myconf=""
69 use curl && myconf="${myconf} --enable-libcurl=/usr"
70 use ipv6 && myconf="${myconf} --enable-inet6"
71 use zlib && myconf="${myconf} --enable-ziplinks"
72 use hub && myconf="${myconf} --enable-hub"
73 use ssl && myconf="${myconf} --enable-ssl"
74 use prefixaq && myconf="${myconf} --enable-prefixaq"
75 use showlistmodes && myconf="${myconf} --with-showlistmodes"
76
77 econf \
78 --with-listen=5 \
79 --with-dpath="${D}"/etc/unrealircd \
80 --with-spath=/usr/bin/unrealircd \
81 --with-nick-history=2000 \
82 --with-sendq=3000000 \
83 --with-bufferpool=18 \
84 --with-hostname=$(hostname -f) \
85 --with-permissions=0600 \
86 --with-fd-setsize=1024 \
87 --enable-dynamic-linking \
88 ${myconf} \
89 || die "econf failed"
90
91 sed -i \
92 -e "s:${D}::" \
93 include/setup.h \
94 ircdcron/ircdchk
95
96 emake MAKE=make IRCDDIR=/etc/unrealircd || die "emake failed"
97 }
98
99 src_install() {
100 keepdir /var/{lib,log,run}/unrealircd
101
102 newbin src/ircd unrealircd
103
104 exeinto /usr/$(get_libdir)/unrealircd/modules
105 doexe src/modules/*.so
106
107 dodir /etc/unrealircd
108 dosym /var/lib/unrealircd /etc/unrealircd/tmp
109
110 insinto /etc/unrealircd
111 doins {badwords.*,help,spamfilter,dccallow}.conf
112 newins doc/example.conf unrealircd.conf
113
114 insinto /etc/unrealircd/aliases
115 doins aliases/*.conf
116 insinto /etc/unrealircd/networks
117 doins networks/*.network
118
119 sed -i \
120 -e s:src/modules:/usr/$(get_libdir)/unrealircd/modules: \
121 -e s:ircd\\.log:/var/log/unrealircd/ircd.log: \
122 "${D}"/etc/unrealircd/unrealircd.conf
123
124 dodoc \
125 Changes Donation Unreal.nfo networks/makenet \
126 ircdcron/{ircd.cron,ircdchk} \
127 || die "dodoc failed"
128 dohtml doc/*.html
129
130 newinitd "${FILESDIR}"/unrealircd.rc unrealircd
131 newconfd "${FILESDIR}"/unrealircd.confd unrealircd
132
133 fperms 700 /etc/unrealircd
134 chown -R unrealircd "${D}"/{etc,var/{lib,log,run}}/unrealircd
135 }
136
137 pkg_postinst() {
138 # Move docert call from scr_install() to install_cert in pkg_postinst for
139 # bug #201682
140 use ssl && \
141 if [[ ! -f "${ROOT}"/etc/unrealircd/server.cert.key ]]; then
142 install_cert /etc/unrealircd/server.cert
143 dosym server.cert.key /etc/unrealircd/server.key.pem
144 fi
145
146 elog
147 elog "UnrealIRCd will not run until you've set up /etc/unrealircd/unrealircd.conf"
148 elog
149 elog "You can find example cron scripts here:"
150 elog " /usr/share/doc/${PF}/ircd.cron.gz"
151 elog " /usr/share/doc/${PF}/ircdchk.gz"
152 elog
153 elog "You can also use /etc/init.d/unrealircd to start at boot"
154 elog
155 }
156
157
158
159 --
160 gentoo-commits@g.o mailing list