File nostromo.spec of Package nostromo

#
# spec file for package nostromo (Version 1.9.2)
#
# Copyright 2009 Mario García H.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# norootforbuild

Summary: Simple, fast and secure HTTP server
Name: nostromo
Version: 1.9.2
Release: 1
Source0: %{name}-%{version}.tar.gz
Source1: http://www.nazgul.ch/dev/nostromo-1.9.2.tar.gz
Patch0:  %{name}-%{version}.patch
Vendor: %{vendor}
URL: http://www.nazgul.ch/dev_nostromo.html
License: MIT
Group: Productivity/Networking/Web/Servers
Provides: nhttpd
BuildRoot: %{_builddir}/%{name}-%{version}-build
BuildRequires: libopenssl-devel 


%description
Nhttpd is a simple, fast and secure HTTP server.

It runs as a single process, handling connections
with select(2).

For CGIs and directory listing it does fork(2).
nhttpd has the minimum of HTTP/1.1 and CGI/1.1
implemented. Also supported are; chroot, setuid,
basic authentication, SSL, IPv6, custom repsonses,
aliases, and virtual hosts.

To stop the server send a SIGTERM signal to the PID.
The access log is written in standard CLF format.


%prep
%setup -q
%patch0 -p1


%build
CFLAGS=$RPM_OPT_FLAGS %{__make} %{?jobs:-j%jobs}


%install
%{__install} -d -m 755 %{buildroot}%{_sbindir}
%{__install} -d -m 755 %{buildroot}%{_mandir}/man8
%{__install} -d -m 755 %{buildroot}%{_localstatedir}/lib/nostromo/conf
%{__install} -d -m 755 %{buildroot}%{_localstatedir}/lib/nostromo/htdocs
%{__install} -d -m 755 %{buildroot}%{_localstatedir}/lib/nostromo/htdocs/cgi-bin
%{__install} -d -m 755 %{buildroot}%{_localstatedir}/lib/nostromo/icons
%{__install} -d -m 755 %{buildroot}%{_localstatedir}/lib/nostromo/logs

cd %{_builddir}/%{name}-%{version}

%{__install} src/nhttpd/nhttpd \
%{buildroot}%{_sbindir}/nhttpd

%{__install} src/nhttpd/nhttpd.8 \
%{buildroot}%{_mandir}/man8/nhttpd.8

%{__install} src/tools/crypt \
%{buildroot}%{_sbindir}/crypt

%{__install} -m 555 htdocs/cgi-bin/printenv \
%{buildroot}%{_localstatedir}/lib/nostromo/htdocs/cgi-bin/printenv
%{__install} -m 644 conf/mimes \
%{buildroot}%{_localstatedir}/lib/nostromo/conf/mimes
%{__install} -m 644 conf/nhttpd.conf-dist \
%{buildroot}%{_localstatedir}/lib/nostromo/conf/nhttpd.conf-dist
%{__install} -m 644 htdocs/index.html \
%{buildroot}%{_localstatedir}/lib/nostromo/htdocs/index.html
%{__install} -m 644 htdocs/nostromo.gif \
%{buildroot}%{_localstatedir}/lib/nostromo/htdocs/nostromo.gif
%{__install} -m 644 icons/dir.gif \
%{buildroot}%{_localstatedir}/lib/nostromo/icons/dir.gif
%{__install} -m 644 icons/file.gif \
%{buildroot}%{_localstatedir}/lib/nostromo/icons/file.gif


%clean
%__rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%attr(0555,root,bin) %{_sbindir}/nhttpd
%attr(0555,root,bin) %{_sbindir}/crypt

%dir %attr(0755,root,daemon) %{_localstatedir}/lib/nostromo
%dir %attr(0755,root,daemon) %{_localstatedir}/lib/nostromo/conf
%dir %attr(0755,root,daemon) %{_localstatedir}/lib/nostromo/htdocs
%dir %attr(0755,root,daemon) %{_localstatedir}/lib/nostromo/htdocs/cgi-bin
%dir %attr(0755,root,daemon) %{_localstatedir}/lib/nostromo/icons
%dir %attr(0755,root,daemon) %{_localstatedir}/lib/nostromo/logs

%attr(0555,root,bin) %{_localstatedir}/lib/nostromo/htdocs/cgi-bin/printenv
%attr(0644,root,bin) %{_localstatedir}/lib/nostromo/conf/mimes
%attr(0644,root,bin) %{_localstatedir}/lib/nostromo/conf/nhttpd.conf-dist
%attr(0644,root,bin) %{_localstatedir}/lib/nostromo/htdocs/index.html
%attr(0644,root,bin) %{_localstatedir}/lib/nostromo/htdocs/nostromo.gif
%attr(0644,root,bin) %{_localstatedir}/lib/nostromo/icons/dir.gif
%attr(0644,root,bin) %{_localstatedir}/lib/nostromo/icons/file.gif

%doc %attr(0644,root,root)%{_mandir}/man8/nhttpd.8.gz


%changelog
* Wed Aug 12 2009 Mario García H. <code933k@gmail.com> - 1.9.2-2
- Changed a mistake in the *.spec license section.
* Mon Aug 10 2009 Mario García H. <code933k@gmail.com> - 1.9.2
- Initial package.
openSUSE Build Service is sponsored by