1
0
forked from jengelh/openldap2

- Surpress gcc warnings about extra format string arguments.

- Split-off openldap2-doc (noarch) package (Admin Guide and IDs)

OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=54
This commit is contained in:
Ralf Haferkamp 2010-11-09 15:13:38 +00:00 committed by Git OBS Bridge
parent a30adec72d
commit f886e9d5b0
4 changed files with 122 additions and 28 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Nov 9 15:10:53 UTC 2010 - rhafer@novell.com
- Surpress gcc warnings about extra format string arguments.
- Split-off openldap2-doc (noarch) package (Admin Guide and IDs)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Oct 5 14:39:46 UTC 2010 - rhafer@novell.com Tue Oct 5 14:39:46 UTC 2010 - rhafer@novell.com

View File

@ -1,5 +1,5 @@
# #
# spec file for package openldap2-client (Version 2.4.23) # spec file for package openldap2 (Version 2.4.23)
# #
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
@ -19,7 +19,7 @@
%define run_test_suite 1 %define run_test_suite 1
Name: openldap2-client Name: openldap2-client
BuildRequires: cyrus-sasl-devel libopenssl-devel BuildRequires: cyrus-sasl-devel libopenssl-devel
%if %sles_version == 9 || %sles_version == 10 %if %sles_version == 9 || %sles_version == 10
BuildRequires: -libopenssl-devel -pwdutils openssl-devel BuildRequires: -libopenssl-devel -pwdutils openssl-devel
@ -33,16 +33,16 @@ BuildRequires: db-devel openslp-devel tcpd-devel unixODBC-devel
%if %sles_version == 9 || %sles_version == 10 %if %sles_version == 9 || %sles_version == 10
BuildRequires: -db-devel libdb-4_5-devel BuildRequires: -db-devel libdb-4_5-devel
%endif %endif
Group: Productivity/Networking/LDAP/Clients Group: Productivity/Networking/LDAP/Servers
Conflicts: openldap Conflicts: openldap
Requires: libldap-2_4-2 = %{version} Requires: libldap-2_4-2 = %{version}
PreReq: %insserv_prereq %fillup_prereq /usr/sbin/useradd /usr/sbin/groupadd /usr/bin/grep PreReq: %insserv_prereq %fillup_prereq /usr/sbin/useradd /usr/sbin/groupadd /usr/bin/grep
Summary: The OpenLDAP commandline client tools Summary: The OpenLDAP Server
%else %else
Group: Productivity/Networking/LDAP/Clients Group: Productivity/Networking/LDAP/Clients
Conflicts: openldap-client Conflicts: openldap-client
Requires: libldap-2_4-2 = %{version} Requires: libldap-2_4-2 = %{version}
Summary: The OpenLDAP commandline client tools Summary: The OpenLDAP commandline client tools
%endif %endif
AutoReqProv: on AutoReqProv: on
Source: openldap-%{version}.tar.bz2 Source: openldap-%{version}.tar.bz2
@ -79,7 +79,7 @@ Authors:
The OpenLDAP Project <project@openldap.org> The OpenLDAP Project <project@openldap.org>
%package -n openldap2-back-perl %package -n openldap2-back-perl
License: BSD3c(or similar) License: BSD3c(or similar) ; openldap 2.8
Summary: OpenLDAP Perl Back-End Summary: OpenLDAP Perl Back-End
Requires: openldap2 = %{version} perl = %{perl_version} Requires: openldap2 = %{version} perl = %{perl_version}
AutoReqProv: on AutoReqProv: on
@ -96,7 +96,7 @@ Authors:
The OpenLDAP Project <project@openldap.org> The OpenLDAP Project <project@openldap.org>
%package -n openldap2-back-meta %package -n openldap2-back-meta
License: BSD3c(or similar) License: BSD3c(or similar) ; openldap 2.8
Summary: OpenLDAP Meta Back-End Summary: OpenLDAP Meta Back-End
Requires: openldap2 = %{version} Requires: openldap2 = %{version}
AutoReqProv: on AutoReqProv: on
@ -116,7 +116,7 @@ Authors:
The OpenLDAP Project <project@openldap.org> The OpenLDAP Project <project@openldap.org>
%package -n openldap2-back-sql %package -n openldap2-back-sql
License: BSD3c(or similar) License: BSD3c(or similar) ; openldap 2.8
Summary: OpenLDAP SQL Back-End Summary: OpenLDAP SQL Back-End
Requires: openldap2 = %{version} Requires: openldap2 = %{version}
AutoReqProv: on AutoReqProv: on
@ -130,6 +130,26 @@ to do any programming.
Authors: Authors:
-------- --------
The OpenLDAP Project <project@openldap.org> The OpenLDAP Project <project@openldap.org>
%package -n openldap2-doc
License: BSD3c(or similar) ; openldap 2.8
Summary: OpenLDAP Documentation
Group: Documentation/Other
AutoReqProv: on
Provides: openldap2:/usr/share/doc/packages/openldap2/drafts/README
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%description -n openldap2-doc
The OpenLDAP Admin Guide plus a set of OpenLDAP related IETF internet drafts
Authors:
--------
The OpenLDAP Project <project@openldap.org>
%else %else
%description %description
@ -208,13 +228,12 @@ cd ../openldap-2.3.37
%{?suse_update_config:%{suse_update_config -f build}} %{?suse_update_config:%{suse_update_config -f build}}
libtoolize --force libtoolize --force
autoreconf autoreconf
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DLDAP_DEPRECATED -DLDAP_CONNECTIONLESS -DSLAP_CONFIG_DELETE" export CFLAGS="$RPM_OPT_FLAGS -Wno-format-extra-args -fno-strict-aliasing -DLDAP_DEPRECATED -DLDAP_CONNECTIONLESS -DSLAP_CONFIG_DELETE"
export STRIP="" export STRIP=""
%configure \ %configure \
--localstatedir=/var/run/slapd \ --localstatedir=/var/run/slapd \
--libexecdir=/usr/lib/openldap \ --libexecdir=/usr/lib/openldap \
--enable-wrappers \ --enable-wrappers \
--enable-aclgroups \
--enable-spasswd \ --enable-spasswd \
--enable-modules \ --enable-modules \
--enable-shared \ --enable-shared \
@ -305,6 +324,7 @@ chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap_r.so*
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap.so* chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap.so*
install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/sbin/schema2ldif install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/sbin/schema2ldif
%if "%{name}" == "openldap2" %if "%{name}" == "openldap2"
%define DOCDIR %{_defaultdocdir}/%{name}
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 sysconfig.openldap $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.openldap install -m 644 sysconfig.openldap $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.openldap
install -m 644 *.schema $RPM_BUILD_ROOT/etc/openldap/schema install -m 644 *.schema $RPM_BUILD_ROOT/etc/openldap/schema
@ -314,6 +334,13 @@ install -d $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/
install -m 644 SuSEfirewall2.openldap $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/openldap install -m 644 SuSEfirewall2.openldap $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/openldap
rm -f `find doc/guide ! -name *.html -a ! -name *.gif -a ! -name *.png -a ! -type d` rm -f `find doc/guide ! -name *.html -a ! -name *.gif -a ! -name *.png -a ! -type d`
rm -rf doc/guide/release rm -rf doc/guide/release
install -d $RPM_BUILD_ROOT/%{DOCDIR}/adminguide \
$RPM_BUILD_ROOT/%{DOCDIR}/images \
$RPM_BUILD_ROOT/%{DOCDIR}/drafts
install -m 644 doc/guide/admin/* $RPM_BUILD_ROOT/%{DOCDIR}/adminguide
install -m 644 doc/guide/images/*.gif $RPM_BUILD_ROOT/%{DOCDIR}/images
install -m 644 doc/drafts/* $RPM_BUILD_ROOT/%{DOCDIR}/drafts
install -m 644 ANNOUNCEMENT COPYRIGHT INSTALL LICENSE README CHANGES README.update $RPM_BUILD_ROOT/%{DOCDIR}
rm -f $RPM_BUILD_ROOT/etc/openldap/DB_CONFIG.example rm -f $RPM_BUILD_ROOT/etc/openldap/DB_CONFIG.example
rm -f $RPM_BUILD_ROOT/etc/openldap/schema/README rm -f $RPM_BUILD_ROOT/etc/openldap/schema/README
rm -f $RPM_BUILD_ROOT/var/run/slapd/openldap-data/DB_CONFIG.example rm -f $RPM_BUILD_ROOT/var/run/slapd/openldap-data/DB_CONFIG.example
@ -367,9 +394,13 @@ cat >openldap2.filelist <<EOF
%doc %{_mandir}/man5/slapd-monitor.* %doc %{_mandir}/man5/slapd-monitor.*
%doc %{_mandir}/man5/slapd-relay.* %doc %{_mandir}/man5/slapd-relay.*
%doc %{_mandir}/man5/slapo-* %doc %{_mandir}/man5/slapo-*
%doc ANNOUNCEMENT COPYRIGHT INSTALL LICENSE README CHANGES %doc %{DOCDIR}/ANNOUNCEMENT
%doc doc/drafts doc/guide %doc %{DOCDIR}/COPYRIGHT
%doc README.update %doc %{DOCDIR}/INSTALL
%doc %{DOCDIR}/LICENSE
%doc %{DOCDIR}/README
%doc %{DOCDIR}/CHANGES
%doc %{DOCDIR}/README.update
EOF EOF
%if %suse_version < 1130 %if %suse_version < 1130
cat >>openldap2.filelist <<EOF cat >>openldap2.filelist <<EOF
@ -429,11 +460,18 @@ cat > openldap2-back-sql.filelist <<EOF
%doc servers/slapd/back-sql/docs/bugs %doc servers/slapd/back-sql/docs/bugs
%doc servers/slapd/back-sql/docs/install %doc servers/slapd/back-sql/docs/install
EOF EOF
cat >openldap2-doc.filelist <<EOF
%doc %{DOCDIR}/drafts
%doc %{DOCDIR}/adminguide
%doc %{DOCDIR}/images
EOF
#remove files from other spec file #remove files from other spec file
%if "%{name}" == "openldap2" %if "%{name}" == "openldap2"
cat openldap2-client.filelist libldap.filelist openldap2-devel.filelist | cat openldap2-client.filelist libldap.filelist openldap2-devel.filelist |
%else %else
cat openldap2.filelist openldap2-back-perl.filelist openldap2-back-meta.filelist openldap2-back-sql.filelist | cat openldap2.filelist openldap2-back-perl.filelist \
openldap2-back-meta.filelist openldap2-back-sql.filelist \
openldap2-doc.filelist |
%endif %endif
grep -v "%dir " |sed -e "s|^.* ||" |grep "^/" |while read name ; do grep -v "%dir " |sed -e "s|^.* ||" |grep "^/" |while read name ; do
rm -rf $RPM_BUILD_ROOT$name rm -rf $RPM_BUILD_ROOT$name
@ -483,6 +521,9 @@ fi
%files -n openldap2-back-sql -f openldap2-back-sql.filelist %files -n openldap2-back-sql -f openldap2-back-sql.filelist
%defattr(-,root,root) %defattr(-,root,root)
%files -n openldap2-doc -f openldap2-doc.filelist
%defattr(-,root,root)
%else %else
%post -n libldap-2_4-2 -p /sbin/ldconfig %post -n libldap-2_4-2 -p /sbin/ldconfig

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Nov 9 15:10:53 UTC 2010 - rhafer@novell.com
- Surpress gcc warnings about extra format string arguments.
- Split-off openldap2-doc (noarch) package (Admin Guide and IDs)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Oct 5 14:39:46 UTC 2010 - rhafer@novell.com Tue Oct 5 14:39:46 UTC 2010 - rhafer@novell.com

View File

@ -33,16 +33,16 @@ BuildRequires: db-devel openslp-devel tcpd-devel unixODBC-devel
%if %sles_version == 9 || %sles_version == 10 %if %sles_version == 9 || %sles_version == 10
BuildRequires: -db-devel libdb-4_5-devel BuildRequires: -db-devel libdb-4_5-devel
%endif %endif
Group: Productivity/Networking/LDAP/Clients Group: Productivity/Networking/LDAP/Servers
Conflicts: openldap Conflicts: openldap
Requires: libldap-2_4-2 = %{version} Requires: libldap-2_4-2 = %{version}
PreReq: %insserv_prereq %fillup_prereq /usr/sbin/useradd /usr/sbin/groupadd /usr/bin/grep PreReq: %insserv_prereq %fillup_prereq /usr/sbin/useradd /usr/sbin/groupadd /usr/bin/grep
Summary: The OpenLDAP commandline client tools Summary: The OpenLDAP Server
%else %else
Group: Productivity/Networking/LDAP/Clients Group: Productivity/Networking/LDAP/Clients
Conflicts: openldap-client Conflicts: openldap-client
Requires: libldap-2_4-2 = %{version} Requires: libldap-2_4-2 = %{version}
Summary: The OpenLDAP commandline client tools Summary: The OpenLDAP commandline client tools
%endif %endif
AutoReqProv: on AutoReqProv: on
Source: openldap-%{version}.tar.bz2 Source: openldap-%{version}.tar.bz2
@ -79,7 +79,7 @@ Authors:
The OpenLDAP Project <project@openldap.org> The OpenLDAP Project <project@openldap.org>
%package -n openldap2-back-perl %package -n openldap2-back-perl
License: BSD3c(or similar) License: BSD3c(or similar) ; openldap 2.8
Summary: OpenLDAP Perl Back-End Summary: OpenLDAP Perl Back-End
Requires: openldap2 = %{version} perl = %{perl_version} Requires: openldap2 = %{version} perl = %{perl_version}
AutoReqProv: on AutoReqProv: on
@ -96,7 +96,7 @@ Authors:
The OpenLDAP Project <project@openldap.org> The OpenLDAP Project <project@openldap.org>
%package -n openldap2-back-meta %package -n openldap2-back-meta
License: BSD3c(or similar) License: BSD3c(or similar) ; openldap 2.8
Summary: OpenLDAP Meta Back-End Summary: OpenLDAP Meta Back-End
Requires: openldap2 = %{version} Requires: openldap2 = %{version}
AutoReqProv: on AutoReqProv: on
@ -116,7 +116,7 @@ Authors:
The OpenLDAP Project <project@openldap.org> The OpenLDAP Project <project@openldap.org>
%package -n openldap2-back-sql %package -n openldap2-back-sql
License: BSD3c(or similar) License: BSD3c(or similar) ; openldap 2.8
Summary: OpenLDAP SQL Back-End Summary: OpenLDAP SQL Back-End
Requires: openldap2 = %{version} Requires: openldap2 = %{version}
AutoReqProv: on AutoReqProv: on
@ -130,6 +130,26 @@ to do any programming.
Authors: Authors:
-------- --------
The OpenLDAP Project <project@openldap.org> The OpenLDAP Project <project@openldap.org>
%package -n openldap2-doc
License: BSD3c(or similar) ; openldap 2.8
Summary: OpenLDAP Documentation
Group: Documentation/Other
AutoReqProv: on
Provides: openldap2:/usr/share/doc/packages/openldap2/drafts/README
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%description -n openldap2-doc
The OpenLDAP Admin Guide plus a set of OpenLDAP related IETF internet drafts
Authors:
--------
The OpenLDAP Project <project@openldap.org>
%else %else
%description %description
@ -208,13 +228,12 @@ cd ../openldap-2.3.37
%{?suse_update_config:%{suse_update_config -f build}} %{?suse_update_config:%{suse_update_config -f build}}
libtoolize --force libtoolize --force
autoreconf autoreconf
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DLDAP_DEPRECATED -DLDAP_CONNECTIONLESS -DSLAP_CONFIG_DELETE" export CFLAGS="$RPM_OPT_FLAGS -Wno-format-extra-args -fno-strict-aliasing -DLDAP_DEPRECATED -DLDAP_CONNECTIONLESS -DSLAP_CONFIG_DELETE"
export STRIP="" export STRIP=""
%configure \ %configure \
--localstatedir=/var/run/slapd \ --localstatedir=/var/run/slapd \
--libexecdir=/usr/lib/openldap \ --libexecdir=/usr/lib/openldap \
--enable-wrappers \ --enable-wrappers \
--enable-aclgroups \
--enable-spasswd \ --enable-spasswd \
--enable-modules \ --enable-modules \
--enable-shared \ --enable-shared \
@ -305,6 +324,7 @@ chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap_r.so*
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap.so* chmod a+x $RPM_BUILD_ROOT/%{_libdir}/libldap.so*
install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/sbin/schema2ldif install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/sbin/schema2ldif
%if "%{name}" == "openldap2" %if "%{name}" == "openldap2"
%define DOCDIR %{_defaultdocdir}/%{name}
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 sysconfig.openldap $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.openldap install -m 644 sysconfig.openldap $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.openldap
install -m 644 *.schema $RPM_BUILD_ROOT/etc/openldap/schema install -m 644 *.schema $RPM_BUILD_ROOT/etc/openldap/schema
@ -314,6 +334,13 @@ install -d $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/
install -m 644 SuSEfirewall2.openldap $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/openldap install -m 644 SuSEfirewall2.openldap $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/openldap
rm -f `find doc/guide ! -name *.html -a ! -name *.gif -a ! -name *.png -a ! -type d` rm -f `find doc/guide ! -name *.html -a ! -name *.gif -a ! -name *.png -a ! -type d`
rm -rf doc/guide/release rm -rf doc/guide/release
install -d $RPM_BUILD_ROOT/%{DOCDIR}/adminguide \
$RPM_BUILD_ROOT/%{DOCDIR}/images \
$RPM_BUILD_ROOT/%{DOCDIR}/drafts
install -m 644 doc/guide/admin/* $RPM_BUILD_ROOT/%{DOCDIR}/adminguide
install -m 644 doc/guide/images/*.gif $RPM_BUILD_ROOT/%{DOCDIR}/images
install -m 644 doc/drafts/* $RPM_BUILD_ROOT/%{DOCDIR}/drafts
install -m 644 ANNOUNCEMENT COPYRIGHT INSTALL LICENSE README CHANGES README.update $RPM_BUILD_ROOT/%{DOCDIR}
rm -f $RPM_BUILD_ROOT/etc/openldap/DB_CONFIG.example rm -f $RPM_BUILD_ROOT/etc/openldap/DB_CONFIG.example
rm -f $RPM_BUILD_ROOT/etc/openldap/schema/README rm -f $RPM_BUILD_ROOT/etc/openldap/schema/README
rm -f $RPM_BUILD_ROOT/var/run/slapd/openldap-data/DB_CONFIG.example rm -f $RPM_BUILD_ROOT/var/run/slapd/openldap-data/DB_CONFIG.example
@ -367,9 +394,13 @@ cat >openldap2.filelist <<EOF
%doc %{_mandir}/man5/slapd-monitor.* %doc %{_mandir}/man5/slapd-monitor.*
%doc %{_mandir}/man5/slapd-relay.* %doc %{_mandir}/man5/slapd-relay.*
%doc %{_mandir}/man5/slapo-* %doc %{_mandir}/man5/slapo-*
%doc ANNOUNCEMENT COPYRIGHT INSTALL LICENSE README CHANGES %doc %{DOCDIR}/ANNOUNCEMENT
%doc doc/drafts doc/guide %doc %{DOCDIR}/COPYRIGHT
%doc README.update %doc %{DOCDIR}/INSTALL
%doc %{DOCDIR}/LICENSE
%doc %{DOCDIR}/README
%doc %{DOCDIR}/CHANGES
%doc %{DOCDIR}/README.update
EOF EOF
%if %suse_version < 1130 %if %suse_version < 1130
cat >>openldap2.filelist <<EOF cat >>openldap2.filelist <<EOF
@ -429,11 +460,18 @@ cat > openldap2-back-sql.filelist <<EOF
%doc servers/slapd/back-sql/docs/bugs %doc servers/slapd/back-sql/docs/bugs
%doc servers/slapd/back-sql/docs/install %doc servers/slapd/back-sql/docs/install
EOF EOF
cat >openldap2-doc.filelist <<EOF
%doc %{DOCDIR}/drafts
%doc %{DOCDIR}/adminguide
%doc %{DOCDIR}/images
EOF
#remove files from other spec file #remove files from other spec file
%if "%{name}" == "openldap2" %if "%{name}" == "openldap2"
cat openldap2-client.filelist libldap.filelist openldap2-devel.filelist | cat openldap2-client.filelist libldap.filelist openldap2-devel.filelist |
%else %else
cat openldap2.filelist openldap2-back-perl.filelist openldap2-back-meta.filelist openldap2-back-sql.filelist | cat openldap2.filelist openldap2-back-perl.filelist \
openldap2-back-meta.filelist openldap2-back-sql.filelist \
openldap2-doc.filelist |
%endif %endif
grep -v "%dir " |sed -e "s|^.* ||" |grep "^/" |while read name ; do grep -v "%dir " |sed -e "s|^.* ||" |grep "^/" |while read name ; do
rm -rf $RPM_BUILD_ROOT$name rm -rf $RPM_BUILD_ROOT$name
@ -483,6 +521,9 @@ fi
%files -n openldap2-back-sql -f openldap2-back-sql.filelist %files -n openldap2-back-sql -f openldap2-back-sql.filelist
%defattr(-,root,root) %defattr(-,root,root)
%files -n openldap2-doc -f openldap2-doc.filelist
%defattr(-,root,root)
%else %else
%post -n libldap-2_4-2 -p /sbin/ldconfig %post -n libldap-2_4-2 -p /sbin/ldconfig