c-icap/c-icap.spec

185 lines
5.9 KiB
RPMSpec
Raw Normal View History

%define majver %(echo %version | cut -d. -f 1-2)
Name: c-icap
Version: 0.6.2
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: https://c-icap.sourceforge.net/
Source: https://sourceforge.net/projects/c-icap/files/c-icap/%{majver}.x/c_icap-%{version}.tar.gz
Source1: c-icap.service
Source2: c-icap.logrotate
Source3: c-icap.sysusers
Source4: c-icap.tmpfiles
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libatomic-devel
BuildRequires: libbrotli-devel
BuildRequires: libbzip2-devel
BuildRequires: libdb53-devel
BuildRequires: liblmdb-devel
BuildRequires: libopenldap-devel
BuildRequires: libopenssl-devel
BuildRequires: libpcre2-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 needed 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}
%build
%configure \
--sysconfdir=%{_sysconfdir}/c-icap \
--enable-ipv6
#make c-icap.conf
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/c-icap.service
install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/c-icap
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/c-icap.conf
install -D -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/c-icap.conf
install -d %{buildroot}/var/log/c-icap
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
%sysusers_create_package c-icap %{SOURCE3}
%tmpfiles_create_package c-icap %{SOURCE4}
:
%post
%systemd_post c-icap.service
:
%preun
%systemd_preun c-icap.service
:
%postun
%systemd_postun_with_restart c-icap.service
:
%post -n libicapapi -p /sbin/ldconfig
%postun -n libicapapi -p /sbin/ldconfig
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/c-icap
%config(noreplace) %{_sysconfdir}/c-icap/c-icap.conf
%{_sysconfdir}/c-icap/c-icap.conf.default
%config(noreplace) %{_sysconfdir}/c-icap/c-icap.magic
%{_sysconfdir}/c-icap/c-icap.magic.default
%config(noreplace) %{_sysconfdir}/logrotate.d/c-icap
%{_bindir}/c-icap
%{_bindir}/c-icap-client
%{_bindir}/c-icap-mkbdb
%{_bindir}/c-icap-mklmdb
%{_bindir}/c-icap-stretch
%{_unitdir}/c-icap.service
%{_sysusersdir}/c-icap.conf
%{_tmpfilesdir}/c-icap.conf
%{_mandir}/man8/c-icap-client.8*
%{_mandir}/man8/c-icap-mkbdb.8*
%{_mandir}/man8/c-icap-mklmdb.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
%files -n libicapapi-devel
%defattr(-,root,root)
%{_bindir}/c-icap-libicapapi-config
%dir %{_includedir}/c_icap
%{_includedir}/c_icap/*.h
%{_libdir}/libicapapi.so
%{_mandir}/man8/c-icap-libicapapi-config.8*
%doc README TODO
%changelog
* Fri Feb 02 2024 Automatic Build System <autodist@openmamba.org> 0.6.2-1mamba
- automatic version update by autodist
* Sat Apr 22 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 0.5.10-2mamba
- ported from sysv5 to systemd
* 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