Mercurial > packages > rhel6 > uwsgi
view uwsgi.spec @ 1:1697a2bdcf59
Add .hgignore file
author | Guido Berhoerster <guido+packaging@berhoerster.name> |
---|---|
date | Sat, 27 Jul 2013 13:45:35 +0200 |
parents | 9668c317e887 |
children | 6f2f488ec30d |
line wrap: on
line source
# revision of the uwsgi documentation corresponding to the packaged release %global uwsgi_docs_rev fe9425920713f11d3636ae3924867147fabcc02c Name: uwsgi Version: 1.9.13 Release: 1%{?dist} Summary: Complete Stack for Building Clustered/Distributed Network Applications Group: System Environment/Daemons License: GPLv2+ URL: http://projects.unbit.it/uwsgi Source0: http://projects.unbit.it/downloads/%{name}-%{version}.tar.gz Source1: https://github.com/unbit/uwsgi-docs/archive/%{uwsgi_docs_rev}.zip Source2: %{name}.ini Source3: %{name}.conf Source4: %{name}.init Source5: %{name}.logrotate # prevent attempts to install plugins into plugin_dir at build time Patch0: uwsgi-do-not-install-plugins-into-plugin_dir.patch # do not set rpath for plugins Patch1: uwsgi-no-rpath.patch # link against libboost*-mt provided by RHEL/Fedora Patch2: uwsgi-link-against-boost-mt.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: boost-devel BuildRequires: bzip2-devel BuildRequires: dos2unix BuildRequires: erlang BuildRequires: gcc-objc BuildRequires: GeoIP-devel BuildRequires: gloox-devel BuildRequires: gmp-devel BuildRequires: httpd-devel BuildRequires: java-devel BuildRequires: krb5-devel BuildRequires: libattr-devel BuildRequires: libcap-devel BuildRequires: libcurl-devel BuildRequires: libcurl-devel BuildRequires: libedit-devel BuildRequires: libuuid-devel BuildRequires: libxml2-devel BuildRequires: libxslt-devel BuildRequires: libyaml-devel BuildRequires: lua-devel BuildRequires: mongodb-devel BuildRequires: mono-devel BuildRequires: openldap-devel BuildRequires: openssl-devel BuildRequires: pam-devel BuildRequires: pcre-devel BuildRequires: perl-Coro BuildRequires: perl-devel BuildRequires: perl-ExtUtils-Embed BuildRequires: php-devel BuildRequires: php-embedded BuildRequires: postgresql-devel BuildRequires: python2-devel BuildRequires: python-greenlet-devel BuildRequires: python-sphinx BuildRequires: ruby BuildRequires: ruby-devel BuildRequires: sqlite-devel BuildRequires: tcp_wrappers-devel BuildRequires: v8-devel BuildRequires: zeromq-devel Requires(pre): shadow-utils Requires(post): chkconfig Requires(postun): initscripts Requires(preun): chkconfig Requires(preun): initscripts %description The uWSGI project aims at developing a full stack for building (and hosting) clustered/distributed network applications. Mainly targeted at the web and its standards, it has been successfully used in a lot of different contexts. Thanks to its pluggable architecture it can be extended without limits to support more platforms and languages. Currently, you can write plugins in C, C++ and Objective-C. The "WSGI" part in the name is a tribute to the namesake Python standard, as it has been the first developed plugin for the project. Versatility, performance, low-resource usage and reliability are the strengths of the project (and the only rules followed). %package devel Summary: Development Files for uWSGI Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel This package contains the development headers needed for developing uWSGI plugins. %package -n python-uwsgidecorators Summary: Python decorators providing access to the uwsgi API Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: %{name}-plugin-python = %{version}-%{release} %description -n python-uwsgidecorators The uwsgidecorators Python module provides higher-level access to the uWSGI API. %package doc Summary: uWSGI Documentation Group: Documentation Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc This package contains the documentation for uWSGI. %package plugin-airbrake Summary: uWSGI Plugin for Sending Backtraces to Airbrake-compatible Servers Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-airbrake The airbrake uWSGI plugin allows to send backtraces to Airbrake-compatible servers. %package plugin-alarm_curl Summary: uWSGI Plugin for Sending Alarms via curl Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-alarm_curl The alarm_curl uWSGI plugin allows to send alarms via curl. %package plugin-alarm_xmpp Summary: uWSGI Plugin for Sending Alarms via XMPP Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-alarm_xmpp The alarm_xmpp uWSGI plugin allows to send alarms via XMPP. %package plugin-coroae Summary: uWSGI Plugin Perl Coro::AnyEvent Support Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-coroae The coroae uWSGI plugin enables support for the Perl Coro::AnyEvent loop engine. %package plugin-curl_cron Summary: uWSGI Plugin for Invoking URLs as Cron Tasks via curl Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-curl_cron The curl_cron uWSGI plugin enables cron tasks to to invoke an URL via curl %package plugin-emperor_mongodb Summary: uWSGI Plugin for Monitoring an Emperor through a MongoDB Database Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-emperor_mongodb The emperor_mongodb uWSGI plugin allows to monitor an emperor through a MongoDB database. %package plugin-emperor_pg Summary: uWSGI Plugin for Monitoring an Emperor through a PostgresSQL Database Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-emperor_pg The emperor_pg uWSGI Plugin allows to monitor an emperor through a PostgresSQL database. %package plugin-geoip Summary: uWSGI Plugin for GeoIP-based Routing Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-geoip The geoip uWSGI Plugin allows GeoIP-based routing. %package plugin-gridfs Summary: uWSGI Plugin for Serving GridFS Database Contents Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-gridfs The gridfs uWSGI Plugin allows serving GridFS database contents. %package plugin-jvm Summary: uWSGI Plugin Embedding a JVM Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-jvm The jvm uWSGI plugin allows to embed a JVM into uWSGI. %package plugin-ldap Summary: uWSGI Plugin Providing LDAP Support Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-ldap The ldap uWSGI plugin provides LDAP support including authentication and reading uWSGI configuration from LDAP. %package plugin-lua Summary: uWSGI Plugin Embedding Lua and Providing WSAPI Support Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-lua The lua uWSGI plugin embeds Lua into uWSGI and adds support for running WSAPI applications. %package plugin-pam Summary: uWSGI Plugin Providing PAM Support Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-pam The pam uWSGI plugin provides support from PAM. %package plugin-php Summary: uWSGI Plugin Embedding PHP Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-php The php uWSGI plugin embeds PHP into uWSGI. %package plugin-psgi Summary: uWSGI Plugin Embedding Perl and Providing PSGI Support Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-psgi The psgi uWSGI plugin embeds Perl and adds support for running PSGI applications. %package plugin-python Summary: uWSGI Plugin Embedding Python and Providing WSGI Support Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-python The python uWSGI plugin embeds Python and allows to run WSGI applications and provides access to the uWSGI API from Python. %package plugin-rack Summary: uWSGI Plugin Providing Ruby Rack Support Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-rack The rack uWSGI plugin allows running Ruby Rack applications. %package plugin-router_access Summary: uWSGI Plugin for TCP Wrapper-based Access Control Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-router_access The router_access uWSGI plugin enables TCP Wrapper-based access control. %package plugin-router_basicauth Summary: uWSGI Plugin Providing HTTP-Authentication Support Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-router_basicauth The router_basicauth uWSGI plugin enables support for HTTP-authentication. %package plugin-ruby19 Summary: uWSGI Plugin Embdedding Ruby Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-ruby19 The ruby19 uWSGI plugin embeds Ruby and provides access to the uWSGI API from Ruby. %package plugin-sqlite3 Summary: uWSGI Pluginfor Retrieving uWSGI Configuration from a SQLite3 Database Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-sqlite3 The sqlite3 uWSGI plugin allows to retrieve the uWSGI Configuration from a SQLite3 database. %package plugin-stats_pusher_mongodb Summary: uWSGI Plugin for Pushing Statistics to a MongoDB Database Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-stats_pusher_mongodb The stats_pusher_mongodb uWSGI plugin allows to push statistics to a MongoDB database. %package plugin-v8 Summary: uWSGI Plugin Embedding V8 and Providing JSGI 3.0 Support Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-v8 The v8 uWSGI plugin embeds the V8 Javascript Engine and provides support for running JSGI 3.0 applications. %package plugin-xslt Summary: uWSGI Plugin for Applying XSL Transformations Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description plugin-xslt The xslt uWSGI plugin allows to apply XSL Transformations %package -n mod_uwsgi Summary: uwsgi Apache module Group: System Environment/Libraries Requires: httpd >= 2.4 Requires: %{name} = %{version}-%{release} %description -n mod_uwsgi This package contains the uwsgi Apache module. # prevent auto-generated requires and provides for Apache modules, see # https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering %{?filter_setup: %filter_provides_in %{_libdir}/httpd/modules/.*\.so$ %filter_setup } %prep %setup -q -a1 %patch0 -p1 %patch1 -p1 %patch2 -p1 pushd uwsgi-docs-%{uwsgi_docs_rev} # remove empty files find . -name '*.rst' -and -size 0 -exec rm {} \+ # remove languages unknown to sphinx which otherwise cause build failures find . -name '*.rst' -exec sed -i 's|code-block:: .*$|code-block:: none|' {} \+ # fix CRLF dos2unix PyPy.rst popd # # generate the build configuration # # examples without real use blacklist_plugins="example" blacklist_plugins="${blacklist_plugins} dummy" blacklist_plugins="${blacklist_plugins} cheaper_backlog2" blacklist_plugins="${blacklist_plugins} cplusplus" blacklist_plugins="${blacklist_plugins} exception_log" # stackless python is not available blacklist_plugins="${blacklist_plugins} stackless" # seems to conflic with python plugin blacklist_plugins="${blacklist_plugins} pyuwsgi" # requires modifications to PyPy blacklist_plugins="${blacklist_plugins} pypy" # uses Mac OS X API blacklist_plugins="${blacklist_plugins} alarm_speech" # internal hack blacklist_plugins="${blacklist_plugins} mongodb" # the Mono version provided by RHEL 6 is too old blacklist_plugins="${blacklist_plugins} mono" # Go is not available blacklist_plugins="${blacklist_plugins} go" # systemd is not available blacklist_plugins="${blacklist_plugins} systemd_logger" # Ruby 1.9 is not available blacklist_plugins="${blacklist_plugins} fiber" # gccgo is not available blacklist_plugins="${blacklist_plugins} gccgo" embed_plugins="null" for f in plugins/*/uwsgiplugin.py; do plugin="${f#plugins/}" plugin="${plugin%/uwsgiplugin.py}" blacklisted=false for blacklist_plugin in ${blacklist_plugins}; do if [ "${plugin}" = "${blacklist_plugin}" ]; then blacklisted=true break fi done if ! ${blacklisted}; then enabled_plugins="${enabled_plugins}${enabled_plugins:+, }${plugin}" fi done cat >buildconf/fedora.ini <<EOF [uwsgi] inherit = base ; enable XML configuration format xml = true ; configuration from SQlite database sqlite3 = true ; configuration via LDAP ldap = true ; enable SSL support ssl = true ; enable PCRE support pcre = true ; use libyaml for parsing YAML configuration yaml_implementation = libyaml ; enable alarm subystem alarm = true ; enable ZeroMQ transport layer zeromq = true ; plugins to build plugins = ${enabled_plugins} ; plugins to embed embedded_plugins = ${embed_plugins} ; plugin installation path plugin_dir = %{_libdir}/%{name} EOF %build export UWSGICONFIG_LUALIB="lua" export UWSGICONFIG_LUAINC="%{_includedir}" export UWSGICONFIG_LUALIBPATH="%{_libdir}" export CFLAGS="%{optflags} -Wno-unused-but-set-variable -Wno-error" # build uwsgi executable and plugins python uwsgiconfig.py --build fedora.ini # build apache module pushd apache2 apxs -c mod_uwsgi.c popd # build HTML documentation mkdir html sphinx-build -b html uwsgi-docs-%{uwsgi_docs_rev} html rm -rf html/.doctrees html/.buildinfo %install rm -rf %{buildroot} install -D -p -m 755 uwsgi %{buildroot}%{_sbindir}/uwsgi install -d -m 755 %{buildroot}%{_libdir}/uwsgi install -p -m 755 *_plugin.so %{buildroot}%{_libdir}/uwsgi install -D -p -m 644 uwsgidecorators.py \ %{buildroot}%{python_sitelib}/uwsgidecorators.py install -D -p -m 755 apache2/.libs/mod_uwsgi.so \ %{buildroot}%{_libdir}/httpd/modules/mod_uwsgi.so install -d -m 755 %{buildroot}%{_includedir}/uwsgi install -p -m 0644 *.h %{buildroot}%{_includedir}/uwsgi install -d -m 755 %{buildroot}%{_sysconfdir}/uwsgi.d install -d -m 755 %{buildroot}%{_localstatedir}/run/uwsgi install -D -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/uwsgi.ini install -D -p -m 755 %{SOURCE4} %{buildroot}%{_initddir}/uwsgi install -D -p -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/uwsgi install -D -p -m 644 %{SOURCE3} \ %{buildroot}%{_sysconfdir}/httpd/conf.d/10-uwsgi.conf %clean rm -rf %{buildroot} %pre getent group uwsgi >/dev/null || groupadd -r uwsgi getent passwd uwsgi >/dev/null || \ useradd -r -g uwsgi -d %{_localstatedir}/run/uwsgi -s /sbin/nologin \ -c "uWSGI daemon user" uwsgi exit 0 %post /sbin/chkconfig --add uwsgi %preun if [ $1 -eq 0 ] ; then /sbin/service uwsgi stop >/dev/null 2>&1 /sbin/chkconfig --del uwsgi fi %postun if [ "$1" -ge 1 ] ; then /sbin/service uwsgi condrestart >/dev/null 2>&1 || : fi %files %defattr(-,root,root,-) %doc LICENSE README CONTRIBUTORS %{_initddir}/uwsgi %config(noreplace) %{_sysconfdir}/uwsgi.ini %dir %{_sysconfdir}/uwsgi.d %config(noreplace) %{_sysconfdir}/logrotate.d/uwsgi %{_sbindir}/uwsgi %dir %{_localstatedir}/run/uwsgi %dir %{_libdir}/uwsgi %{_libdir}/%{name}/cache_plugin.so %{_libdir}/%{name}/cgi_plugin.so %{_libdir}/%{name}/cheaper_busyness_plugin.so %{_libdir}/%{name}/clock_monotonic_plugin.so %{_libdir}/%{name}/clock_realtime_plugin.so %{_libdir}/%{name}/corerouter_plugin.so %{_libdir}/%{name}/dumbloop_plugin.so %{_libdir}/%{name}/echo_plugin.so %{_libdir}/%{name}/http_plugin.so %{_libdir}/%{name}/legion_cache_fetch_plugin.so %{_libdir}/%{name}/logcrypto_plugin.so %{_libdir}/%{name}/logfile_plugin.so %{_libdir}/%{name}/notfound_plugin.so %{_libdir}/%{name}/objc_gc_plugin.so %{_libdir}/%{name}/ping_plugin.so %{_libdir}/%{name}/rawrouter_plugin.so %{_libdir}/%{name}/router_cache_plugin.so %{_libdir}/%{name}/router_hash_plugin.so %{_libdir}/%{name}/router_http_plugin.so %{_libdir}/%{name}/router_memcached_plugin.so %{_libdir}/%{name}/router_radius_plugin.so %{_libdir}/%{name}/router_redirect_plugin.so %{_libdir}/%{name}/router_redis_plugin.so %{_libdir}/%{name}/router_rewrite_plugin.so %{_libdir}/%{name}/router_static_plugin.so %{_libdir}/%{name}/router_uwsgi_plugin.so %{_libdir}/%{name}/router_xmldir_plugin.so %{_libdir}/%{name}/rpc_plugin.so %{_libdir}/%{name}/signal_plugin.so %{_libdir}/%{name}/spooler_plugin.so %{_libdir}/%{name}/ssi_plugin.so %{_libdir}/%{name}/sslrouter_plugin.so %{_libdir}/%{name}/stats_pusher_statsd_plugin.so %{_libdir}/%{name}/symcall_plugin.so %{_libdir}/%{name}/transformation_chunked_plugin.so %{_libdir}/%{name}/transformation_gzip_plugin.so %{_libdir}/%{name}/transformation_offload_plugin.so %{_libdir}/%{name}/transformation_tofile_plugin.so %{_libdir}/%{name}/transformation_toupper_plugin.so %{_libdir}/%{name}/ugreen_plugin.so %{_libdir}/%{name}/webdav_plugin.so %{_libdir}/%{name}/xattr_plugin.so %{_libdir}/%{name}/zergpool_plugin.so %{_libdir}/%{name}/admin_plugin.so %{_libdir}/%{name}/syslog_plugin.so %{_libdir}/%{name}/rsyslog_plugin.so %{_libdir}/%{name}/carbon_plugin.so %{_libdir}/%{name}/emperor_amqp_plugin.so %{_libdir}/%{name}/emperor_zeromq_plugin.so %{_libdir}/%{name}/erlang_plugin.so %{_libdir}/%{name}/fastrouter_plugin.so %{_libdir}/%{name}/gevent_plugin.so %{_libdir}/%{name}/graylog2_plugin.so %{_libdir}/%{name}/greenlet_plugin.so %{_libdir}/%{name}/jwsgi_plugin.so %{_libdir}/%{name}/logsocket_plugin.so %{_libdir}/%{name}/mongodblog_plugin.so %{_libdir}/%{name}/nagios_plugin.so %{_libdir}/%{name}/pyerl_plugin.so %{_libdir}/%{name}/redislog_plugin.so %{_libdir}/%{name}/ring_plugin.so %{_libdir}/%{name}/router_spnego_plugin.so %{_libdir}/%{name}/rrdtool_plugin.so %files doc %defattr(-,root,root,-) %doc html/ %files devel %defattr(-,root,root,-) %{_includedir}/uwsgi %files plugin-airbrake %defattr(-,root,root,-) %{_libdir}/%{name}/airbrake_plugin.so %files plugin-alarm_curl %defattr(-,root,root,-) %{_libdir}/%{name}/alarm_curl_plugin.so %files plugin-alarm_xmpp %defattr(-,root,root,-) %{_libdir}/%{name}/alarm_xmpp_plugin.so %files plugin-coroae %defattr(-,root,root,-) %{_libdir}/%{name}/coroae_plugin.so %files plugin-curl_cron %defattr(-,root,root,-) %{_libdir}/%{name}/curl_cron_plugin.so %files plugin-emperor_mongodb %defattr(-,root,root,-) %{_libdir}/%{name}/emperor_mongodb_plugin.so %files plugin-emperor_pg %defattr(-,root,root,-) %{_libdir}/%{name}/emperor_pg_plugin.so %files plugin-geoip %defattr(-,root,root,-) %{_libdir}/%{name}/geoip_plugin.so %files plugin-gridfs %defattr(-,root,root,-) %{_libdir}/%{name}/gridfs_plugin.so %files plugin-jvm %defattr(-,root,root,-) %{_libdir}/%{name}/jvm_plugin.so %files plugin-ldap %defattr(-,root,root,-) %{_libdir}/%{name}/ldap_plugin.so %files plugin-lua %defattr(-,root,root,-) %{_libdir}/%{name}/lua_plugin.so %files plugin-pam %defattr(-,root,root,-) %{_libdir}/%{name}/pam_plugin.so %files plugin-php %defattr(-,root,root,-) %{_libdir}/%{name}/php_plugin.so %files plugin-psgi %defattr(-,root,root,-) %{_libdir}/%{name}/psgi_plugin.so %files plugin-python %defattr(-,root,root,-) %{_libdir}/%{name}/python_plugin.so %files plugin-rack %defattr(-,root,root,-) %{_libdir}/%{name}/rack_plugin.so %files plugin-router_access %defattr(-,root,root,-) %{_libdir}/%{name}/router_access_plugin.so %files plugin-router_basicauth %defattr(-,root,root,-) %{_libdir}/%{name}/router_basicauth_plugin.so %files plugin-ruby19 %defattr(-,root,root,-) %{_libdir}/%{name}/ruby19_plugin.so %files plugin-sqlite3 %defattr(-,root,root,-) %{_libdir}/%{name}/sqlite3_plugin.so %files plugin-stats_pusher_mongodb %defattr(-,root,root,-) %{_libdir}/%{name}/stats_pusher_mongodb_plugin.so %files plugin-v8 %defattr(-,root,root,-) %{_libdir}/%{name}/v8_plugin.so %files plugin-xslt %defattr(-,root,root,-) %{_libdir}/%{name}/xslt_plugin.so %files -n python-uwsgidecorators %defattr(-,root,root,-) %{python_sitelib}/uwsgidecorators.py* %files -n mod_uwsgi %defattr(-,root,root,-) %{_sysconfdir}/httpd/conf.d/10-uwsgi.conf %{_libdir}/httpd/modules/mod_uwsgi.so %changelog * Wed Jul 10 2013 Guido Berhoerster <guido+packaging@berhoerster.name> - 1.9.13-1 - Initial packaging