/[gentoo-x86]/www-servers/nginx/nginx-0.7.33.ebuild
Gentoo

Contents of /www-servers/nginx/nginx-0.7.33.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Feb 12 12:23:00 2009 UTC (5 years, 7 months ago) by voxus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
* bump
(Portage version: 2.2_rc23/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/www-servers/nginx/nginx-0.7.33.ebuild,v 1.1 2009/02/03 11:43:52 voxus Exp $
4
5 inherit eutils ssl-cert
6
7 DESCRIPTION="Robust, small and high performance http and reverse proxy server"
8
9 HOMEPAGE="http://nginx.net/"
10 SRC_URI="http://sysoev.ru/nginx/${P}.tar.gz"
11 LICENSE="BSD"
12 SLOT="0"
13 KEYWORDS="~amd64 ~ppc ~x86"
14 IUSE="addition debug fastcgi flv imap pcre perl ssl status sub webdav zlib"
15
16 DEPEND="dev-lang/perl
17 pcre? ( >=dev-libs/libpcre-4.2 )
18 ssl? ( dev-libs/openssl )
19 zlib? ( sys-libs/zlib )
20 perl? ( >=dev-lang/perl-5.8 )"
21
22 pkg_setup() {
23 ebegin "Creating nginx user and group"
24 enewgroup nginx
25 enewuser nginx -1 -1 /dev/null nginx
26 eend ${?}
27 }
28
29 src_compile() {
30 local myconf
31
32 # threads support is broken atm.
33 #
34 # if use threads; then
35 # einfo
36 # ewarn "threads support is experimental at the moment"
37 # ewarn "do not use it on production systems - you've been warned"
38 # einfo
39 # myconf="${myconf} --with-threads"
40 # fi
41
42 use addition && myconf="${myconf} --with-http_addition_module"
43 use fastcgi || myconf="${myconf} --without-http_fastcgi_module"
44 use fastcgi && myconf="${myconf} --with-http_realip_module"
45 use flv && myconf="${myconf} --with-http_flv_module"
46 use zlib || myconf="${myconf} --without-http_gzip_module"
47 use pcre || {
48 myconf="${myconf} --without-pcre --without-http_rewrite_module"
49 }
50 use debug && myconf="${myconf} --with-debug"
51 use ssl && myconf="${myconf} --with-http_ssl_module"
52 use imap && myconf="${myconf} --with-imap" # pop3/imap4 proxy support
53 use perl && myconf="${myconf} --with-http_perl_module"
54 use status && myconf="${myconf} --with-http_stub_status_module"
55 use webdav && myconf="${myconf} --with-http_dav_module"
56 use sub && myconf="${myconf} --with-http_sub_module"
57
58 ./configure \
59 --prefix=/usr \
60 --conf-path=/etc/${PN}/${PN}.conf \
61 --http-log-path=/var/log/${PN}/access_log \
62 --error-log-path=/var/log/${PN}/error_log \
63 --pid-path=/var/run/${PN}.pid \
64 --http-client-body-temp-path=/var/tmp/${PN}/client \
65 --http-proxy-temp-path=/var/tmp/${PN}/proxy \
66 --http-fastcgi-temp-path=/var/tmp/${PN}/fastcgi \
67 --with-md5-asm --with-md5=/usr/include \
68 --with-sha1-asm --with-sha1=/usr/include \
69 ${myconf} || die "configure failed"
70
71 emake || die "failed to compile"
72 }
73
74 src_install() {
75 keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi}
76
77 dosbin objs/nginx
78 cp "${FILESDIR}"/nginx-r1 "${T}"/nginx
79 doinitd "${T}"/nginx
80
81 cp "${FILESDIR}"/nginx.conf-r4 conf/nginx.conf
82
83 dodir "${ROOT}"/etc/${PN}
84 insinto "${ROOT}"/etc/${PN}
85 doins conf/*
86
87 dodoc CHANGES{,.ru} README
88
89 use perl && {
90 cd "${S}"/objs/src/http/modules/perl/
91 einstall DESTDIR="${D}"|| die "failed to install perl stuff"
92 }
93 }
94
95 pkg_postinst() {
96 use ssl && {
97 if [ ! -f "${ROOT}"/etc/ssl/${PN}/${PN}.key ]; then
98 dodir "${ROOT}"/etc/ssl/${PN}
99 insinto "${ROOT}"etc/ssl/${PN}/
100 insopts -m0644 -o nginx -g nginx
101 install_cert /etc/ssl/nginx/nginx
102 fi
103 }
104 }

  ViewVC Help
Powered by ViewVC 1.1.20