automatic version update by autodist [release 0.1.6-1mamba;Mon Jul 25 2011]

This commit is contained in:
Automatic Build System 2024-01-05 21:03:03 +01:00
parent e2a68b2f88
commit 06fd1e60e3
5 changed files with 289 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# c-icap # c-icap
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.

46
c-icap-0.1.5-conf.patch Normal file
View File

@ -0,0 +1,46 @@
diff -Nru c_icap-0.1.5.orig//c-icap.conf.in c_icap-0.1.5/c-icap.conf.in
--- c_icap-0.1.5.orig//c-icap.conf.in 2011-02-27 18:44:48.000000000 +0100
+++ c_icap-0.1.5/c-icap.conf.in 2011-04-27 12:49:00.615642808 +0200
@@ -119,6 +119,7 @@
# No value
# Example:
# User wwwrun
+User squid
# TAG: Group
# Format: Group groupname
@@ -129,6 +130,7 @@
# No value
# Example:
# Group nogroup
+Group squid
# TAG: ServerAdmin
# Format: ServerAdmin admin_mail
@@ -222,7 +224,7 @@
# It can be used more than once to use multiple magic files.
# Default:
# LoadMagicFile @prefix@/etc/c-icap.magic
-LoadMagicFile @prefix@/etc/c-icap.magic
+LoadMagicFile /etc/c-icap.magic
# TAG: RemoteProxyUsers
# Format: RemoteProxyUsers onoff
@@ -444,7 +446,7 @@
# information about the c-icap server.
# Default:
# ServerLog @prefix@/var/log/server.log
-ServerLog @prefix@/var/log/server.log
+ServerLog /var/log/c-icap/server.log
# TAG: AccessLog
# Format: AccessLog LogFile [LogFormat] [[!]acl1] [[!]acl2] [...]
@@ -459,7 +461,7 @@
# AccessLog @prefix@/var/log/access.log
# Example:
# AccessLog @prefix@/var/log/access.log MyFormat all
-AccessLog @prefix@/var/log/access.log
+AccessLog /var/log/c-icap/access.log
# TAG: Logger
# Format: Logger LoggerName

77
c-icap-initscript Normal file
View File

@ -0,0 +1,77 @@
#!/bin/sh
#
# chkconfig: 345 92 34
# description: Starts and stops the c-icap server
#
# pidfile: /var/run/c-icap/c-icap.pid
# config: /etc/c-icap.conf
# source function library
. /etc/sysconfig/rc
. $rc_functions
NAME=c-icap
DAEMON=/usr/bin/$NAME
DAEMONPID=/var/run/c-icap/$NAME.pid
DAEMONCONF=/etc/c-icap.conf
OPTIONS=""
[ -x $DAEMON ] || exit 0
# source networking configuration
. /etc/sysconfig/network
# check that networking is up
[ ${NETWORKING} = "no" ] && exit 0
# avoid using root's TMPDIR
unset TMPDIR
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
# check that smb.conf exists
[ -r $DAEMONCONF ] || exit 0
RETVAL=0
case "$1" in
start)
echo -n $"Starting $NAME: "
daemon --pidfile=$DAEMONPID $DAEMON $OPTIONS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$NAME
;;
stop)
echo -n $"Stopping $NAME: "
killproc -p $DAEMONPID $DAEMON
# Workaround: force stop of all processes
killall -9 $DAEMON
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$NAME $DAEMONPID
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
reload)
echo -n "Reloading $NAME: "
reloadproc $DAEMON
echo
;;
condrestart)
[ -e /var/lock/subsys/$NAME ] && $0 restart || :
;;
status)
statusproc $DAEMON
RETVAL=$?
;;
*)
echo $"Usage: ""/etc/init.d/$NAME {start|stop|status|reload|restart|condrestart}"
exit 1
;;
esac
exit $?

13
c-icap-logrotate Normal file
View File

@ -0,0 +1,13 @@
/var/log/c_icap/*.log {
compress
dateext
maxage 365
rotate 99
missingok
notifempty
size=+2096k
create 600 vscan root
postrotate
/etc/init.d/c-icap reload
endscript
}

151
c-icap.spec Normal file
View File

@ -0,0 +1,151 @@
Name: c-icap
Version: 0.1.6
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: http://downloads.sourceforge.net/project/c-icap/c-icap/0.1.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: libdb51-devel
BuildRequires: libopenldap-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
Requires(pre): squid
Requires: libicapapi = %{?epoch:%epoch:}%{version}-%{release}
Requires: logrotate
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%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 need for development.
%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
* 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