From bd8f8807ff9fa85f0e27e165d8f64ea415e743f1 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Sun, 30 Mar 2008 17:18:58 -0700 Subject: Generate RPM spec file from .spec.in file --- packaging/fedora/tinyproxy.spec | 84 -------------------------------------- packaging/fedora/tinyproxy.spec.in | 84 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 84 deletions(-) delete mode 100644 packaging/fedora/tinyproxy.spec create mode 100644 packaging/fedora/tinyproxy.spec.in (limited to 'packaging/fedora') diff --git a/packaging/fedora/tinyproxy.spec b/packaging/fedora/tinyproxy.spec deleted file mode 100644 index 9187371..0000000 --- a/packaging/fedora/tinyproxy.spec +++ /dev/null @@ -1,84 +0,0 @@ -%define tinyproxy_confdir %{_sysconfdir}/tinyproxy -%define tinyproxy_datadir %{_datadir}/tinyproxy - -Name: tinyproxy -Version: 1.6.3 -Release: 1%{?dist} -Summary: A small, efficient HTTP/SSL proxy daemon - -Group: System Environment/Daemons -License: GPLv2+ -URL: https://projects.banu.com/tinyproxy/ -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -Source1: %{name}.init -Source2: %{name}.conf - -%description -tinyproxy is a small, efficient HTTP/SSL proxy daemon released under the -GNU General Public License (GPL). tinyproxy is very useful in a small -network setting, where a larger proxy like Squid would either be too -resource intensive, or a security risk. - -%prep -%setup -q - - -%build -%configure --with-config=%{tinyproxy_confdir}/%{name}.conf -make %{?_smp_mflags} - - -%install -rm -rf $RPM_BUILD_ROOT -make install-exec DESTDIR=$RPM_BUILD_ROOT - -# 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 -rm -rf $RPM_BUILD_ROOT - - -%post -/sbin/chkconfig --add %{name} - - -%preun -if [ $1 = 0 ]; then - /sbin/service %{name} stop >/dev/null 2>&1 - /sbin/chkconfig --del %{name} -fi - - -%postun -if [ $1 -ge 1 ]; then - /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 -* Sun Mar 09 2008 Jeremy Hinegardner - 1.6.3-1 -- Initial rpm configuration diff --git a/packaging/fedora/tinyproxy.spec.in b/packaging/fedora/tinyproxy.spec.in new file mode 100644 index 0000000..8932b50 --- /dev/null +++ b/packaging/fedora/tinyproxy.spec.in @@ -0,0 +1,84 @@ +%define tinyproxy_confdir %{_sysconfdir}/tinyproxy +%define tinyproxy_datadir %{_datadir}/tinyproxy + +Name: tinyproxy +Version: @VERSION@ +Release: 1%{?dist} +Summary: A small, efficient HTTP/SSL proxy daemon + +Group: System Environment/Daemons +License: GPLv2+ +URL: https://projects.banu.com/tinyproxy/ +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Source1: %{name}.init +Source2: %{name}.conf + +%description +tinyproxy is a small, efficient HTTP/SSL proxy daemon released under the +GNU General Public License (GPL). tinyproxy is very useful in a small +network setting, where a larger proxy like Squid would either be too +resource intensive, or a security risk. + +%prep +%setup -q + + +%build +%configure --with-config=%{tinyproxy_confdir}/%{name}.conf +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make install-exec DESTDIR=$RPM_BUILD_ROOT + +# 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 +rm -rf $RPM_BUILD_ROOT + + +%post +/sbin/chkconfig --add %{name} + + +%preun +if [ $1 = 0 ]; then + /sbin/service %{name} stop >/dev/null 2>&1 + /sbin/chkconfig --del %{name} +fi + + +%postun +if [ $1 -ge 1 ]; then + /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 +* Sun Mar 09 2008 Jeremy Hinegardner - 1.6.3-1 +- Initial rpm configuration -- cgit v1.2.3