%global _hardened_build 1
Name: darkhttpd
Version: 1.10
Release: 3%{?dist}
Summary: A secure, lightweight, fast, single-threaded HTTP/1.1 server
License: BSD
URL: http://unix4lyfe.org/darkhttpd/
Source0: http://unix4lyfe.org/%{name}/%{name}-%{version}.tar.bz2
Source1: %{name}.service
Source2: %{name}.sysconfig
BuildRequires: systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description
darkhttpd is a secure, lightweight, fast, single-threaded HTTP/1.1 server.
Features:
Simple to set up.
Single binary, no other files, no installation needed.
Standalone, doesn't need inetd or ucspi-tcp.
No messing around with config files - all you have to specify is the www root.
Written in C - efficient and portable.
Small memory footprint.
Event loop, single threaded - no fork() or pthreads.
Generates directory listings.
Supports HTTP GET and HEAD requests.
Supports Range / partial content.
Supports If-Modified-Since.
Supports Keep-Alive connections.
Can serve 301 redirects based on Host header.
Uses sendfile().
%prep
%setup -q
sed -i 's|$@|$@ $(LDFLAGS)|g' Makefile
%build
make CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" %{?_smp_mflags}
%install
install -pDm755 %{name} %{buildroot}%{_bindir}/%{name}
install -pDm644 %{S:1} %{buildroot}%{_unitdir}/%{name}.service
install -pDm644 %{S:2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%systemd_post %{S:1}
%preun
%systemd_preun %{S:1}
%postun
%systemd_postun_with_restart %{S:1}
%files
%doc README
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%{_bindir}/%{name}
%{_unitdir}/%{name}.service
%changelog
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu May 29 2014 Christopher Meng <rpm@cicku.me> - 1.10-1
- Update to 1.10
* Tue Mar 25 2014 Christopher Meng <rpm@cicku.me> - 1.9-5
- Harden rebuild.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sun Jun 16 2013 Christopher Meng <rpm@cicku.me> - 1.9-3
- Fix systemd support.
* Wed May 22 2013 Christopher Meng <rpm@cicku.me> - 1.9-2
- Add systemd support.
* Wed May 01 2013 Christopher Meng <rpm@cicku.me> - 1.9-1
- Initial Package.