openldap.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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.19
  35. Release: 20011221
  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 >= 20011227, openssl, db, make
  43. PreReq: OpenPKG, openpkg >= 20011227
  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. "s;^\\(exec_prefix[^=]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \
  71. "s;^\\(localstatedir[^=]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix}/var/openldap;g" \
  72. -- `find . -name Makefile -print`
  73. %{l_make} %{l_mflags} install
  74. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/openldap/*.default
  75. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/openldap/*/*.default
  76. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/openldap
  77. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  78. %{l_shtool} install -c -m 755 -e "s;@l_prefix@;%{l_prefix};g" \
  79. %{SOURCE rc.openldap} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  80. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  81. %{l_files_std} \
  82. '%config %{l_prefix}/etc/openldap/ldap*'
  83. %files -f files
  84. %clean
  85. rm -rf $RPM_BUILD_ROOT