openldap.spec 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. ##
  2. ## openldap.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: openldap
  27. Summary: Lightweight Directory Access Protocol (LDAP) Toolkit
  28. URL: http://www.openldap.org/
  29. Vendor: OpenLDAP Project
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [REL]
  32. Group: Database
  33. License: GPL
  34. Version: 2.0.18
  35. Release: 20011201
  36. # list of sources
  37. Source0: ftp://ftp.openldap.org/pub/openldap/openldap-release/openldap-%{version}.tgz
  38. Source1: rc.openldap
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20011126.0, openssl, db
  43. PreReq: OpenPKG, openpkg >= 20011126.0
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. OpenLDAP is an open source implementation of the Lightweight
  48. Directory Access Protocol. The suite includes: slapd: stand-alone
  49. LDAP server; slurpd:- stand-alone LDAP replication server; libraries
  50. implementing the LDAP protocol, and utilities, tools, and sample
  51. clients.
  52. %prep
  53. %setup -q
  54. %build
  55. CC="%{l_cc}" \
  56. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  57. CPPFLAGS="-I%{l_prefix}/include" \
  58. LDFLAGS="-L%{l_prefix}/lib" \
  59. LIBS="-lpam" \
  60. ./configure \
  61. --prefix=%{l_prefix} \
  62. --localstatedir=%{l_prefix}/var/openldap \
  63. --enable-slurpd \
  64. --disable-shared
  65. %{l_make} %{l_mflags -O}
  66. %install
  67. rm -rf $RPM_BUILD_ROOT
  68. %{l_rpmtool} subst -v -s \
  69. "s;^\\(prefix[^=]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \
  70. -- `find . -name Makefile -print`
  71. %{l_make} %{l_mflags} install
  72. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/openldap/*.default
  73. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/openldap/*/*.default
  74. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/openldap
  75. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  76. %{l_shtool} install -c -m 755 -e "s;@l_prefix@;%{l_prefix};g" \
  77. %{SOURCE rc.openldap} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  78. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  79. %{l_files_std} \
  80. '%config %{l_prefix}/etc/openldap/ldap*'
  81. %files -f files
  82. %clean
  83. rm -rf $RPM_BUILD_ROOT