Search
j0ke.net Open Build Service
>
Projects
>
ha
:
firewall
>
c-icap
> c-icap.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File c-icap.spec of Package c-icap
%define cname c_icap Name: c-icap # List of additional build dependencies BuildRequires: gcc make patch clamav zlib-devel Version: 0.2.3 %define oversion 0.2.3 Release: 1 License: GPL v2 or later Source: %{cname}-%{version}.tar.bz2 Source1: %{cname}-%{oversion}-INSTALL.html Source3: %{name}.init Source4: %{name}.sysconfig Source5: %{name}.logrotate Source6: %{name}.init.rh Patch0: %{name}.conf.patch Group: Productivity/Networking/Security Summary: Is an implementation of an ICAP server Url: http://c-icap.sourceforge.net/ %if 0%{?suse_version} Requires: cron, logrotate, squid3, clamav %else Requires: vixie-cron, logrotate, squid >= 3.0, clamav %endif %if 0%{?suse_version} PreReq: coreutils, sed, grep, diffutils, %insserv_prereq, %fillup_prereq %else BuildRequires: coreutils, sed, grep, diffutils %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description c-icap is an implementation of an ICAP server. The implementation of c-icap was started from scratch. An alternative approach would be implementing a module for the ICAP protocol (e.g., as an HTTP module or an HTTP proxy module) on top of the Apache Web server. The latter approach would have the advantage of using server modules that are extremely stable as well as using other useful modules implemented on top of the Apache Web server, for example, SSL, MIME, loggers and filters. However, writing the server from scratch would result in a simple and more autonomous ICAP server. c-icap can be used with HTTP proxies that support the ICAP protocol. Most of the comercial HTTP proxies must support ICAP pcotocol. The open source Squid 3.0 proxy server supports the ICAP protocol too. Also you can use the Shweby proxy server, which operates very well with the ICAP protocol. c-icap supports request and response modification, "preview" functionality (preview of requests) and "204 No Content"(No modification needed) responses. It also supports the addition of services which are responsible for content modifications. Currently, services can be implemented only in C/C++. In the future, I am planning to implement Perl and Java service handlers which will allow services written in Perl or Java. c-icap allows the addition of modules, which can extend its functionality and services. For instance, such modules can be loggers, authenticators and authentication methods or access controlers. Currently, only two services exist: the echo service and an antivirus service based on ClamAV. Looking into the code of these services can help you understand how services are created in a c-icap server. c-icap is reasonably stable. Tests with several thousands of requests of echo and antivirus services were successfully passed. However, c-icap is still under development and is subject to changes. For example, function names and configuration parameters may be modified, include files will be merged, and several new features will be added. In other words, you should only use it for experimentation purposes. %debug_package %package devel License: GPL v2 or later Group: Development/Libraries/Other Summary: Development files for c-icap Requires: %{name} = %{version} Requires: zlib-devel Requires: glibc-devel %description devel Static libraries and header files for c-icap. %prep %setup -q -n %{cname}-%{version} %patch0 %build export CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} \ --bindir=%{_sbindir} \ --libexecdir=%{_libdir}/%{cname} \ --sysconfdir=%{_sysconfdir}/%{cname} \ --localstatedir=%{_localstatedir} \ --libdir=%{_libdir} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --docdir=%{_docdir}/%{cname} \ --enable-ipv6 \ --enable-largefiles \ --enable-sysvipc \ --enable-shared \ --enable-static make %install make DESTDIR=%buildroot install %__rm -rf %buildroot%{_localstatedir}/log %__rm -f %buildroot%{_sysconfdir}/%{cname}/*.default %__mkdir_p -m 0755 %buildroot%{_localstatedir}/log %__mkdir_p -m 0700 %buildroot%{_localstatedir}/log/%{name} %__mkdir_p -m 0755 %buildroot%{_localstatedir}/run %__mkdir_p -m 0700 %buildroot%{_localstatedir}/run/%{name} %__mkdir_p -m 0755 %buildroot%{_datadir}/%{cname}/templates %__mkdir_p -m 0755 %buildroot%{_localstatedir}/spool %__mkdir_p -m 0700 %buildroot%{_localstatedir}/spool/%{cname} %__mkdir_p -m 0700 %buildroot%{_localstatedir}/spool/%{cname}/tmp %__mkdir_p -m 0700 %buildroot%{_localstatedir}/spool/%{cname}/download %__mkdir_p -m 0755 %buildroot%{_sysconfdir}/init.d %__mkdir_p -m 0755 %buildroot%{_sysconfdir}/logrotate.d %__mkdir_p -m 0755 %buildroot%{_localstatedir}/adm/fillup-templates %__mkdir_p -m 0755 %buildroot%{_docdir}/%{cname} %__install -m 0644 %{_sourcedir}/%{cname}-%{oversion}-INSTALL.html %buildroot%{_docdir}/%{cname}/INSTALL.html %if 0%{?suse_version} %__install -m 0755 %{_sourcedir}/%{name}.init %buildroot%{_sysconfdir}/init.d/%{name} %else %__install -m 0755 %{_sourcedir}/%{name}.init.rh %buildroot%{_sysconfdir}/init.d/%{name} %endif %__install -m 0644 %{_sourcedir}/%{name}.sysconfig %buildroot%{_localstatedir}/adm/fillup-templates/sysconfig.%{name} %__install -m 0644 %{_sourcedir}/%{name}.logrotate %buildroot%{_sysconfdir}/logrotate.d/%{name} %__ln_s -f %{_sysconfdir}/init.d/c-icap %buildroot%{_sbindir}/rc%{name} %post %if 0%{?suse_version} %{fillup_and_insserv c-icap} %else /sbin/chkconfig --add c-icap || : %endif /sbin/ldconfig %preun if [ $1 == 0 ] ; then %if 0%{?suse_version} %stop_on_removal c-icap %else /sbin/service c-icap stop || : %endif fi %postun /sbin/ldconfig if [ $1 == 1 ] ; then %if 0%{?suse_version} %restart_on_update c-icap %else /sbin/service c-icap restart || : %endif elif [ $1 == 0 ] ; then %if 0%{?suse_version} %insserv_cleanup %else /sbin/chkconfig --del c-icap || : %endif fi %clean rm -rf %buildroot %files %defattr(-,root,root) %{_mandir}/man8/c-icap-client.8* %{_mandir}/man8/c-icap-mkbdb.8* %{_mandir}/man8/c-icap-stretch.8* %{_mandir}/man8/c-icap.8* %dir %{_sysconfdir}/%{cname} %dir %{_datadir}/%{cname} %dir %{_datadir}/%{cname}/templates %config(noreplace) %attr(0644, root, root) %{_sysconfdir}/%{cname}/c-icap.conf %config(noreplace) %attr(0644, root, root) %{_sysconfdir}/%{cname}/c-icap.magic %config %{_sysconfdir}/init.d/%{name} %config %{_sysconfdir}/logrotate.d/%{name} /var/adm/fillup-templates/sysconfig.%{name} %attr(0755, root, root) %{_libdir}/%{cname}/*.so %attr(0755, root, root) %{_libdir}/libicapapi.so.2.0.3 %attr(0755, root, root) %{_sbindir}/c-icap %attr(0755, root, root) %{_sbindir}/c-icap-client %attr(0755, root, root) %{_sbindir}/c-icap-stretch %{_sbindir}/rc%{name} %dir %{_libdir}/%{cname} %dir %attr(-, vscan, root) %{_localstatedir}/log/%{name} %dir %attr(-, vscan, root) %{_localstatedir}/run/%{name} %dir %attr(-, vscan, root) %{_localstatedir}/spool/%{cname} %dir %attr(-, vscan, root) %{_localstatedir}/spool/%{cname}/tmp %dir %attr(-, vscan, root) %{_localstatedir}/spool/%{cname}/download %dir %{_docdir}/%{cname} %doc %{_docdir}/%{cname}/* %files devel %defattr(-,root,root) %{_libdir}/libicapapi.so %{_libdir}/libicapapi.so.2 %{_sbindir}/c-icap-config %{_sbindir}/c-icap-libicapapi-config %attr(0644, root, root) %{_libdir}/%{cname}/*.la %attr(0644, root, root) %{_libdir}/libicapapi.la %{_libdir}/%{cname}/*.a %dir %{_includedir}/%{cname} %{_includedir}/%{cname}/*.h %{_mandir}/man8/c-icap-config.8* %{_mandir}/man8/c-icap-libicapapi-config.8* %changelog