/[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.8 - (show annotations) (download)
Mon Nov 16 14:41:04 2009 UTC (5 years, 1 month ago) by rbu
Branch: MAIN
Changes since 1.7: +1 -1 lines
Re-add old stable until the new one is stable
(Portage version: 2.1.7.1/cvs/Linux x86_64, RepoMan options: --force)

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

  ViewVC Help
Powered by ViewVC 1.1.20