openldap.spec 3.3 KB

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