Add docs, scripts and conffiles

This commit is contained in:
Alexey Ivanov 2015-03-19 13:43:45 +00:00
parent 3d18ac1323
commit c1b73187e3

View file

@ -8,7 +8,7 @@
Name: dhcp Name: dhcp
Epoch: 3 Epoch: 3
Version: %{major_version}%{patch_version} Version: %{major_version}%{patch_version}
Release: 3 Release: 4
Summary: The ISC DHCP (Dynamic Host Configuration Protocol) server/relay agent/client Summary: The ISC DHCP (Dynamic Host Configuration Protocol) server/relay agent/client
License: Distributable License: Distributable
Group: System/Servers Group: System/Servers
@ -270,7 +270,24 @@ rm -f %{buildroot}%{_libdir}/*.a
# Prepare schema files to be included into OpenLDAP configuration # Prepare schema files to be included into OpenLDAP configuration
mkdir -p %{buildroot}%{schema_dir} mkdir -p %{buildroot}%{schema_dir}
mkdir -p %{buildroot}%{_sysconfdir}/openldap/{schema,slapd.d}
install -m 0644 contrib/ldap/dhcp.schema %{buildroot}%{schema_dir} install -m 0644 contrib/ldap/dhcp.schema %{buildroot}%{schema_dir}
install -m 0644 contrib/ldap/dhcpd-conf-to-ldap %{buildroot}%{schema_dir}
install -m 0644 contrib/ldap/dhcp.schema %{buildroot}%{_sysconfdir}/openldap/schema/
install -m 0644 contrib/ldap/README.ldap %{buildroot}%{_sysconfdir}/openldap/schema/README.%{name}
cat > %{buildroot}%{_sysconfdir}/openldap/slapd.d/%{name}.conf <<EOF
# If interested in storing DHCP leases in your instance of OpenLDAP,
# load this file or copy uncommented lines below to your slapd.conf.
#
# For details see:
# %{_sysconfdir}/openldap/schema/README.%{name}
#
# You may also find this script useful:
# %{schema_dir}/dhcpd-conf-to-ldap
include %{_sysconfdir}/openldap/schema/dhcp.schema
EOF
%pre server %pre server
%_pre_useradd dhcpd /dev/null /bin/false %_pre_useradd dhcpd /dev/null /bin/false
@ -355,6 +372,7 @@ rm -rf %{_var}/lib/dhclient/dhclient.leases
%exclude %{_mandir}/man3/omapi.3* %exclude %{_mandir}/man3/omapi.3*
%files -n openldap-schemas-%{name} %files -n openldap-schemas-%{name}
%config(noreplace) %{schema_dir}/*.schema %{schema_dir}/*.schema
#config(noreplace) #{schema_dir}/*.ldif %{schema_dir}/dhcpd-conf-to-ldap
%config(noreplace) %{_sysconfdir}/openldap/schema/*
%config(noreplace) %{_sysconfdir}/openldap/slapd.d/%{name}.conf