Author: glen Date: Sat Mar 5 20:14:39 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- add openldap-schema-samba package
---- Files affected:
SPECS:
samba.spec (1.265 -> 1.266)
---- Diffs:
================================================================
Index: SPECS/samba.spec
diff -u SPECS/samba.spec:1.265 SPECS/samba.spec:1.266
--- SPECS/samba.spec:1.265 Sat Feb 19 09:28:09 2005
+++ SPECS/samba.spec Sat Mar 5 21:14:33 2005
@@ -98,6 +98,7 @@
%if %{with cups}
%define cups_serverbin %{_libdir}/cups
%endif
+%define schemadir /usr/share/openldap/schema
%description
Samba provides an SMB server which can be used to provide network
@@ -857,6 +858,15 @@
dostępu do plików korzystając z oprogramowania antywirusowego Trend
(które musi być zainstalowane, aby wykorzystać ten moduł).
+%package -n openldap-schema-samba
+Summary: Samba LDAP schema
+Group: Networking/Daemons
+Requires(post,postun): sed >= 4.0
+Requires: openldap-servers
+
+%description -n openldap-schema-samba
+This package contains samba.schema for openldap.
+
%prep
%setup -q
%patch0 -p1
@@ -924,7 +934,7 @@
rm -rf $RPM_BUILD_ROOT
install -d
$RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,pam.d,security,sysconfig/rc-inetd}
\
$RPM_BUILD_ROOT/var/{lock,log,log/archiv,spool}/samba \
-
$RPM_BUILD_ROOT{/sbin,/%{_lib}/security,%{_libdir},%{_vfsdir},%{_includedir},%{_sambahome}}
+
$RPM_BUILD_ROOT{/sbin,/%{_lib}/security,%{_libdir},%{_vfsdir},%{_includedir},%{_sambahome},%{schemadir}}
cd source
%{__make} install \
@@ -992,6 +1002,8 @@
mv $RPM_BUILD_ROOT%{_bindir}/tdbtool $RPM_BUILD_ROOT%{_bindir}/tdbtool_samba
+install examples/LDAP/samba.schema $RPM_BUILD_ROOT%{schemadir}
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -1039,6 +1051,32 @@
/etc/rc.d/init.d/rc-inetd reload
fi
+%post -n openldap-schema-samba
+if ! grep -q %{schemadir}/samba.schema /etc/openldap/slapd.conf; then
+ sed -i -e '
+ /^include.*local.schema/{
+ i\
+include %{schemadir}/samba.schema
+ }' /etc/openldap/slapd.conf
+fi
+
+if [ -f /var/lock/subsys/ldap ]; then
+ /etc/rc.d/init.d/ldap restart >&2
+fi
+
+%postun -n openldap-schema-samba
+if [ "$1" = "0" ]; then
+ if grep -q %{schemadir}/samba.schema /etc/openldap/slapd.conf; then
+ sed -i -e '
+ /^include.*\/usr\/share\/openldap\/schema\/samba.schema/d
+ ' /etc/openldap/slapd.conf
+ fi
+
+ if [ -f /var/lock/subsys/ldap ]; then
+ /etc/rc.d/init.d/ldap restart >&2 || :
+ fi
+fi
+
%triggerpostun -- samba < 1.9.18p7
if [ "$1" != "0" ]; then
/sbin/chkconfig --add smb
@@ -1350,12 +1388,19 @@
%config(noreplace) %verify(not size mtime md5)
%{_sysconfdir}/samba/vscan-trend.conf
%attr(755,root,root) %{_vfsdir}/vscan-trend.so
+%files -n openldap-schema-samba
+%defattr(644,root,root,755)
+%{schemadir}/*.schema
+
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <[EMAIL PROTECTED]>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.266 2005/03/05 20:14:33 glen
+- add openldap-schema-samba package
+
Revision 1.265 2005/02/19 08:28:09 ankry
- rel. 2
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/samba.spec?r1=1.265&r2=1.266&f=u
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit