c-icap/c-icap.spec

172 lines
5.3 KiB
RPMSpec
Raw Permalink Normal View History

%define majver %(echo %version | cut -d. -f 1-2)
Name: c-icap
Version: 0.5.10
Release: 1mamba
Summary: An implementation of an ICAP server that can be used with HTTP proxies like Squid
Group: System/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://c-icap.sourceforge.net
Source: https://sourceforge.net/projects/c-icap/files/c-icap/%{majver}.x/c_icap-%{version}.tar.gz
Source1: %{name}-initscript
Source2: %{name}-logrotate
Patch0: %{name}-0.1.5-conf.patch
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libbrotli-devel
BuildRequires: libbzip2-devel
BuildRequires: libdb53-devel
BuildRequires: libopenldap-devel
BuildRequires: libopenssl-devel
BuildRequires: libpcre-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
Requires(pre): squid
Requires: libicapapi = %{?epoch:%epoch:}%{version}-%{release}
Requires: logrotate
%description
c-icap is an implementation of an ICAP server. It can be used with HTTP proxies that support the ICAP protocol such as the Squid 3.x HTTP proxy server to implement content adaptation/filtering services.
%package devel
Summary: Development package for %{name}
Group: System/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: libicapapi-devel = %{?epoch:%epoch:}%{version}-%{release}
%description devel
c-icap is an implementation of an ICAP server. It can be used with HTTP proxies that support the ICAP protocol such as the Squid 3.x HTTP proxy server to implement content adaptation/filtering services.
This package contains static libraries and header files need for c-icap development.
%package -n libicapapi
Summary: Library used by %{name}
Group: System/Libraries
%description -n libicapapi
c-icap is an implementation of an ICAP server. It can be used with HTTP proxies that support the ICAP protocol such as the Squid 3.x HTTP proxy server to implement content adaptation/filtering services.
%package -n libicapapi-devel
Summary: Devel package for libicapapi
Group: Development/Libraries
Requires: libicapapi = %{?epoch:%epoch:}%{version}-%{release}
%description -n libicapapi-devel
c-icap is an implementation of an ICAP server. It can be used with HTTP proxies that support the ICAP protocol such as the Squid 3.x HTTP proxy server to implement content adaptation/filtering services.
This package contains static libraries and header files needed for development.
%debug_package
%prep
%setup -q -n c_icap-%{version}
#%patch0 -p1
%build
%configure
make c-icap.conf
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
install -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/c-icap
install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/c-icap
install -d %{buildroot}/var/log/c-icap
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
if [ $1 -eq 1 ]; then
#new install
chkconfig --add c-icap
fi
%preun
if [ $1 -eq 0 ]; then
#erase
%{_initrddir}/c-icap stop
chkconfig --del c-icap
fi
%postun
if [ $1 -eq 1 ]; then
#upgrade
%{_initrddir}/c-icap restart
fi
%post -n libicapapi -p /sbin/ldconfig
%postun -n libicapapi -p /sbin/ldconfig
%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/c-icap.conf
%{_sysconfdir}/c-icap.conf.default
%config(noreplace) %{_sysconfdir}/c-icap.magic
%{_sysconfdir}/c-icap.magic.default
%config(noreplace) %{_sysconfdir}/logrotate.d/c-icap
%{_initrddir}/c-icap
%{_bindir}/c-icap
%{_bindir}/c-icap-client
%{_bindir}/c-icap-mkbdb
%{_bindir}/c-icap-stretch
%attr(750,squid,squid) %dir /var/run/c-icap
%attr(750,squid,squid) %dir /var/log/c-icap
%{_mandir}/man8/c-icap-client.8*
%{_mandir}/man8/c-icap-mkbdb.8*
%{_mandir}/man8/c-icap-stretch.8*
%{_mandir}/man8/c-icap.8*
%files devel
%defattr(-,root,root)
%{_bindir}/c-icap-config
%{_mandir}/man8/c-icap-config.8*
%files -n libicapapi
%defattr(-,root,root)
%{_libdir}/libicapapi.so.*
%dir %{_libdir}/c_icap
%{_libdir}/c_icap/*
%doc AUTHORS COPYING README TODO
%files -n libicapapi-devel
%defattr(-,root,root)
%{_bindir}/c-icap-libicapapi-config
%dir %{_includedir}/c_icap
%{_includedir}/c_icap/*.h
%{_libdir}/libicapapi.so
%{_libdir}/libicapapi.la
%{_mandir}/man8/c-icap-libicapapi-config.8*
%changelog
* Sat Oct 23 2021 Automatic Build System <autodist@mambasoft.it> 0.5.10-1mamba
- automatic version update by autodist
* Mon Oct 04 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 0.5.9-1mamba
- update to 0.5.9
* Thu Mar 04 2021 Automatic Build System <autodist@mambasoft.it> 0.5.8-1mamba
- automatic version update by autodist
* Fri Feb 05 2021 Automatic Build System <autodist@mambasoft.it> 0.5.7-1mamba
- automatic version update by autodist
* Sun Mar 29 2020 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 0.5.6-1mamba
- update to 0.5.6
* Mon Jul 25 2011 Automatic Build System <autodist@mambasoft.it> 0.1.6-1mamba
- automatic version update by autodist
* Thu Apr 28 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.1.5-3mamba
- fixed default configuration file
* Wed Apr 27 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.1.5-2mamba
- recreate c-icap.conf from patched c-icap.conf.in
- configure for running with squid group and user
* Wed Apr 13 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.1.5-1mamba
- package created by autospec