/[gentoo-x86]/net-irc/unrealircd/unrealircd-3.2.7-r2.ebuild
Gentoo

Contents of /net-irc/unrealircd/unrealircd-3.2.7-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sat Jun 6 21:29:01 2009 UTC (5 years, 3 months ago) by cla
Branch: MAIN
Changes since 1.4: +4 -4 lines
Don't specify full path of installed doc files since PORTAGE_COMPRESS comes into play (bug #272935)
(Portage version: 2.2_rc33/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20