tinyproxy/packaging/fedora/tinyproxy.spec.in

96 lines
2.5 KiB
RPMSpec
Raw Normal View History

2008-03-30 16:59:11 -07:00
%define tinyproxy_confdir %{_sysconfdir}/tinyproxy
%define tinyproxy_datadir %{_datadir}/tinyproxy
Name: tinyproxy
Version: @VERSION@
2008-05-01 19:47:58 +05:30
Release: 2%{?dist}
Summary: A light-weight HTTP proxy daemon
2008-03-30 16:59:11 -07:00
Group: System Environment/Daemons
License: GPLv2+
2008-10-16 18:21:16 +01:00
URL: https://www.banu.com/tinyproxy/
2008-03-30 16:59:11 -07:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2008-10-16 18:21:16 +01:00
Source0: https://www.banu.com/pub/tinyproxy/1.7/%{name}-%{version}.tar.gz
2008-03-30 16:59:11 -07:00
Source1: %{name}.init
Source2: %{name}.conf
2008-05-01 19:47:58 +05:30
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
2008-03-30 16:59:11 -07:00
%description
Tinyproxy is a light-weight HTTP proxy daemon designed to consume a
minimum amount of system resources. It listens on a given TCP port and
handles HTTP proxy requests. Designed from the ground up to be fast and
yet small, it is an ideal solution for use cases such as embedded
deployments where a full featured HTTP proxy is required, but the system
resources for a larger proxy are unavailable.
2008-03-30 16:59:11 -07:00
%prep
%setup -q
%build
%configure --with-config=%{tinyproxy_confdir}/%{name}.conf
make %{?_smp_mflags}
%install
2008-05-01 19:47:58 +05:30
rm -rf %{buildroot}
make install-exec DESTDIR=%{buildroot}
2008-03-30 16:59:11 -07:00
# The default 'make install' installs too many items, so we trim it down
# and install manually
%{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{tinyproxy_confdir}/%{name}.conf
%{__install} -d -m 0755 %{buildroot}%{tinyproxy_datadir}
%{__install} -p -D -m 0644 ./doc/%{name}.8 %{buildroot}%{_mandir}/man8/%{name}.8
for htmlfile in $(find ./doc/ -type f -name '*.html')
do
%{__install} -p -m 0644 $htmlfile %{buildroot}%{tinyproxy_datadir}
done
%clean
2008-05-01 19:47:58 +05:30
rm -rf %{buildroot}
2008-03-30 16:59:11 -07:00
%post
/sbin/chkconfig --add %{name}
%preun
if [ $1 = 0 ]; then
/sbin/service %{name} stop >/dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%postun
2008-05-01 19:47:58 +05:30
if [ "$1" -ge "1" ]; then
2008-03-30 16:59:11 -07:00
/sbin/service %{name} condrestart > /dev/null 2>&1 || :
fi
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README doc/*.txt
%{_sbindir}/%{name}
%{_mandir}/man8/%{name}.8.gz
%{_initrddir}/%{name}
%dir %{tinyproxy_datadir}
%dir %{tinyproxy_datadir}/*
%dir %{tinyproxy_confdir}
%config(noreplace) %{tinyproxy_confdir}/%{name}.conf
%changelog
2008-05-01 19:47:58 +05:30
* Wed Apr 16 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.6.3-2
- fix spec review issues
- fix initscript
2008-03-30 16:59:11 -07:00
* Sun Mar 09 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 1.6.3-1
- Initial rpm configuration