Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 8bf63b04dbb764ec533779e45618dcd0 > files > 7

ziproxy-3.2.1-3.mga3.src.rpm

Summary:	A http compression and optimizer, non-caching, fully configurable proxy
Name:		ziproxy
Version:	3.2.1
Release:	%mkrel 3
License:	GPL
Group:		System/Servers
URL:		http://ziproxy.sourceforge.net/
Source0:	http://www.dancab.com/proj/ziproxy/files/%{name}-%{version}.tar.bz2
Source1:        ziproxy.init
Source2:        ziproxy.sysconfig
Source3:        ziproxy.logrotate
Patch0:		ziproxy-mdv_conf.diff
Patch1:         ziproxy-3.2.1-fix-configure.patch
Patch2:		ziproxy-3.2.1-gcc.patch
Requires(post): systemd >= %{systemd_required_version}
Requires(post): rpm-helper
Requires(preun): rpm-helper
BuildRequires:	flex
BuildRequires:	jasper-devel
BuildRequires:	jpeg-devel
BuildRequires:	ungif-devel
BuildRequires:	png-devel
BuildRequires:	libsasl2-devel

%description
Ziproxy is a forwarding (non-caching) proxy that gzips text and HTML files, and
reduces the size of images by converting them to lower quality JPEGs. It is
intended to increase the speed for low-speed Internet connections and it's
suitable for both home and professional usage. Ziproxy is fully configurable
and also features transparent proxy mode, preemptive name resolution, operation
in either daemon mode or (x)inetd mode, a detailed access log with compression
statistics, basic authentication, and more.

%prep

%setup -q
%patch0 -p0
%patch1 -p1
%patch2 -p1 -b .orig

cp %{SOURCE1} ziproxy.init
cp %{SOURCE2} ziproxy.sysconfig
cp %{SOURCE3} ziproxy.logrotate

# lib64 fix
perl -pi -e "s|/lib\b|/%{_lib}|g" config/*.m4

%build
%serverbuild
autoreconf -fi
%configure2_5x \
    --with-jasper=%{_prefix} \
    --with-sasl2=%{_prefix} \
    --with-cfgfile=%{_sysconfdir}/ziproxy/ziproxy.conf

%make

%install
rm -rf %{buildroot}

install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_sbindir}
install -d %{buildroot}%{_initrddir}
install -d %{buildroot}%{_sysconfdir}/sysconfig
install -d %{buildroot}%{_sysconfdir}/logrotate.d
install -d %{buildroot}%{_sysconfdir}/%{name}/errors
install -d %{buildroot}/var/log/%{name}
install -d %{buildroot}%{_mandir}/man1

install -m0755 src/%{name} %{buildroot}%{_sbindir}/%{name}
install -m0755 src/tools/ziproxylogtool %{buildroot}%{_bindir}/
install -m0755 src/tools/ziproxy_genhtml_stats.sh %{buildroot}%{_bindir}/ziproxy_genhtml_stats

install -m0644 etc/%{name}/%{name}.conf %{buildroot}%{_sysconfdir}/ziproxy/
install -m0644 var/%{name}/error/*.html %{buildroot}%{_sysconfdir}/ziproxy/errors/

install -m0755 ziproxy.init %{buildroot}%{_initrddir}/%{name}
install -m0644 ziproxy.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name}
install -m0644 ziproxy.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}

install -m0644 man/*.1 %{buildroot}%{_mandir}/man1/

mkdir -p %{buildroot}%{_tmpfilesdir}
cat <<EOF > %{buildroot}%{_tmpfilesdir}/%{name}.conf
d /run/ziproxy 0700 root root
EOF

%post
%_tmpfilescreate %{name}
%_post_service %{name}

%preun
%_preun_service %{name}

%clean
rm -rf %{buildroot}

%files
%doc COPYING CREDITS ChangeLog JPEG2000.txt README README.tools
%attr(0755,root,root) %{_initrddir}/%{name}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%attr(0700,root,root) %dir %{_sysconfdir}/%{name}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%attr(0700,root,root) %dir %{_sysconfdir}/%{name}/errors
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/errors/*.html
%{_tmpfilesdir}/%{name}.conf
%attr(0755,root,root) %{_sbindir}/%{name}
%attr(0755,root,root) %{_bindir}/ziproxylogtool
%attr(0755,root,root) %{_bindir}/ziproxy_genhtml_stats
%attr(0700,root,root) %dir /var/log/%{name}
%{_mandir}/man1/*


%changelog

* Sun Mar 24 2013 colin <colin> 3.2.1-3.mga3
+ Revision: 404859
- Add systemd requires and general post/pre fixes (mga#9302)

* Tue Jan 15 2013 fwang <fwang> 3.2.1-2.mga3
+ Revision: 388161
- more fix
- include stdbool
- define false and true
- include header
- fix build with latest gcc

  + umeabot <umeabot>
    - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

  + luigiwalser <luigiwalser>
    - add tmpfiles config for /run/ziproxy

  + dmorgan <dmorgan>
    - Fix to use with new autotools

* Sat Feb 11 2012 dlucio <dlucio> 3.2.1-1.mga2
+ Revision: 207463
- BR fixes
- imported package ziproxy