Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 225187 Details for
Bug 300619
[EBUILD] nginx 0.8.32 with a bunch of additional modules
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
eclass/nginx.eclass
nginx.eclass (text/plain), 22.90 KB, created by
steveb
on 2010-03-25 10:09:38 UTC
(
hide
)
Description:
eclass/nginx.eclass
Filename:
MIME Type:
Creator:
steveb
Created:
2010-03-25 10:09:38 UTC
Size:
22.90 KB
patch
obsolete
># Copyright 2010 Stevan Bajic <stevan@bajic.ch> ># Distributed under the terms of the GNU Affero General Public License v3 ># $Header: nginx.eclass,v 1.00 2010/03/06 23:27:49 sbajic Exp $ > >EAPI="2" > ># @ECLASS: nginx.eclass ># @MAINTAINER: ># stevan@bajic.ch ># @BLURB: Provides a common set of functions for nginx ebuild ># @DESCRIPTION: ># This eclass handles nginx ebuild functions. > >inherit eutils flag-o-matic multilib ssl-cert toolchain-funcs perl-module ruby-ng > ># ============================================================================== ># INTERNAL VARIABLES ># ============================================================================== > >USE_RUBY=${USE_RUBY:-"ruby18"} >RUBY_OPTIONAL=${RUBY_OPTIONAL:-"yes"} >PASSENGER_PV=${PASSENGER_PV:-"2.2.11"} > >MODULE_ACCEPT_LANGUAGE_PV=${MODULE_ACCEPT_LANGUAGE_PV:-"02262ce"} >MODULE_ACCESSKEY_PV=${MODULE_ACCESSKEY_PV:-"2.0.3"} >MODULE_AUTH_REQUEST_PV=${MODULE_AUTH_REQUEST_PV:-"0.2"} >MODULE_BYTES_FILTER_PV=${MODULE_BYTES_FILTER_PV:-"57365655ee44"} >MODULE_CACHE_PURGE_PV=${MODULE_CACHE_PURGE_PV:-"1.0"} >MODULE_CHUNKIN_PV=${MODULE_CHUNKIN_PV:-"cb610a5"} >MODULE_DRIZZLE_PV=${MODULE_DRIZZLE_PV:-"aa3269a"} >MODULE_ECHO_PV=${MODULE_ECHO_PV:-"d388079"} >MODULE_EVAL_PV=${MODULE_EVAL_PV:-"e85e11e"} >MODULE_EVENTS_PV=${MODULE_EVENTS_PV:-"49ab119a468c"} >MODULE_GUNZIP_PV=${MODULE_GUNZIP_PV:-"d1b72979e4f1"} >MODULE_H264_PV=${MODULE_H264_PV:-"2.2.7"} >MODULE_HEADERS_MORE_PV=${MODULE_HEADERS_MORE_PV:-"db9913e"} >MODULE_IP_TOS_FILTER_PV=${MODULE_IP_TOS_FILTER_PV:-"a23404790f33"} >MODULE_MODZIP_PV=${MODULE_MODZIP_PV:-"1.1.5"} >MODULE_MOGILEFS_PV=${MODULE_MOGILEFS_PV:-"1.0.3"} >MODULE_AUTH_PAM_PV=${MODULE_AUTH_PAM_PV:-"1.1"} >MODULE_PUSH_PV=${MODULE_PUSH_PV:-"0.692"} >MODULE_RDS_JSON_PV=${MODULE_RDS_JSON_PV:-"9cf3bef"} >MODULE_REDIS_PV=${MODULE_REDIS_PV:-"0.3.1"} >MODULE_SLOWFS_CACHE_PV=${MODULE_SLOWFS_CACHE_PV:-"1.3"} >MODULE_SUPERVISORD_PV=${MODULE_SUPERVISORD_PV:-"1.3"} >MODULE_UDPLOG_PV=${MODULE_UDPLOG_PV:-"1.0.0"} >MODULE_UPLOAD_PROGRESS_PV=${MODULE_UPLOAD_PROGRESS_PV:-"c740674"} >MODULE_UPLOAD_PV=${MODULE_UPLOAD_PV:-"2.0.12"} >MODULE_UPSTREAM_FAIR_PV=${MODULE_UPSTREAM_FAIR_PV:-"2131c73"} >MODULE_UPSTREAM_JVM_ROUTE_PV=${MODULE_UPSTREAM_JVM_ROUTE_PV:-"0.1"} >MODULE_UPSTREAM_KEEPALIVE_PV=${MODULE_UPSTREAM_KEEPALIVE_PV:-"2ce9d8a1ca93"} >MODULE_XSS_PV=${MODULE_XSS_PV:-"58732b0"} > >NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif fastcgi \ > geo gzip limit_req limit_zone map memcached proxy referer rewrite ssi \ > upstream_ip_hash userid" > >NGINX_MODULES_OPT="addition dav degradation flv geoip gzip_static image_filter \ > perl random_index realip secure_link stub_status sub xslt" > >NGINX_MODULES_MAIL="imap pop3 smtp" > >NGINX_MODULES_3RD="http_accept_language http_accesskey http_auth_request http_bytes_filter \ > http_cache_purge http_chunkin http_drizzle http_echo http_eval http_events \ > http_gunzip http_h264 http_headers_more http_ip_tos_filter http_modzip \ > http_mogilefs http_auth_pam http_passenger http_push http_rds_json http_redis \ > http_slowfs_cache http_supervisord http_udplog http_upload \ > http_upload_progress http_upstream_fair http_upstream_jvm_route \ > http_upstream_keepalive http_xss http_passenger" > >IUSE="${IUSE} aio debug +http +http-cache ipv6 libatomic ssl pcre" > >for mod in ${NGINX_MODULES_STD}; do > IUSE="${IUSE} +nginx_modules_http_${mod}" >done > >for mod in ${NGINX_MODULES_OPT}; do > IUSE="${IUSE} nginx_modules_http_${mod}" >done > >for mod in ${NGINX_MODULES_MAIL}; do > IUSE="${IUSE} nginx_modules_mail_${mod}" >done > >for mod in ${NGINX_MODULES_3RD}; do > IUSE="${IUSE} nginx_modules_${mod}" >done > >CDEPEND="aio? ( dev-libs/libaio ) > arm? ( dev-libs/libatomic_ops ) > ssl? ( dev-libs/openssl ) > http-cache? ( userland_GNU? ( dev-libs/openssl ) ) > pcre? ( >=dev-libs/libpcre-4.2 ) > nginx_modules_http_drizzle? ( >=dev-db/libdrizzle-0.6 ) > nginx_modules_http_geo? ( dev-libs/geoip ) > nginx_modules_http_gzip? ( sys-libs/zlib ) > nginx_modules_http_gzip_static? ( sys-libs/zlib ) > nginx_modules_http_image_filter? ( media-libs/gd ) > nginx_modules_http_perl? ( >=dev-lang/perl-5.8 ) > nginx_modules_http_rewrite? ( >=dev-libs/libpcre-4.2 ) > nginx_modules_http_secure_link? ( userland_GNU? ( dev-libs/openssl ) ) > nginx_modules_http_xslt? ( dev-libs/libxml2 dev-libs/libxslt ) > nginx_modules_http_auth_pam? ( sys-libs/pam ) > nginx_modules_http_passenger? ( > $(ruby_implementation_depend ruby18) > >=dev-ruby/rubygems-0.9.0 > >=dev-ruby/rake-0.8.1 > >=dev-ruby/fastthread-1.0.1 > >=dev-ruby/rack-1.0.0 > ) >" >RDEPEND="${RDEPEND} ${CDEPEND} > sys-apps/coreutils > sys-apps/sed" >DEPEND="${DEPEND} ${CDEPEND} > libatomic? ( dev-libs/libatomic_ops )" > >SRC_URI="http://sysoev.ru/nginx/${P}.tar.gz > nginx_modules_http_accept_language? ( http://github.com/giom/nginx_accept_language_module/tarball/master/giom-nginx_accept_language_module-${MODULE_ACCEPT_LANGUAGE_PV}.tar.gz ) > nginx_modules_http_accesskey? ( http://wiki.nginx.org/images/5/51/Nginx-accesskey-${MODULE_ACCESSKEY_PV}.tar.gz ) > nginx_modules_http_auth_pam? ( http://web.iti.upv.es/~sto/nginx/ngx_http_auth_pam_module-${MODULE_AUTH_PAM_PV}.tar.gz ) > nginx_modules_http_auth_request? ( http://mdounin.ru/hg/ngx_http_auth_request_module/archive/tip.tar.gz/ngx_http_auth_request_module-${MODULE_AUTH_REQUEST_PV}.tar.gz ) > nginx_modules_http_bytes_filter? ( http://mdounin.ru/hg/ngx_http_bytes_filter_module/archive/tip.tar.gz/ngx_http_bytes_filter_module-${MODULE_BYTES_FILTER_PV}.tar.gz ) > nginx_modules_http_cache_purge? ( http://labs.frickle.com/files/ngx_cache_purge-${MODULE_CACHE_PURGE_PV}.tar.gz ) > nginx_modules_http_chunkin? ( http://github.com/agentzh/chunkin-nginx-module/tarball/master/agentzh-chunkin-nginx-module-${MODULE_CHUNKIN_PV}.tar.gz ) > nginx_modules_http_drizzle? ( http://github.com/chaoslawful/drizzle-nginx-module/tarball/master/chaoslawful-drizzle-nginx-module-${MODULE_DRIZZLE_PV}.tar.gz ) > nginx_modules_http_echo? ( http://github.com/agentzh/echo-nginx-module/tarball/master/agentzh-echo-nginx-module-${MODULE_ECHO_PV}.tar.gz ) > nginx_modules_http_eval? ( http://github.com/vkholodkov/nginx-eval-module/tarball/master/vkholodkov-nginx-eval-module-${MODULE_EVAL_PV}.tar.gz ) > nginx_modules_http_events? ( http://hg.dutov.org/nginx-module-events/archive/tip.tar.bz2/nginx-module-events-${MODULE_EVENTS_PV}.tar.bz2 ) > nginx_modules_http_gunzip? ( http://mdounin.ru/hg/ngx_http_gunzip_filter_module/archive/tip.tar.gz/ngx_http_gunzip_filter_module-${MODULE_GUNZIP_PV}.tar.gz ) > nginx_modules_http_h264? ( http://h264.code-shop.com/download/nginx_mod_h264_streaming-${MODULE_H264_PV}.tar.gz ) > nginx_modules_http_headers_more? ( http://github.com/agentzh/headers-more-nginx-module/tarball/master/agentzh-headers-more-nginx-module-${MODULE_HEADERS_MORE_PV}.tar.gz ) > nginx_modules_http_ip_tos_filter? ( http://mdounin.ru/hg/ngx_http_ip_tos_filter_module/archive/tip.tar.gz/ngx_http_ip_tos_filter_module-${MODULE_IP_TOS_FILTER_PV}.tar.gz ) > nginx_modules_http_modzip? ( http://mod-zip.googlecode.com/files/mod_zip-${MODULE_MODZIP_PV}.tar.gz ) > nginx_modules_http_mogilefs? ( http://www.grid.net.ru/nginx/download/nginx_mogilefs_module-${MODULE_MOGILEFS_PV}.tar.gz ) > nginx_modules_http_passenger? ( mirror://rubyforge/passenger/passenger-${PASSENGER_PV}.tar.gz ) > nginx_modules_http_push? ( http://pushmodule.slact.net/downloads/nginx_http_push_module-${MODULE_PUSH_PV}.tar.gz ) > nginx_modules_http_rds_json? ( http://github.com/agentzh/rds-json-nginx-module/tarball/master/agentzh-rds-json-nginx-module-${MODULE_RDS_JSON_PV}.tar.gz ) > nginx_modules_http_redis? ( http://people.FreeBSD.ORG/~osa/ngx_http_redis-${MODULE_REDIS_PV}.tar.gz ) > nginx_modules_http_slowfs_cache? ( http://labs.frickle.com/files/ngx_slowfs_cache-${MODULE_SLOWFS_CACHE_PV}.tar.gz ) > nginx_modules_http_supervisord? ( http://labs.frickle.com/files/ngx_supervisord-${MODULE_SUPERVISORD_PV}.tar.gz ) > nginx_modules_http_udplog? ( http://www.grid.net.ru/nginx/download/nginx_udplog_module-${MODULE_UDPLOG_PV}.tar.gz ) > nginx_modules_http_upload? ( http://www.grid.net.ru/nginx/download/nginx_upload_module-${MODULE_UPLOAD_PV}.tar.gz ) > nginx_modules_http_upload_progress? ( http://github.com/masterzen/nginx-upload-progress-module/tarball/master/masterzen-nginx-upload-progress-module-${MODULE_UPLOAD_PROGRESS_PV}.tar.gz ) > nginx_modules_http_upstream_fair? ( http://github.com/gnosek/nginx-upstream-fair/tarball/master/gnosek-nginx-upstream-fair-${MODULE_UPSTREAM_FAIR_PV}.tar.gz ) > nginx_modules_http_upstream_jvm_route? ( http://nginx-upstream-jvm-route.googlecode.com/files/nginx-upstream-jvm-route-${MODULE_UPSTREAM_JVM_ROUTE_PV}.tar.gz ) > nginx_modules_http_upstream_keepalive? ( http://mdounin.ru/hg/ngx_http_upstream_keepalive/archive/tip.tar.gz/ngx_http_upstream_keepalive-${MODULE_UPSTREAM_KEEPALIVE_PV}.tar.gz ) > nginx_modules_http_xss? ( http://github.com/agentzh/xss-nginx-module/tarball/master/agentzh-xss-nginx-module-${MODULE_XSS_PV}.tar.gz ) >" > >S="${WORKDIR}" > ># ============================================================================== ># INTERNAL FUNCTIONS ># ============================================================================== ># Install module documentation or other module related files >install_module_files() { > local mod_name="" > local module_name="" > if [ -n "${1}" ]; then > mod_name="${1}" > module_name="${mod_name#nginx_modules_http_*}" > module_name="${module_name//_/-}-module" > if use ${mod_name}; then > if [ -n "${module_name}" -a -d "${WORKDIR}"/${module_name} ]; then > cd "${WORKDIR}"/${module_name} || die > [ -f "LICENSE" ] && newdoc LICENSE LICENSE.${module_name} > [ -f "README" ] && newdoc README README.${module_name} > [ -f "CHANGES" ] && newdoc CHANGES CHANGES.${module_name} > [ -f "Changelog" ] && newdoc Changelog Changelog.${module_name} > [ -f "nginx.conf" ] && newdoc nginx.conf EXAMPLE.nginx.conf.${module_name} > if [ "${mod_name}" = "accept_language" ]; then > newdoc README.textile README.${module_name} > elif [ "${mod_name}" = "push" ]; then > newdoc changelog.txt changelog.txt.${module_name} > newdoc protocol.txt protocol.txt.${module_name} > elif [ "${mod_name}" = "udplog" ]; then > newdoc LICENSE.ru LICENSE.ru.${module_name} > elif [ "${mod_name}" = "uplod" ]; then > newdoc example.php example.php.${module_name} > newdoc upload.html upload.html.${module_name} > elif [ "${mod_name}" = "upload_progress" ]; then > newdoc test/client.sh test-client.sh.${module_name} > newdoc test/stress.sh test-stress.sh.${module_name} > elif [ "${mod_name}" = "upload_progress" ]; then > dohtml doc/*.html > fi > fi > fi > fi >} > ># ============================================================================== ># EXPORTED FUNCTIONS ># ============================================================================== > ># @FUNCTION: nginx_pkg_preinst ># @DESCRIPTION: ># This function creates the user and group for nginx >nginx_pkg_preinst() { > ebegin "Creating nginx user and group" > enewgroup nginx || die "Failing to add group 'nginx'" > enewuser nginx -1 -1 -1 nginx || die "Failing to add user 'nginx'" > eend ${?} >} > ># @FUNCTION: nginx_pkg_setup ># @DESCRIPTION: >nginx_pkg_setup() { > if use ipv6; then > elog "Note that ipv6 support in nginx is still experimental." > elog "Be sure to read comments on gentoo bug #274614" > elog "http://bugs.gentoo.org/show_bug.cgi?id=274614" > fi > > if [ $(gcc-major-version) -ge 4 -a $(gcc-minor-version) -eq 1 ]; then > if ! use arm && use libatomic; then > elog "GCC 4.1+ features built-in atomic operations." > elog "Using libatomic_ops is only needed if using" > elog "a different compiler or a GCC prior to 4.1" > fi > fi > > if [ -n "${NGINX_ADD_MODULES}" ]; then > elog "You are building custom modules via \$NGINX_ADD_MODULES!" > elog "This nginx installation is not supported!" > elog "Please do not file bug reports!" > fi > > if use nginx_modules_http_passenger; then > ruby-ng_pkg_setup > use debug && append-flags -DPASSENGER_DEBUG > fi >} > >nginx_src_unpack() { > # prevent ruby-ng.eclass from messing with src_unpack > default >} > ># @FUNCTION: nginx_src_prepare ># @DESCRIPTION: ># This function handles modules and applies patches. >nginx_src_prepare() { > if use nginx_modules_http_accesskey; then > mv "${WORKDIR}"/*nginx-accesskey-* "${WORKDIR}"/accesskey-module/ || die > fi > if use nginx_modules_http_accept_language; then > mv "${WORKDIR}"/*-nginx_accept_language_module-* "${WORKDIR}"/accept-language-module/ || die > fi > if use nginx_modules_http_auth_request; then > mv "${WORKDIR}"/*ngx_http_auth_request_module-* "${WORKDIR}"/auth-request-module/ || die > fi > if use nginx_modules_http_bytes_filter; then > mv "${WORKDIR}"/*ngx_http_bytes_filter_module-* "${WORKDIR}"/bytes-filter-module/ || die > fi > if use nginx_modules_http_cache_purge; then > mv "${WORKDIR}"/ngx_cache_purge-* "${WORKDIR}"/cache-purge-module/ || die > fi > if use nginx_modules_http_chunkin; then > mv "${WORKDIR}"/*-chunkin-nginx-module-* "${WORKDIR}"/chunkin-module/ || die > fi > if use nginx_modules_http_echo; then > mv "${WORKDIR}"/*-echo-nginx-module-* "${WORKDIR}"/echo-module/ || die > fi > if use nginx_modules_http_gunzip; then > mv "${WORKDIR}"/ngx_http_gunzip_filter_module-* "${WORKDIR}"/gunzip-module/ || die > fi > if use nginx_modules_http_h264; then > mv "${WORKDIR}"/*_mod_h264_streaming-* "${WORKDIR}"/h264-module/ || die > fi > if use nginx_modules_http_headers_more; then > mv "${WORKDIR}"/*-headers-more-nginx-module-* "${WORKDIR}"/headers-more-module/ || die > fi > if use nginx_modules_http_ip_tos_filter; then > mv "${WORKDIR}"/*ngx_http_ip_tos_filter_module-* "${WORKDIR}"/ip-tos-filter-module/ || die > fi > if use nginx_modules_http_auth_pam; then > mv "${WORKDIR}"/*_auth_pam_* "${WORKDIR}"/auth-pam-module/ || die > fi > if use nginx_modules_http_push; then > mv "${WORKDIR}"/nginx_http_push_module-* "${WORKDIR}"/push-module/ || die > fi > if use nginx_modules_http_redis; then > mv "${WORKDIR}"/ngx_http_redis-* "${WORKDIR}"/redis-module/ || die > fi > if use nginx_modules_http_udplog; then > mv "${WORKDIR}"/nginx_udplog_module-* "${WORKDIR}"/udplog-module/ || die > if [ "${MODULE_UDPLOG_PV:0:1}" -eq "1" -a "${MODULE_UDPLOG_PV:2:1}" -eq "0" -a "${MODULE_UDPLOG_PV:4:2}" -eq "0" ]; then > cd "${WORKDIR}"/udplog-module || die > # This patch is only for udplog-1.0.0 > epatch "${FILESDIR}"/udplog_0_8_32.patch || die > fi > fi > if use nginx_modules_http_upload; then > mv "${WORKDIR}"/nginx_upload_module-* "${WORKDIR}"/upload-module/ || die > fi > if use nginx_modules_http_upload_progress; then > mv "${WORKDIR}"/*-nginx-upload-progress-module-* "${WORKDIR}"/upload-progress-module/ || die > fi > if use nginx_modules_http_drizzle; then > mv "${WORKDIR}"/*-drizzle-nginx-module-* "${WORKDIR}"/drizzle-module/ || die > fi > if use nginx_modules_http_eval; then > mv "${WORKDIR}"/*-nginx-eval-module-* "${WORKDIR}"/eval-module/ || die > fi > if use nginx_modules_http_events; then > mv "${WORKDIR}"/NGINX-Module-events-* "${WORKDIR}"/events-module/ || die > fi > if use nginx_modules_http_modzip; then > mv "${WORKDIR}"/*mod_zip-* "${WORKDIR}"/modzip-module/ || die > if [ "${PV:0:1}" -eq "0" -a "${PV:2:1}" -eq "8" -a "${PV:4:2}" -le "9" ]; then > cd "${WORKDIR}/${P}" || die > epatch "${WORKDIR}"/modzip-module/nginx-0.8.9-etag.patch || die > fi > fi > if use nginx_modules_http_mogilefs; then > mv "${WORKDIR}"/*-nginx-mogilefs-module-* "${WORKDIR}"/mogilefs-module/ || die > fi > if use nginx_modules_http_slowfs_cache; then > mv "${WORKDIR}"/ngx_slowfs_cache-* "${WORKDIR}"/slowfs-cache-module/ || die > fi > if use nginx_modules_http_upstream_fair; then > mv "${WORKDIR}"/*upstream-fair-* "${WORKDIR}"/upstream-fair-module/ || die > fi > if use nginx_modules_http_upstream_jvm_route; then > mv "${WORKDIR}"/nginx_upstream_jvm_route "${WORKDIR}"/upstream-jvm-route-module/ || die > cd "${WORKDIR}/${P}" || die > epatch "${WORKDIR}"/upstream-jvm-route-module/jvm_route.patch || die > fi > if use nginx_modules_http_upstream_keepalive; then > mv "${WORKDIR}"/ngx_http_upstream_keepalive-* "${WORKDIR}"/upstream-keepalive-module/ || die > fi > if use nginx_modules_http_supervisord; then > mv "${WORKDIR}"/ngx_supervisord-* "${WORKDIR}"/supervisord-module/ || die > if [ "${PV:0:1}" -ge "0" -a "${PV:2:1}" -ge "8" -a "${PV:4:2}" -ge "0" -a "${PV:4:2}" -le "16" ]; then > cd "${WORKDIR}/${P}" || die > epatch "${WORKDIR}"/supervisord-module/patches/ngx_http_upstream_init_busy-0.8.0.patch || die > elif [ "${PV:0:1}" -ge "0" -a "${PV:2:1}" -ge "8" -a "${PV:4:2}" -ge "17" ]; then > cd "${WORKDIR}/${P}" || die > epatch "${WORKDIR}"/supervisord-module/patches/ngx_http_upstream_init_busy-0.8.17.patch || die > fi > if use nginx_modules_http_upstream_fair; then > cd "${WORKDIR}"/upstream-fair-module || die > epatch "${WORKDIR}"/supervisord-module/patches/ngx_http_upstream_fair_module.patch || die > fi > fi > if use nginx_modules_http_rds_json; then > mv "${WORKDIR}"/*-rds-json-nginx-module-* "${WORKDIR}"/rds-json-module/ || die > fi > if use nginx_modules_http_xss; then > mv "${WORKDIR}"/*-xss-nginx-module-* "${WORKDIR}"/xss-module/ || die > fi > sed -i 's/ make/ \\$(MAKE)/' "${WORKDIR}"/${P}/auto/lib/perl/make || die >} > ># @FUNCTION: nginx_src_configure ># @DESCRIPTION: ># This function adds compiler flags and runs configure >nginx_src_configure() { > cd "${WORKDIR}/${P}" > > local myconf= http_enabled= mail_enabled= > > myconf="${myconf} --with-poll_module" > myconf="${myconf} --with-select_module" > #myconf="${myconf} --with-google_perftools_module" > myconf="${myconf} $(use_with pcre pcre)" > > # threads support is broken atm. > # > # if use threads; then > # einfo > # ewarn "threads support is experimental at the moment" > # ewarn "do not use it on production systems - you've been warned" > # einfo > # myconf="${myconf} --with-threads" > # fi > > use aio && myconf="${myconf} --with-file-aio" > use aio && myconf="${myconf} --with-aio_module" # This is very experimental but usable > if use debug; then > myconf="${myconf} --with-debug" > append-flags -g2 -ggdb > filter-flags -fomit-frame-pointer > fi > use ipv6 && myconf="${myconf} --with-ipv6" > use arm && myconf="${myconf} --with-libatomic" > use libatomic && myconf="${myconf} --with-libatomic" > > # HTTP modules > for mod in ${NGINX_MODULES_STD}; do > if use nginx_modules_http_${mod}; then > http_enabled=1 > else > myconf="${myconf} --without-http_${mod}_module" > fi > done > > for mod in ${NGINX_MODULES_OPT}; do > if use nginx_modules_http_${mod}; then > http_enabled=1 > myconf="${myconf} --with-http_${mod}_module" > fi > done > > if use nginx_modules_http_fastcgi; then > # HTTP RealIP is not really needed for FastCGI but the chance that one > # runs the FastCGI process on a remote/proxied system is pretty high so > # we enable that module when the user is using "fastcgi" USE flag. > myconf="${myconf} --with-http_realip_module" > fi > > for mod in ${NGINX_MODULES_3RD}; do > if use nginx_modules_${mod}; then > local mymod="${mod#http_*}" > [ "${mod}" != "${mymod}" ] && http_enabled=1 > myconf="${myconf} --add-module=${WORKDIR}/${mymod//_/-}-module" > fi > done > > if use http || use http-cache; then > http_enabled=1 > fi > > if [ "${http_enabled}" = "1" ]; then > use http-cache || myconf="${myconf} --without-http-cache" > use ssl && myconf="${myconf} --with-http_ssl_module" > else > myconf="${myconf} --without-http --without-http-cache" > fi > > # MAIL modules > for mod in ${NGINX_MODULES_MAIL}; do > if use nginx_modules_mail_${mod}; then > mail_enabled=1 > else > myconf="${myconf} --without-mail_${mod}_module" > fi > done > > if [ "${mail_enabled}" = "1" ]; then > myconf="${myconf} --with-mail" > use ssl && myconf="${myconf} --with-mail_ssl_module" > fi > > # Custom modules > for mod in ${NGINX_ADD_MODULES}; do > if [ -d "${mod}" ; then > myconf="${myconf} --add-module=${mod}" > fi > done > > if use ssl; then > myconf="${myconf} --with-sha1-asm --with-sha1=/usr/include/openssl" > myconf="${myconf} --with-md5-asm --with-md5=/usr/include/openssl" > fi > > # Remove double entries > myconf="$(echo ${myconf}|tr ' ' '\n'|sort -u|tr '\n' ' ')" > > # http://bugs.gentoo.org/show_bug.cgi?id=286772 > export LANG=C LC_ALL=C > tc-export CC > > ./configure \ > --user=${PN} \ > --group=${PN} \ > --prefix=/usr \ > --with-cc-opt="-I${ROOT}usr/include" \ > --with-ld-opt="-L${ROOT}usr/lib" \ > --conf-path=/etc/${PN}/${PN}.conf \ > --http-log-path=/var/log/${PN}/access_log \ > --error-log-path=/var/log/${PN}/error_log \ > --pid-path=/var/run/${PN}.pid \ > --lock-path=/var/lock/${PN}.lock \ > --http-client-body-temp-path=/var/tmp/${PN}/client \ > --http-proxy-temp-path=/var/tmp/${PN}/proxy \ > --http-fastcgi-temp-path=/var/tmp/${PN}/fastcgi \ > ${myconf} || die "configure failed" >} > >nginx_src_compile() { > cd "${WORKDIR}/${P}" > # http://bugs.gentoo.org/show_bug.cgi?id=286772 > export LANG=C LC_ALL=C > tc-export CC > emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" || die "failed to compile" >} > ># @FUNCTION: nginx_src_install ># @DESCRIPTION: ># This function runs `emake install' and generates, installs and adapts the gentoo ># specific configuration files found in the tarball >nginx_src_install() { > cd "${WORKDIR}/${P}" > local module_name="" > > keepdir /var/log/${PN} /var/tmp/${PN}/{client,proxy,fastcgi} > > dosbin objs/nginx > newinitd "${FILESDIR}"/nginx.init-r2 nginx || die "failed to install init.d script" > > cp "${FILESDIR}"/nginx.conf-r4 conf/nginx.conf > rm conf/win-utf conf/koi-win conf/koi-utf > > dodir /etc/${PN} > insinto /etc/${PN} > doins conf/* > > dodoc CHANGES{,.ru} README > > # logrotate > insinto /etc/logrotate.d > newins "${FILESDIR}"/nginx.logrotate nginx || die "failed to install logrotate script" > > if use http; then > dodir "${ROOT}"var/www/localhost/htdocs > insinto "${ROOT}"var/www/localhost/htdocs > doins html/* > fi > > if use nginx_modules_http_perl; then > cd "${S}/${P}"/objs/src/http/modules/perl/ > einstall DESTDIR="${D}" INSTALLDIRS=vendor || die "failed to install perl stuff" > fixlocalpod > fi > > if use nginx_modules_http_passenger; then > # passengers Rakefile is so horribly broken that we have to do it > # manually > cd "${WORKDIR}"/passenger-${PASSENGER_PV} > > export RUBY="ruby18" > > insinto $(${RUBY} -rrbconfig -e 'print Config::CONFIG["archdir"]')/phusion_passenger > insopts -m 0755 > doins ext/phusion_passenger/*.so > doruby -r lib/phusion_passenger > > exeinto /usr/bin > doexe bin/passenger-memory-stats bin/passenger-status > > exeinto /usr/libexec/passenger/bin > doexe bin/passenger-spawn-server > > exeinto /usr/libexec/passenger/ext/nginx > doexe ext/nginx/HelperServer > fi > > for mod in ${NGINX_MODULES_3RD}; do > if use nginx_modules_${mod}; then > elog "Installing 3th party module: ${mod}" > install_module_files nginx_modules_${mod} > fi > done >} > ># @FUNCTION: nginx_pkg_postinst ># @DESCRIPTION: ># This function creates test certificates if SSL is enabled and installs the ># default index.html to /var/www/localhost if it does not exist. We do this here ># because the default webroot is a copy of the files that exist elsewhere and we ># don't want them to be managed/removed by portage when apache is upgraded. >nginx_pkg_postinst() { > cd "${WORKDIR}/${P}" > use ssl && { > if [ ! -f "${ROOT}"etc/ssl/${PN}/${PN}.key ]; then > dodir "${ROOT}"etc/ssl/${PN} > insinto "${ROOT}"etc/ssl/${PN}/ > insopts -m0644 -o ${PN} -g {PN} > install_cert /etc/ssl/${PN}/${PN} > chown ${PN}:${PN} "${ROOT}"etc/ssl/${PN}/${PN}.{crt,csr,key,pem} > fi > } >} > >EXPORT_FUNCTIONS pkg_preinst pkg_setup src_unpack src_prepare src_configure src_compile src_install pkg_postinst
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 300619
:
216107
|
216108
|
216109
|
216111
|
216112
|
216135
|
216494
|
222061
| 225187 |
225189