/[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.5 - (hide annotations) (download)
Thu May 5 18:32:57 2011 UTC (3 years, 3 months ago) by binki
Branch: MAIN
Changes since 1.4: +4 -3 lines
Fix bug 316379 reported by shimi by adding buildtime depend on pkgconfig.

(Portage version: 2.2.0_alpha30-r1/cvs/Linux x86_64)

1 binki 1.5 # Copyright 1999-2011 Gentoo Foundation
2 ssuominen 1.1 # Distributed under the terms of the GNU General Public License v2
3 binki 1.5 # $Header: /var/cvsroot/gentoo-x86/net-irc/unrealircd/unrealircd-3.2.8.1-r1.ebuild,v 1.4 2010/06/12 22:42:17 ssuominen 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 binki 1.5 >=sys-apps/sed-4
29     >=dev-util/pkgconfig-0.25"
30 ssuominen 1.1
31     S="${WORKDIR}/Unreal$(get_version_component_range 1-2)"
32    
33     pkg_setup() {
34     enewuser unrealircd
35     }
36    
37     src_prepare() {
38     #QA check against bundled pkgs
39     rm extras/*.gz
40    
41     sed -i \
42     -e "s:ircd\.pid:/var/run/unrealircd/ircd.pid:" \
43     -e "s:ircd\.log:/var/log/unrealircd/ircd.log:" \
44     -e "s:debug\.log:/var/log/unrealircd/debug.log:" \
45     -e "s:ircd\.tune:/var/lib/unrealircd/ircd.tune:" \
46     include/config.h \
47     || die "sed failed"
48    
49     # http://bugs.unrealircd.org/view.php?id=3842
50     epatch "${FILESDIR}"/unrealircd-system-tre.patch || die "epatch failed"
51    
52     epatch "${FILESDIR}"/unrealircd-system-cares.patch || die "epatch failed"
53    
54     mv autoconf/configure.in ./ || die
55     mv autoconf/aclocal.m4 ./acinclude.m4 || die
56     #can't call eautoreconf because aclocal's source files aren't even in unearlircd's svn!
57     eaclocal
58     eautoconf
59     }
60    
61     src_configure() {
62     local myconf=""
63     use curl && myconf="${myconf} --enable-libcurl=/usr"
64     use ipv6 && myconf="${myconf} --enable-inet6"
65     use zlib && myconf="${myconf} --enable-ziplinks"
66     use hub && myconf="${myconf} --enable-hub"
67     use ssl && myconf="${myconf} --enable-ssl"
68     use prefixaq && myconf="${myconf} --enable-prefixaq"
69     use spoof && myconf="${myconf} --enable-nospoof"
70     use showlistmodes && myconf="${myconf} --with-showlistmodes"
71     use topicisnuhost && myconf="${myconf} --with-topicisnuhost"
72     use shunnotices && myconf="${myconf} --with-shunnotices"
73     use operoverride || myconf="${myconf} --with-no-operoverride"
74     use operoverride-verify && myconf="${myconf} --with-operoverride-verify"
75     use usermod || myconf="${myconf} --with-disableusermod"
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     --with-system-cares \
88     --with-system-tre \
89     --enable-dynamic-linking \
90     ${myconf}
91    
92     # Fix upstream poor autofoo
93     sed -i \
94     -e "s:${D}::g" \
95     include/setup.h \
96     ircdcron/ircdchk \
97     || die
98     }
99    
100     src_compile() {
101     emake MAKE=make IRCDDIR=/etc/unrealircd || die "emake failed"
102     }
103    
104     src_install() {
105     keepdir /var/{lib,log,run}/unrealircd
106    
107     newbin src/ircd unrealircd || die
108    
109     exeinto /usr/$(get_libdir)/unrealircd/modules
110     doexe src/modules/*.so || die
111    
112     dodir /etc/unrealircd
113     dosym /var/lib/unrealircd /etc/unrealircd/tmp || die
114    
115     insinto /etc/unrealircd
116     doins {badwords.*,help,spamfilter,dccallow}.conf || die
117     newins doc/example.conf unrealircd.conf || die
118    
119     insinto /etc/unrealircd/aliases
120     doins aliases/*.conf || die
121     insinto /etc/unrealircd/networks
122     doins networks/*.network || die
123    
124     sed -i \
125     -e s:src/modules:/usr/$(get_libdir)/unrealircd/modules: \
126     -e s:ircd\\.log:/var/log/unrealircd/ircd.log: \
127     "${D}"/etc/unrealircd/unrealircd.conf \
128     || die
129    
130     dodoc \
131     Changes Donation Unreal.nfo networks/makenet \
132     ircdcron/{ircd.cron,ircdchk} \
133     || die "dodoc failed"
134     dohtml doc/*.html || die
135    
136     newinitd "${FILESDIR}"/unrealircd.rc unrealircd || die
137     newconfd "${FILESDIR}"/unrealircd.confd unrealircd
138    
139     fperms 700 /etc/unrealircd || die
140     chown -R unrealircd "${D}"/{etc,var/{lib,log,run}}/unrealircd ||die
141     }
142    
143     pkg_postinst() {
144     # Move docert call from scr_install() to install_cert in pkg_postinst for
145     # bug #201682
146     if use ssl ; then
147     if [[ ! -f "${ROOT}"/etc/unrealircd/server.cert.key ]]; then
148     install_cert /etc/unrealircd/server.cert || die
149     chown unrealircd "${ROOT}"/etc/unrealircd/server.cert.* || die
150     ln -snf server.cert.key "${ROOT}"/etc/unrealircd/server.key.pem || die
151     fi
152     fi
153    
154     elog
155     elog "UnrealIRCd will not run until you've set up /etc/unrealircd/unrealircd.conf"
156     elog
157     elog "You can find example cron scripts here:"
158     elog " /usr/share/doc/${PF}/ircd.cron.gz"
159     elog " /usr/share/doc/${PF}/ircdchk.gz"
160     elog
161     elog "You can also use /etc/init.d/unrealircd to start at boot"
162     elog
163     }

  ViewVC Help
Powered by ViewVC 1.1.20