/[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.9 - (hide annotations) (download)
Fri Jun 25 19:12:54 2010 UTC (4 years, 1 month ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
old, drop mips
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 cla 1.5 # Copyright 1999-2009 Gentoo Foundation
2 ulm 1.1 # Distributed under the terms of the GNU General Public License v2
3 ssuominen 1.9 # $Header: /var/cvsroot/gentoo-x86/net-irc/unrealircd/unrealircd-3.2.7-r2.ebuild,v 1.8 2009/11/16 14:41:04 rbu Exp $
4 betelgeuse 1.6
5     EAPI="2"
6 ulm 1.1
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 ricmm 1.4 KEYWORDS="~amd64 ~mips ppc sparc x86 ~x86-fbsd"
20 ulm 1.1 IUSE="hub ipv6 ssl zlib curl prefixaq showlistmodes"
21    
22     RDEPEND="ssl? ( dev-libs/openssl )
23     zlib? ( sys-libs/zlib )
24 betelgeuse 1.6 curl? ( net-misc/curl[ares,-ipv6] )"
25 ulm 1.1 DEPEND="${RDEPEND}
26     >=sys-apps/sed-4"
27    
28     S="${WORKDIR}/Unreal${PV}"
29    
30     pkg_setup() {
31     enewuser unrealircd
32     }
33    
34 betelgeuse 1.6 src_prepare() {
35 ulm 1.1 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 betelgeuse 1.6 src_configure() {
44 ulm 1.1 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 betelgeuse 1.6 }
72 ulm 1.1
73 betelgeuse 1.6 src_compile() {
74 ulm 1.1 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 cla 1.5 elog " /usr/share/doc/${PF}/"
130     elog " /usr/share/doc/${PF}/"
131 ulm 1.1 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