packages: c-icap/c-icap.spec - lib moved to separate package - added init s...
hawk
hawk at pld-linux.org
Mon Mar 21 11:03:19 CET 2011
Author: hawk Date: Mon Mar 21 10:03:19 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- lib moved to separate package
- added init script, sysconfig and logroate files
- attrs, %config(noreplace) and %verify(not md5 mtime size) for *.conf files
- added log directories and %ghost files
---- Files affected:
packages/c-icap:
c-icap.spec (1.3 -> 1.4)
---- Diffs:
================================================================
Index: packages/c-icap/c-icap.spec
diff -u packages/c-icap/c-icap.spec:1.3 packages/c-icap/c-icap.spec:1.4
--- packages/c-icap/c-icap.spec:1.3 Mon Mar 21 09:02:13 2011
+++ packages/c-icap/c-icap.spec Mon Mar 21 11:03:14 2011
@@ -1,8 +1,5 @@
# $Revision$, $Date$
#
-# TODO
-# - init script
-#
Summary: C implementation of an ICAP server
Name: c-icap
Version: 0.1.4
@@ -11,9 +8,13 @@
Group: Libraries
Source0: http://dl.sourceforge.net/c-icap/c_icap-%{version}.tar.gz
# Source0-md5: e1ce94fe7beaaa9318c3595694b10709
+Source1: %{name}.init
+Source2: %{name}.sysconfig
+Source3: %{name}.logrotate
Patch0: %{name}-ld.patch
Patch1: %{name}-align-64bit.patch
Patch2: %{name}-conf.patch
+Requires: %{name}-lib = %{version}-%{release}
URL: http://c-icap.sourceforge.net/
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -22,6 +23,17 @@
HTTP proxies that support the ICAP protocol to implement content
adaptation and filtering services.
+%package lib
+Summary: c-icap library
+Summary(pl.UTF-8): biblioteka c-icap
+Group: Development/Libraries
+
+%description lib
+c-icap library.
+
+%description lib -l pl.UTF-8
+Biblioteka c-icap.
+
%package devel
Summary: Header files for c-icap library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki c-icap
@@ -64,26 +76,57 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_datadir}/c_icap/templates
+install -d $RPM_BUILD_ROOT%{_datadir}/c_icap/templates \
+ $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
+ $RPM_BUILD_ROOT/var/log{,/archive}/c-icap
+touch $RPM_BUILD_ROOT/var/log/c-icap/{access.log,server.log}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/c-icap
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/c-icap
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/c-icap
+
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%pre
+%groupadd -g 262 c-icap
+%useradd -o -u 262 -s /bin/false -g c-icap -c "c-icap ICAP server daemon" -d /usr/share/empty c-icap
+
+%post
+/sbin/chkconfig --add c-icap
+%service c-icap restart
+
+%preun
+if [ "$1" = "0" ]; then
+ /sbin/chkconfig --del c-icap
+ %service c-icap stop
+fi
+
+%postun
+if [ "$1" = "0" ]; then
+ %userremove c-icap
+ %groupremove c-icap
+fi
+
+%post lib -p /sbin/ldconfig
+%postun lib -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
%doc README
+
+%dir %{_sysconfdir}/c-icap
+%attr(640,root,c-icap) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/c-icap/c-icap.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/c-icap
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/c-icap
+%{_sysconfdir}/c-icap/c-icap.magic
+%attr(754,root,root) /etc/rc.d/init.d/c-icap
%attr(755,root,root) %{_bindir}/c-icap
%attr(755,root,root) %{_bindir}/c-icap-client
%attr(755,root,root) %{_bindir}/c-icap-mkbdb
%attr(755,root,root) %{_bindir}/c-icap-stretch
-%{_sysconfdir}/c-icap
-%attr(755,root,root) %{_libdir}/libicapapi.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libicapapi.so.0
%attr(755,root,root) %{_libdir}/c_icap/bdb_tables.so
%attr(755,root,root) %{_libdir}/c_icap/dnsbl_tables.so
%attr(755,root,root) %{_libdir}/c_icap/ldap_module.so
@@ -96,7 +139,15 @@
%{_mandir}/man8/c-icap-mkbdb.8.gz
%{_mandir}/man8/c-icap-stretch.8.gz
%attr(755,root,root) %dir %{_datadir}/c_icap
-%attr(755,root,root) %dir /var/run/c-icap
+%attr(750,c-icap,c-icap) %dir /var/run/c-icap
+%attr(770,root,c-icap) %dir /var/log/archive/c-icap
+%attr(770,root,c-icap) %dir /var/log/c-icap
+%attr(770,root,c-icap) %ghost /var/log/c-icap/*
+
+%files lib
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libicapapi.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libicapapi.so.0
%files devel
%defattr(644,root,root,755)
@@ -115,6 +166,12 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.4 2011/03/21 10:03:14 hawk
+- lib moved to separate package
+- added init script, sysconfig and logroate files
+- attrs, %config(noreplace) and %verify(not md5 mtime size) for *.conf files
+- added log directories and %ghost files
+
Revision 1.3 2011/03/21 08:02:13 hawk
- keep config files in /etc/c-icap
- drop *.la for c-icap modules
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/c-icap/c-icap.spec?r1=1.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list