c-icap/c-icap.spec

244 lines
6.9 KiB
RPMSpec
Raw Normal View History

2018-02-19 15:50:53 +01:00
Summary: An implementation of an ICAP server
Name: c-icap
Version: 0.5.3
Release: 0.beta5%{?dist}
2018-02-19 15:50:53 +01:00
License: LGPL
2018-02-18 19:03:10 +01:00
2018-02-19 15:50:53 +01:00
Source0: http://sourceforge.net/projects/c-icap/files/c-icap/0.5.x/c_icap-%{version}.tar.gz
Source1: %{name}.service
Source2: %{name}.logrotate
Source4: tmpfiles.conf
2018-02-18 19:03:10 +01:00
2018-02-19 15:50:53 +01:00
URL: http://%{name}.sourceforge.net/
2018-02-18 19:03:10 +01:00
2018-02-19 15:50:53 +01:00
Requires: %{name}-libs = %{version}-%{release}
2018-02-18 19:03:10 +01:00
2018-02-19 15:50:53 +01:00
BuildRequires: db4-devel
BuildRequires: gdbm-devel
BuildRequires: openldap-devel
BuildRequires: zlib-devel perl-devel
2018-02-18 19:03:10 +01:00
%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 too.
2018-02-19 15:50:53 +01:00
%package devel
Summary: Development tools for %{name}
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
Requires: zlib-devel
2018-02-18 19:03:10 +01:00
2018-02-19 15:50:53 +01:00
%description devel
2018-02-18 19:03:10 +01:00
The %{name}-devel package contains the static libraries and header files
for developing software using %{name}.
2018-02-19 15:50:53 +01:00
%package ldap
Summary: The LDAP module for %{name}
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
2018-02-18 19:03:10 +01:00
2018-02-19 15:50:53 +01:00
%description ldap
2018-02-18 19:03:10 +01:00
The %{name}-ldap package contains the LDAP module for %{name}.
2018-02-19 15:50:53 +01:00
%package libs
Summary: Libraries used by %{name}
Group: System Environment/Libraries
2018-02-18 19:03:10 +01:00
2018-02-19 15:50:53 +01:00
%description libs
2018-02-18 19:03:10 +01:00
The %{name}-libs package contains all runtime libraries used by %{name} and
the utilities.
2018-02-19 15:50:53 +01:00
%package perl
Summary: The Perl handler for %{name}
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
2018-02-18 19:03:10 +01:00
2018-02-19 15:50:53 +01:00
%description perl
2018-02-18 19:03:10 +01:00
The %{name}-perl package contains the Perl handler for %{name}.
2018-02-19 15:50:53 +01:00
%package progs
Summary: Related programs for %{name}
Group: Applications/Internet
Requires: %{name}-libs = %{version}-%{release}
2018-02-18 19:03:10 +01:00
2018-02-19 15:50:53 +01:00
%description progs
2018-02-18 19:03:10 +01:00
The %{name}-progs package contains several commandline tools for %{name}.
%prep
2018-02-19 15:50:53 +01:00
%setup -q -n c_icap-%{version}
2018-02-18 19:03:10 +01:00
%build
%configure \
CFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing" \
2018-02-19 15:50:53 +01:00
--disable-static \
2018-02-18 19:03:10 +01:00
--sysconfdir=%{_sysconfdir}/%{name} \
2018-02-18 20:12:37 +01:00
--prefix='' \
2018-02-18 19:03:10 +01:00
--with-perl \
--with-zlib \
--with-bdb \
--with-ldap \
2018-02-18 19:23:14 +01:00
--enable-large-files
2018-02-18 19:03:10 +01:00
%{__make} %{?_smp_mflags}
%install
[ -n "%{buildroot}" -a "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
2018-02-18 20:16:08 +01:00
%{__mkdir_p} %{buildroot}%{_sysconfdir}/logrotate.d
2018-02-18 19:03:10 +01:00
%{__mkdir_p} %{buildroot}%{_sbindir}
2018-02-19 15:50:53 +01:00
%{__mkdir_p} %{buildroot}%{_datadir}/c_icap/{contrib,templates}
2018-02-18 19:03:10 +01:00
%{__mkdir_p} %{buildroot}%{_localstatedir}/log/%{name}
2018-02-18 19:23:14 +01:00
%{__make} DESTDIR=%{buildroot} install
%{__mv} -f %{buildroot}%{_bindir}/%{name} %{buildroot}%{_sbindir}
2018-02-18 20:16:08 +01:00
%{__install} -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
2018-02-18 19:03:10 +01:00
%{__install} -D -p -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
%{__install} -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/c-icap.service
2018-02-19 15:50:53 +01:00
%{__install} -m 0755 contrib/*.pl %{buildroot}%{_datadir}/c_icap/contrib
2018-02-18 19:23:14 +01:00
%{__rm} -f %{buildroot}%{_libdir}/lib*.so.{?,??}
2018-02-18 19:03:10 +01:00
%pre
if ! getent group %{name} >/dev/null 2>&1; then
/usr/sbin/groupadd -r %{name}
fi
if ! getent passwd %{name} >/dev/null 2>&1; then
/usr/sbin/useradd -r -g %{name} \
-d %{_localstatedir}/run/%{name} \
-c "C-ICAP Service user" -M \
-s /sbin/nologin %{name}
fi
exit 0 # Always pass
%post
%systemd_post c-icap.service
%post libs -p /sbin/ldconfig
%preun
%systemd_preun c-icap.service
%postun
%systemd_postun_with_restart c-icap.service
%postun libs -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS COPYING INSTALL README TODO
%attr(750,root,%{name}) %dir %{_sysconfdir}/%{name}
%attr(640,root,%{name}) %config(noreplace) %{_sysconfdir}/%{name}/*.conf
%attr(640,root,%{name}) %config(noreplace) %{_sysconfdir}/%{name}/*.magic
%attr(640,root,%{name}) %{_sysconfdir}/%{name}/*.default
2018-02-18 20:16:08 +01:00
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
2018-02-18 19:03:10 +01:00
%{_unitdir}/c-icap.service
2018-02-19 15:50:53 +01:00
%dir %{_libdir}/c_icap
%{_libdir}/c_icap/bdb_tables.so
%{_libdir}/c_icap/dnsbl_tables.so
%{_libdir}/c_icap/srv_echo.so
%{_libdir}/c_icap/sys_logger.so
%{_libdir}/c_icap/shared_cache.so
2018-02-18 19:03:10 +01:00
%{_sbindir}/%{name}
2018-02-19 15:50:53 +01:00
%{_datadir}/c_icap
2018-02-18 19:03:10 +01:00
%{_mandir}/man8/%{name}.8*
%attr(750,%{name},%{name}) %dir %{_localstatedir}/log/%{name}
%attr(750,%{name},%{name}) %dir %{_localstatedir}/run/%{name}
%{_tmpfilesdir}/c-icap.conf
%files devel
%defattr(-,root,root)
%{_bindir}/%{name}-*config
2018-02-19 15:50:53 +01:00
%{_includedir}/c_icap
2018-02-18 19:03:10 +01:00
%{_libdir}/libicapapi.*a
%{_libdir}/libicapapi.so
2018-02-19 15:50:53 +01:00
%{_libdir}/c_icap/bdb_tables.*a
%{_libdir}/c_icap/dnsbl_tables.*a
%{_libdir}/c_icap/ldap_module.*a
%{_libdir}/c_icap/perl_handler.*a
%{_libdir}/c_icap/srv_echo.*a
%{_libdir}/c_icap/sys_logger.*a
%{_libdir}/c_icap/srv_ex206.*a
%{_libdir}/c_icap/shared_cache.*a
2018-02-18 19:03:10 +01:00
%{_mandir}/man8/%{name}-*config.8*
%files ldap
%defattr(-,root,root)
2018-02-19 15:50:53 +01:00
%{_libdir}/c_icap/ldap_module.so
2018-02-18 19:03:10 +01:00
%files libs
%defattr(-,root,root)
%doc COPYING
%{_libdir}/libicapapi.so.*
2018-02-19 15:50:53 +01:00
%{_libdir}/c_icap/srv_ex206.so
2018-02-18 19:03:10 +01:00
%files perl
%defattr(-,root,root)
2018-02-19 15:50:53 +01:00
%{_libdir}/c_icap/perl_handler.so
2018-02-18 19:03:10 +01:00
%files progs
%defattr(-,root,root)
%{_bindir}/%{name}-client
%{_bindir}/%{name}-mkbdb
%{_bindir}/%{name}-stretch
%{_mandir}/man8/%{name}-client.8*
%{_mandir}/man8/%{name}-mkbdb.8*
%{_mandir}/man8/%{name}-stretch.8*
%changelog
* Mon Feb 19 2018 Daniel Berteaud <daniel@firewall-services.com> 0.5.3-0.beta5
-
* Mon Feb 19 2018 Daniel Berteaud <daniel@firewall-services.com> 0.5.3-1.beta4
- Remove debug statements in service unit (daniel@firewall-services.com)
* Sun Feb 18 2018 Daniel Berteaud <daniel@firewall-services.com> 0.5.3-1
- Stable release
2018-02-19 15:50:53 +01:00
- Clean spec file
- Use syslog for daemon logging
2018-02-18 19:03:10 +01:00
- Update to 0.5.3
* Wed Sep 27 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 0.5.2
- Rebuild for 0.5.2 on el7
* Thu May 21 2015 Davide Principi <davide.principi@nethesis.it> - 0.4.2-1
- Rebuild for 0.4.2 on el7
* Thu May 21 2015 Davide Principi <davide.principi@nethesis.it> - 0.3.5-1
- Rebuild for 0.3.5 on ns7
* Thu May 30 2013 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 0.2.5
- Enable large files support
- New version 0.2.5
* Fri Oct 21 2011 Peter Pramberger <peterpramb@member.fsf.org> - 0.1.7-1
- New version (0.1.7)
* Mon Jun 06 2011 Peter Pramberger <peterpramb@member.fsf.org> - 0.1.6-1
- New version (0.1.6)
* Mon Apr 04 2011 Peter Pramberger <peterpramb@member.fsf.org> - 0.1.5-1
- New version (0.1.5)
* Mon Jan 17 2011 Peter Pramberger <peterpramb@member.fsf.org> - 0.1.4-1
- New version (0.1.4)
* Tue Nov 02 2010 Peter Pramberger <peterpramb@member.fsf.org> - 0.1.3-1
- New version (0.1.3)
* Fri Oct 15 2010 Peter Pramberger <peterpramb@member.fsf.org> - 0.1.2-1
- New version (0.1.2)
* Mon Jul 05 2010 Peter Pramberger <peterpramb@member.fsf.org> - 0.1.1-1
- New version (0.1.1)
* Wed Jun 02 2010 Peter Pramberger <peterpramb@member.fsf.org> - 0.1.1-0.1.pre3
- Initial build