Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
193 lines (175 sloc) 6.25 KB
#
# spec file for package: yaws
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# includes module(s):
#
%include Solaris.inc
%include base.inc
Name: yaws
Version: 1.89
Summary: Yet Another Web Server
License: BSD
Distribution: OpenSolaris
Vendor: OpenSolaris Community
Url: http://yaws.hyber.org/
SUNW_Basedir: /
SUNW_Copyright: %{name}.copyright
Source0: http://yaws.hyber.org/download/yaws-%{version}.tar.gz
Source1: http-yaws.xml
Source2: http-yaws
Patch0: yaws-00-configure-erlbindir.diff
%include default-depend.inc
BuildRequires: SUNWggrp
BuildRequires: SUNWgmake
BuildRequires: erlang
Requires: erlang
Meta(info.maintainer): James Lee <jlee@thestaticvoid.com>
Meta(info.upstream): Claes Wikström <klacke@hyber.org>
Meta(info.upstream_url): http://yaws.hyber.org/
Meta(info.classification): org.opensolaris.category.2008:System/Services
%description
Yaws is a HTTP high perfomance 1.1 webserver particularly well suited for
dynamic-content webapplications. Yaws is entirely written in Erlang
furthermore it is a multithreaded webserver where one Erlang light weight
process is used to handle each client.
%prep
%setup -q
%patch0
autoconf
ERL=%{_bindir}/%{base_isa}/erl ./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} --localstatedir=%{_localstatedir}
%build
gmake
%install
rm -rf $RPM_BUILD_ROOT
gmake DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/svc/manifest/network
cp %{SOURCE1} $RPM_BUILD_ROOT%{_localstatedir}/svc/manifest/network/http-yaws.xml
mkdir -p $RPM_BUILD_ROOT/lib/svc/method
cp %{SOURCE2} $RPM_BUILD_ROOT/lib/svc/method/http-yaws
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/yaws/yaws-cert.pem
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/yaws/yaws-key.pem
rm -f $RPM_BUILD_ROOT%{_libdir}/yaws/ebin/.empty
rm -rf $RPM_BUILD_ROOT%{_prefix}/etc
# remove example vhost configuration and replace
# autogenerated vhost containing the build hostname with "localhost"
sed '/<server localhost>/,//d; s/<server .*>/<server localhost>/; s@/usr/var/log/yaws@/var/log/yaws@' $RPM_BUILD_ROOT%{_sysconfdir}/yaws/yaws.conf > $RPM_BUILD_ROOT%{_sysconfdir}/yaws/yaws.conf.new
mv -f $RPM_BUILD_ROOT%{_sysconfdir}/yaws/yaws.conf.new $RPM_BUILD_ROOT%{_sysconfdir}/yaws/yaws.conf
# move epam to correct directory
mv -f $RPM_BUILD_ROOT%{_libdir}/yaws/priv/lib/epam $RPM_BUILD_ROOT%{_libdir}/yaws/priv/
# set pipe dir to /tmp because /var/run is only writable by root
sed 's@PIPE_DIR=.*@PIPE_DIR="/tmp/yaws/pipe/$1"@' $RPM_BUILD_ROOT%{_bindir}/yaws > $RPM_BUILD_ROOT%{_bindir}/yaws.new
mv -f $RPM_BUILD_ROOT%{_bindir}/yaws.new $RPM_BUILD_ROOT%{_bindir}/yaws
chmod +x $RPM_BUILD_ROOT%{_bindir}/yaws
%clean
rm -rf $RPM_BUILD_ROOT
%if %(test -f /usr/sadm/install/scripts/i.manifest && echo 0 || echo 1)
%iclass manifest -f i.manifest
%endif
%files
%defattr(-,root,bin)
%dir /lib
%dir /lib/svc
%dir /lib/svc/method
%attr(555,root,bin) /lib/svc/method/http-yaws
%attr(755,root,sys) %dir %{_prefix}
%dir %{_bindir}
%{_bindir}/yaws
%dir %{_libdir}
%dir %{_libdir}/yaws
%dir %{_libdir}/yaws/examples
%dir %{_libdir}/yaws/examples/ebin
%dir %{_libdir}/yaws/examples/include
%dir %{_libdir}/yaws/priv
%{_libdir}/yaws/priv/wsdl.xsd
%{_libdir}/yaws/priv/soap.xsd
%dir %{_libdir}/yaws/priv/lib
%{_libdir}/yaws/priv/lib/setuid_drv.so
%attr(4755,root,bin) %{_libdir}/yaws/priv/epam
%{_libdir}/yaws/priv/envelope.xsd
%dir %{_libdir}/yaws/ebin
%{_libdir}/yaws/ebin/yaws_app.beam
%{_libdir}/yaws/ebin/haxe.beam
%{_libdir}/yaws/ebin/yaws_compile.beam
%{_libdir}/yaws/ebin/yaws_log.beam
%{_libdir}/yaws/ebin/yaws_generated.beam
%{_libdir}/yaws/ebin/yaws_api.beam
%{_libdir}/yaws/ebin/yaws_sup.beam
%{_libdir}/yaws/ebin/yaws.app
%{_libdir}/yaws/ebin/yaws_xmlrpc.beam
%{_libdir}/yaws/ebin/yaws_appmod_cgi.beam
%{_libdir}/yaws/ebin/yaws_html.beam
%{_libdir}/yaws/ebin/yaws_outmod.beam
%{_libdir}/yaws/ebin/yaws_revproxy.beam
%{_libdir}/yaws/ebin/yaws_config.beam
%{_libdir}/yaws/ebin/authmod_gssapi.beam
%{_libdir}/yaws/ebin/yaws_cgi.beam
%{_libdir}/yaws/ebin/yaws_soap_lib.beam
%{_libdir}/yaws/ebin/yaws_jsonrpc.beam
%{_libdir}/yaws/ebin/yaws_stats.beam
%{_libdir}/yaws/ebin/yaws_ls.beam
%{_libdir}/yaws/ebin/yaws_rss.beam
%{_libdir}/yaws/ebin/yaws.beam
%{_libdir}/yaws/ebin/yaws_log_file_h.beam
%{_libdir}/yaws/ebin/yaws_rpc.beam
%{_libdir}/yaws/ebin/yaws_sendfile.beam
%{_libdir}/yaws/ebin/yaws_sup_restarts.beam
%{_libdir}/yaws/ebin/json.beam
%{_libdir}/yaws/ebin/mime_types.beam
%{_libdir}/yaws/ebin/jsonrpc.beam
%{_libdir}/yaws/ebin/yaws_zlib.beam
%{_libdir}/yaws/ebin/yaws_ctl.beam
%{_libdir}/yaws/ebin/mime_type_c.beam
%{_libdir}/yaws/ebin/yaws_pam.beam
%{_libdir}/yaws/ebin/yaws_session_server.beam
%{_libdir}/yaws/ebin/yaws_sendfile_compat.beam
%{_libdir}/yaws/ebin/yaws_server.beam
%{_libdir}/yaws/ebin/yaws_ticker.beam
%{_libdir}/yaws/ebin/yaws_soap_srv.beam
%{_libdir}/yaws/ebin/yaws_debug.beam
%{_libdir}/yaws/ebin/yaws_dav.beam
%{_libdir}/yaws/ebin/yaws_multipart.beam
%{_libdir}/yaws/ebin/yaws_appmod_fcgi.beam
%{_libdir}/yaws/ebin/yaws_websockets.beam
%dir %{_libdir}/yaws/include
%{_libdir}/yaws/include/yaws_api.hrl
%{_libdir}/yaws/include/yaws.hrl
%{_libdir}/yaws/include/yaws_dav.hrl
%{_libdir}/yaws/include/soap.hrl
%attr(755,root,other) %dir %{_libdir}/pkgconfig
%{_libdir}/pkgconfig/yaws.pc
%attr(755,root,sys) %dir %{_datadir}
%dir %{_mandir}
%dir %{_mandir}/man1
%dir %{_mandir}/man5
%{_mandir}/man1/yaws.1
%{_mandir}/man5/yaws_api.5
%{_mandir}/man5/yaws.conf.5
%attr(755,root,other) %dir %{_docdir}
%dir %{_docdir}/yaws-%{version}
%defattr(-,root,sys)
%dir %{_sysconfdir}
%dir %{_sysconfdir}/yaws
%attr(640,root,webservd) %config %{_sysconfdir}/yaws/yaws.conf
%dir %{_localstatedir}/log
%attr(755,webservd,webservd) %dir %{_localstatedir}/log/yaws
%{_localstatedir}/yaws
%dir %{_localstatedir}/svc
%dir %{_localstatedir}/svc/manifest
%dir %{_localstatedir}/svc/manifest/network
%class(manifest) %attr(444,root,sys) %{_localstatedir}/svc/manifest/network/http-yaws.xml
%changelog
* Tue Feb 15 2011 - jlee@thestaticvoid.com
- Bump to version 1.89
- Run under 'webservd' user
- Require my version of Erlang
* Thu Jan 21 2010 - jlee@thestaticvoid.com
- Bump to version 1.87
* Mon Dec 28 2009 - jlee@thestaticvoid.com
- Bump to version 1.86
* Thu Nov 26 2009 - jlee@thestaticvoid.com
- Bump to version 1.85
* Sat Jul 30 2009 - jlee@thestaticvoid.com
- Initial version