%define major 0 %define libname %mklibname c-icap %{major} %define develname %mklibname c-icap -d %define epoch 4 Summary: An ICAP server coded in C Name: c-icap Version: 0.4.3 Release: %mkrel 1 License: GPL Group: System/Servers URL: http://sourceforge.net/projects/c-icap/ Source0: http://prdownloads.sourceforge.net/c-icap/c_icap-%{version}.tar.gz Source1: c-icap.service Source2: icapd.sysconfig Source3: icapd.logrotate Source4: c-icap-tmpfiles.conf Patch0: c_icap-mga_conf.diff Patch1: c_icap-makefile.patch Patch2: c_icap-030606-perllib_fix.patch Patch3: fix_lookuptable.patch Patch4: c_icap-domain_strip.diff #Patch5: c_icap-0.1.7-db5.patch BuildRequires: clamav-devel BuildRequires: chrpath BuildRequires: dos2unix BuildRequires: automake BuildRequires: autoconf BuildRequires: perl-devel BuildRequires: curl-devel BuildRequires: libbzip2-devel BuildRequires: libidn-devel BuildRequires: libgmp-devel BuildRequires: openssl-devel BuildRequires: doxygen BuildRequires: db-devel BuildRequires: file BuildRequires: openldap-devel BuildRequires: libgdbm-devel Epoch: %{epoch} Requires(pre): rpm-helper Requires(post): rpm-helper Requires(post): systemd Requires(preun): rpm-helper %description c-icap is an implementation of an ICAP server. It can be used with HTTP proxies that support the ICAP protocol to implement content adaptation and filtering services Most of the commercial HTTP proxies must support the ICAP protocol. The open source Squid 3.x proxy server supports it %package -n %{libname} Summary: Shared libraries for %{name} Group: System/Libraries %description -n %{libname} Shared libraries for %{name} %package -n %{develname} Summary: Development library and header files for the %{name} library Group: Development/C Requires: %{libname} = %{epoch}:%{version}-%{release} Provides: %{name}-devel = %{epoch}:%{version}-%{release} Provides: lib%{name}-devel = %{epoch}:%{version}-%{release} Obsoletes: %{mklibname c-icap 0 -d} %description -n %{develname} This package contains the static %{libname} library and its header files. %package server Summary: An ICAP server coded in C Group: System/Servers Requires: %{name}-modules = %{epoch}:%{version}-%{release} Requires: file webserver Requires(post): systemd >= %{systemd_required_version} Requires(post): rpm-helper Requires(preun): rpm-helper Requires(pre): rpm-helper Requires(postun): rpm-helper Recommends: c-icap-modules-extra %description server An ICAP server coded in C %package client Summary: An ICAP client coded in C Group: System/Servers %description client An ICAP client coded in C %package modules Summary: Modules for the c-icap-server Group: System/Servers %description modules Modules for the c-icap-server %prep %setup -q -n c_icap-%{version} %patch0 -p0 %patch1 -p0 #patch2 -p0 #patch3 -p0 %patch4 -p0 -b domain_strip #patch5 -p0 find . -type d -perm 0700 -exec chmod 755 {} \; find . -type f -perm 0555 -exec chmod 755 {} \; find . -type f -perm 0444 -exec chmod 644 {} \; for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null done # strip away annoying ^M # find -type f | grep -v "\.gif" | grep -v "\.png" | grep -v "\.jpg" | xargs dos2unix -U # find -type f -exec dos2unix --skipbin -U -n {} {} \; chmod 644 AUTHORS COPYING TODO cp %{SOURCE2} icapd.sysconfig cp %{SOURCE3} icapd.logrotate # fix build with new automake 1.13 #sed -i -e 's,AM_CONFIG_HEADER,AC_CONFIG_HEADERS,g' configure.in %build autoreconf -vfi export LIBS="-lpthread -ldl" export ICAP_DIR=`pwd` %configure2_5x \ --disable-static \ --enable-shared \ --with-perl=%{_bindir}/perl \ --with-ldap make %install %makeinstall_std CONFIGDIR=%{_sysconfdir}/icapd %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/sysconfig %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/logrotate.d %{__install} -d -m0755 %{buildroot}%{_sbindir} %{__install} -d -m0755 %{buildroot}%{_var}/log/icapd %{__install} -d -m0755 %{buildroot}%{_var}/www/cgi-bin mv %{buildroot}%{_bindir}/c-icap %{buildroot}%{_sbindir}/icapd %{__install} -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/icapd.service %{__install} -m0644 icapd.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/icapd %{__install} -m0644 icapd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/icapd #{__install} -m0755 contrib/get_file.pl %{buildroot}%{_var}/www/cgi-bin/get_file.pl %{__install} -D -p -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf # nuke rpath chrpath -d %{buildroot}%{_sbindir}/* #chrpath -d %{buildroot}%{_bindir}/c-icap chrpath -d %{buildroot}%{_bindir}/c-icap-client #chrpath -d %{buildroot}%{_bindir}/c-icap-mkbdb chrpath -d %{buildroot}%{_bindir}/c-icap-stretch #for l in %{buildroot}%{_bindir}/* ; do # file $l |grep "not stripped" # if [ $? -eq 0 ]; then # chrpath -d $l # continue # else # echo "not need to strip" # continue# # fi #done touch %{buildroot}%{_var}/log/icapd/server.log touch %{buildroot}%{_var}/log/icapd/access.log # cleanup rm -f %{buildroot}%{_libdir}/c_icap/*.*a rm -f %{buildroot}%{_libdir}/*.*a mkdir -p %{buildroot}%{_tmpfilesdir} cat <<EOF > %{buildroot}%{_tmpfilesdir}/%{name}.conf d /run/icapd 0755 icapd icapd EOF %pre server %_pre_useradd icapd /var/lib/icapd /bin/sh %post server %_tmpfilescreate %{name} %_post_service icapd #create_ghostfile %{_var}/log/icapd/server.log icapd icapd 0644 #create_ghostfile %{_var}/log/icapd/access.log icapd icapd 0644 %preun server %_preun_service icapd %postun server %_postun_userdel icapd %files server %doc AUTHORS COPYING TODO %{_tmpfilesdir}/%{name}.conf %{_unitdir}/icapd.service %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/icapd/c-icap.conf %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/icapd/c-icap.magic %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/icapd %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/icapd %{_tmpfilesdir}/%{name}.conf %attr(0755,root,root) %{_sbindir}/icapd %attr(0755,icapd,icapd) %dir %{_var}/log/icapd %ghost %attr(0644,icapd,icapd) %{_var}/log/icapd/server.log %ghost %attr(0644,icapd,icapd) %{_var}/log/icapd/access.log %attr(0755,root,root) %{_mandir}/man8/c-icap.8.* %files client %attr(0755,root,root) %{_bindir}/c-icap-client %attr(0755,root,root) %{_bindir}/c-icap-stretch %attr(0755,root,root) %{_bindir}/c-icap-mkbdb %attr(0755,root,root) %{_mandir}/man8/c-icap-client.8.* %attr(0755,root,root) %{_mandir}/man8/c-icap-mkbdb.8.* %attr(0755,root,root) %{_mandir}/man8/c-icap-stretch.8.* %files modules %dir %{_libdir}/c_icap %attr(0755,root,root) %{_libdir}/c_icap/*.so %files -n %{libname} %{_libdir}/*.so.* %files -n %{develname} %dir %{_includedir}/c_icap %attr(0644,root,root) %{_includedir}/c_icap/* %{_libdir}/*.so %attr(0755,root,root) %{_bindir}/c-icap-config %attr(0755,root,root) %{_bindir}/c-icap-libicapapi-config %attr(0755,root,root) %{_mandir}/man8/c-icap-config.8.* %attr(0755,root,root) %{_mandir}/man8/c-icap-libicapapi-config.8.* %changelog * Wed May 25 2016 luigiwalser <luigiwalser> 4:0.4.3-1.mga6 + Revision: 1018463 - 0.4.3 - rediff patch 0 * Mon Jan 18 2016 dlucio <dlucio> 4:0.4.2-1.mga6 + Revision: 925239 - libgdbm-devel new BR - 0.4.2 - P2 no needed any more - no sed for now * Fri Jun 26 2015 tv <tv> 4:0.3.5-2.mga6 + Revision: 844620 - rebuild for perl-5.22 * Thu Dec 25 2014 luigiwalser <luigiwalser> 4:0.3.5-1.mga5 + Revision: 805628 - 0.3.5 - restore c-icap in SVN (packages never removed from repository) + sander85 <sander85> - Unmaintained + unfixed security issues * Wed Oct 15 2014 umeabot <umeabot> 4:0.3.3-4.mga5 + Revision: 739337 - Second Mageia 5 Mass Rebuild * Thu Sep 18 2014 umeabot <umeabot> 4:0.3.3-3.mga5 + Revision: 693549 - Rebuild to fix library dependencies * Tue Sep 16 2014 umeabot <umeabot> 4:0.3.3-2.mga5 + Revision: 678270 - Mageia 5 Mass Rebuild + tv <tv> - s/uggests:/Recommends:/ * Fri May 16 2014 dlucio <dlucio> 4:0.3.3-1.mga5 + Revision: 623072 - 0.3.3 * Mon Oct 21 2013 umeabot <umeabot> 4:0.2.6-2.mga4 + Revision: 539296 - Mageia 4 Mass Rebuild * Sat Oct 05 2013 dlucio <dlucio> 4:0.2.6-1.mga4 + Revision: 491880 - 0.2.6 - file fix list * Sun Sep 29 2013 dlucio <dlucio> 4:0.2.5-7.mga4 + Revision: 488737 - systemd migration - S1 & S4 modified - some macros fixes * Sun Aug 11 2013 luigiwalser <luigiwalser> 4:0.2.5-6.mga4 + Revision: 465535 - fix pid file in init script (reported in mga#10772) * Thu Jul 25 2013 dlucio <dlucio> 4:0.2.5-5.mga4 + Revision: 458076 - fix #10772 * Sun Mar 24 2013 colin <colin> 4:0.2.5-4.mga3 + Revision: 404859 - Add systemd requires and general post/pre fixes (mga#9302) * Sun Jan 13 2013 luigiwalser <luigiwalser> 4:0.2.5-3.mga3 + Revision: 379839 - add tmpfiles config for /run/icapd * Fri Jan 11 2013 umeabot <umeabot> 4:0.2.5-2.mga3 + Revision: 347281 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Jan 04 2013 dlucio <dlucio> 4:0.2.5-1.mga3 + Revision: 338742 - 0.2.5 * Wed Jan 02 2013 dlucio <dlucio> 4:0.2.4-1.mga3 + Revision: 337637 - 0.2.4 - P5 merged upstream * Mon Dec 31 2012 wally <wally> 4:0.2.1-2.mga3 + Revision: 336538 - fix build with new automake 1.13 * Sun Sep 09 2012 dlucio <dlucio> 4:0.2.1-1.mga3 + Revision: 291217 - 0.2.1 - P0 rediffed * Tue Jul 31 2012 fwang <fwang> 4:0.1.7-4.mga3 + Revision: 276367 - rebuild for db-5.3 * Fri Jul 27 2012 fwang <fwang> 4:0.1.7-3.mga3 + Revision: 274856 - build with db5 * Tue Mar 27 2012 dlucio <dlucio> 4:0.1.7-3.mga2 + Revision: 227077 - bump release - we dont use dos2unix by now * Tue Oct 11 2011 dlucio <dlucio> 4:0.1.7-2.mga2 + Revision: 153949 - description fixed * Tue Oct 11 2011 dlucio <dlucio> 4:0.1.7-1.mga2 + Revision: 153934 - 0.1.7 - 0.1.6 some specs to keep compatibility between mandriva and mageia * Sun May 15 2011 pterjan <pterjan> 4:0.1.5-2.mga1 + Revision: 98972 - Rebuild for fixed find-requires * Tue Apr 19 2011 pterjan <pterjan> 4:0.1.5-1.mga1 + Revision: 88061 - Update to 0.1.5 * Thu Mar 03 2011 ennael <ennael> 4:0.1.4-1.mga1 + Revision: 63760 - clean spec file + dlucio <dlucio> - imported package c-icap