%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
+%define schemadir /usr/share/openldap/schema
%description
mod_cfg_ldap allows you to keep your virtual host configuration in a
mod_cfg_ldap pozwala na przechowywanie konfiguracji hostów wirtualnych
w katalogu LDAP i uaktualnianie jej prawie w czasie rzeczywistym.
+%package -n openldap-schema-mod_cfg_ldap
+Summary: Amavisd-new LDAP schema
+Summary(pl.UTF-8): Schemat LDAP dla amavisd-new
+Group: Networking/Daemons
+Requires: openldap-servers
+
+%description -n openldap-schema-mod_cfg_ldap
+This package contains LDAP schema for use with mod_cfg_ldap.
+
+%description -n openldap-schema-mod_cfg_ldap -l pl.UTF-8
+Ten pakiet zawiera schemat LDAP do używania z mod_cfg_ldap.
+
%prep
%setup -q -n mod_%{mod_name}-%{version}
%patch0 -p1
install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
install cfg_ldap.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/85_mod_cfg_ldap.conf
+install -D mod_cfg_ldap.schema $RPM_BUILD_ROOT%{schemadir}/mod_cfg_ldap.schema
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog INSTALL README TODO *.schema
+%doc AUTHORS ChangeLog INSTALL README TODO
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
%attr(755,root,root) %{_pkglibdir}/*.so
+
+%files -n openldap-schema-mod_cfg_ldap
+%defattr(644,root,root,755)
+%{schemadir}/*.schema