]> git.pld-linux.org Git - packages/bind.git/commitdiff
- rel 2 auto/th/bind-9_6_1_P1-2 auto/ti/bind-9_6_1_P1-2
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 24 Aug 2009 13:22:20 +0000 (13:22 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- cleaned up openldap-schema-bind package

Changed files:
    bind.spec -> 1.292

bind.spec

index b54085d3a6f99476caf558fae90c37cc1e81e2cd..7dd1eb8a7eed017fba61421392ca5cec458c4451 100644 (file)
--- a/bind.spec
+++ b/bind.spec
@@ -1,5 +1,4 @@
 # TODO
-# - schema regstering in openldap-schema-bind
 # - apply http://www.caraytech.com/geodns/
 #
 # Conditional build:
@@ -26,7 +25,7 @@ Summary(zh_CN.UTF-8): Internet 域名服务器
 %define        plev    P1
 Name:          bind
 Version:       %{ver}.%{plev}
-Release:       1
+Release:       2
 Epoch:         7
 License:       BSD-like
 Group:         Networking/Daemons
@@ -84,6 +83,8 @@ Conflicts:    %{name}-chroot
 Conflicts:     kernel < 2.2.18
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                schemadir       /usr/share/openldap/schema
+
 %description
 BIND (Berkeley Internet Name Domain) is an implementation of the DNS
 (Domain Name System) protocols. BIND includes a DNS server (named),
@@ -323,8 +324,9 @@ BIND.
 Summary:       BIND schema for openldap
 Summary(pl.UTF-8):     Schemat BIND dla openldap
 Group:         Development/Libraries
-Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires(post,postun): sed >= 4.0
 Requires:      openldap-servers
+Requires:      sed >= 4.0
 
 %description -n openldap-schema-bind
 BIND schema for openldap.
@@ -399,8 +401,11 @@ ln -sf %{_var}/lib/named/named.stats       $RPM_BUILD_ROOT%{_var}/log/named.stats
 
 touch $RPM_BUILD_ROOT%{_var}/lib/named/named.{log,stats}
 
-%{?with_ldap:install -d $RPM_BUILD_ROOT%{_datadir}/openldap/schema}
-%{?with_ldap:install %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/openldap/schema/dnszone.schema}
+%if %{with ldap}
+install -d $RPM_BUILD_ROOT%{schemadir}
+install %{SOURCE5} $RPM_BUILD_ROOT%{schemadir}/dnszone.schema
+%endif
+
 %{?with_hip:install bind-hip/hi2dns $RPM_BUILD_ROOT%{_bindir}}
 
 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/named-compilezone.8
@@ -446,6 +451,16 @@ fi
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
+%post -n openldap-schema-bind
+%openldap_schema_register %{schemadir}/dnszone.schema
+%service -q ldap restart
+
+%postun -n openldap-schema-bind
+if [ "$1" = "0" ]; then
+       %openldap_schema_unregister %{schemadir}/dnszone.schema
+       %service -q ldap restart
+fi
+
 %triggerpostun -- %{name} < 7:9.4.2-2
 /sbin/chkconfig named reset
 #triggerpostun -- %{name} < 6:9.4.1
This page took 0.049374 seconds and 4 git commands to generate.