/[gentoo-x86]/net-irc/unrealircd/unrealircd-3.2.8.1-r1.ebuild
Gentoo

Contents of /net-irc/unrealircd/unrealircd-3.2.8.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Sat Jun 12 22:42:17 2010 UTC (3 years, 10 months ago) by ssuominen
Branch: MAIN
Changes since 1.3: +3 -5 lines
Use gentoo mirrors
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 ssuominen 1.1 # Copyright 1999-2010 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 ssuominen 1.4 # $Header: /var/cvsroot/gentoo-x86/net-irc/unrealircd/unrealircd-3.2.8.1-r1.ebuild,v 1.3 2010/06/12 21:18:26 a3li Exp $
4 ssuominen 1.1
5     EAPI="2"
6    
7     inherit eutils autotools ssl-cert versionator multilib
8    
9     MY_P=Unreal${PV}
10    
11     DESCRIPTION="aimed to be an advanced (not easy) IRCd"
12     HOMEPAGE="http://www.unrealircd.com/"
13 ssuominen 1.4 SRC_URI="mirror://gentoo/${MY_P}-notrojan.tar.gz"
14     #SRC_URI="http://www.unrealircd.com/downloads/${MY_P}.tar.gz"
15 ssuominen 1.1
16     SLOT="0"
17     LICENSE="GPL-2"
18 a3li 1.3 KEYWORDS="~amd64 ppc sparc x86 ~x86-fbsd"
19 ssuominen 1.1 IUSE="curl +hub ipv6 +operoverride +spoof operoverride-verify +prefixaq
20     showlistmodes shunnotices ssl topicisnuhost +usermod zlib"
21    
22     RDEPEND="ssl? ( dev-libs/openssl )
23     zlib? ( sys-libs/zlib )
24     curl? ( net-misc/curl )
25     dev-libs/tre
26     >=net-dns/c-ares-1.5.3"
27     DEPEND="${RDEPEND}
28     >=sys-apps/sed-4"
29    
30     S="${WORKDIR}/Unreal$(get_version_component_range 1-2)"
31    
32     pkg_setup() {
33     enewuser unrealircd
34     }
35    
36     src_prepare() {
37     #QA check against bundled pkgs
38     rm extras/*.gz
39    
40     sed -i \
41     -e "s:ircd\.pid:/var/run/unrealircd/ircd.pid:" \
42     -e "s:ircd\.log:/var/log/unrealircd/ircd.log:" \
43     -e "s:debug\.log:/var/log/unrealircd/debug.log:" \
44     -e "s:ircd\.tune:/var/lib/unrealircd/ircd.tune:" \
45     include/config.h \
46     || die "sed failed"
47    
48     # http://bugs.unrealircd.org/view.php?id=3842
49     epatch "${FILESDIR}"/unrealircd-system-tre.patch || die "epatch failed"
50    
51     epatch "${FILESDIR}"/unrealircd-system-cares.patch || die "epatch failed"
52    
53     mv autoconf/configure.in ./ || die
54     mv autoconf/aclocal.m4 ./acinclude.m4 || die
55     #can't call eautoreconf because aclocal's source files aren't even in unearlircd's svn!
56     eaclocal
57     eautoconf
58     }
59    
60     src_configure() {
61     local myconf=""
62     use curl && myconf="${myconf} --enable-libcurl=/usr"
63     use ipv6 && myconf="${myconf} --enable-inet6"
64     use zlib && myconf="${myconf} --enable-ziplinks"
65     use hub && myconf="${myconf} --enable-hub"
66     use ssl && myconf="${myconf} --enable-ssl"
67     use prefixaq && myconf="${myconf} --enable-prefixaq"
68     use spoof && myconf="${myconf} --enable-nospoof"
69     use showlistmodes && myconf="${myconf} --with-showlistmodes"
70     use topicisnuhost && myconf="${myconf} --with-topicisnuhost"
71     use shunnotices && myconf="${myconf} --with-shunnotices"
72     use operoverride || myconf="${myconf} --with-no-operoverride"
73     use operoverride-verify && myconf="${myconf} --with-operoverride-verify"
74     use usermod || myconf="${myconf} --with-disableusermod"
75    
76     econf \
77     --with-listen=5 \
78     --with-dpath="${D}"/etc/unrealircd \
79     --with-spath=/usr/bin/unrealircd \
80     --with-nick-history=2000 \
81     --with-sendq=3000000 \
82     --with-bufferpool=18 \
83     --with-hostname=$(hostname -f) \
84     --with-permissions=0600 \
85     --with-fd-setsize=1024 \
86     --with-system-cares \
87     --with-system-tre \
88     --enable-dynamic-linking \
89     ${myconf}
90    
91     # Fix upstream poor autofoo
92     sed -i \
93     -e "s:${D}::g" \
94     include/setup.h \
95     ircdcron/ircdchk \
96     || die
97     }
98    
99     src_compile() {
100     emake MAKE=make IRCDDIR=/etc/unrealircd || die "emake failed"
101     }
102    
103     src_install() {
104     keepdir /var/{lib,log,run}/unrealircd
105    
106     newbin src/ircd unrealircd || die
107    
108     exeinto /usr/$(get_libdir)/unrealircd/modules
109     doexe src/modules/*.so || die
110    
111     dodir /etc/unrealircd
112     dosym /var/lib/unrealircd /etc/unrealircd/tmp || die
113    
114     insinto /etc/unrealircd
115     doins {badwords.*,help,spamfilter,dccallow}.conf || die
116     newins doc/example.conf unrealircd.conf || die
117    
118     insinto /etc/unrealircd/aliases
119     doins aliases/*.conf || die
120     insinto /etc/unrealircd/networks
121     doins networks/*.network || die
122    
123     sed -i \
124     -e s:src/modules:/usr/$(get_libdir)/unrealircd/modules: \
125     -e s:ircd\\.log:/var/log/unrealircd/ircd.log: \
126     "${D}"/etc/unrealircd/unrealircd.conf \
127     || die
128    
129     dodoc \
130     Changes Donation Unreal.nfo networks/makenet \
131     ircdcron/{ircd.cron,ircdchk} \
132     || die "dodoc failed"
133     dohtml doc/*.html || die
134    
135     newinitd "${FILESDIR}"/unrealircd.rc unrealircd || die
136     newconfd "${FILESDIR}"/unrealircd.confd unrealircd
137    
138     fperms 700 /etc/unrealircd || die
139     chown -R unrealircd "${D}"/{etc,var/{lib,log,run}}/unrealircd ||die
140     }
141    
142     pkg_postinst() {
143     # Move docert call from scr_install() to install_cert in pkg_postinst for
144     # bug #201682
145     if use ssl ; then
146     if [[ ! -f "${ROOT}"/etc/unrealircd/server.cert.key ]]; then
147     install_cert /etc/unrealircd/server.cert || die
148     chown unrealircd "${ROOT}"/etc/unrealircd/server.cert.* || die
149     ln -snf server.cert.key "${ROOT}"/etc/unrealircd/server.key.pem || die
150     fi
151     fi
152    
153     elog
154     elog "UnrealIRCd will not run until you've set up /etc/unrealircd/unrealircd.conf"
155     elog
156     elog "You can find example cron scripts here:"
157     elog " /usr/share/doc/${PF}/ircd.cron.gz"
158     elog " /usr/share/doc/${PF}/ircdchk.gz"
159     elog
160     elog "You can also use /etc/init.d/unrealircd to start at boot"
161     elog
162     }

  ViewVC Help
Powered by ViewVC 1.1.20