openldap.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. ##
  2. ## openldap.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 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 [PLUS]
  32. Group: Database
  33. License: GPL
  34. Version: 2.1.4
  35. Release: 20020913
  36. # list of sources
  37. Source0: ftp://ftp.openldap.org/pub/openldap/openldap-release/openldap-%{version}.tgz
  38. Source1: rc.openldap
  39. Patch0: openldap.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20020206, sasl, openssl, db >= 4, make, gcc
  44. PreReq: OpenPKG, openpkg >= 20020206, sasl
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. OpenLDAP is an open source implementation of the Lightweight
  49. Directory Access Protocol. The suite includes: slapd: stand-alone
  50. LDAP server; slurpd:- stand-alone LDAP replication server; libraries
  51. implementing the LDAP protocol, and utilities, tools, and sample
  52. clients.
  53. %prep
  54. %setup -q
  55. %patch -p0
  56. %build
  57. CC="%{l_cc}" \
  58. CFLAGS="%{l_cflags -O}" \
  59. CPPFLAGS="-I%{l_prefix}/include" \
  60. LDFLAGS="-L%{l_prefix}/lib" \
  61. ./configure \
  62. --prefix=%{l_prefix} \
  63. --localstatedir=%{l_prefix}/var/openldap \
  64. --enable-ldbm \
  65. --with-ldbm-api=berkeley \
  66. --with-ldbm-module=static \
  67. --with-ldbm-type=btree \
  68. --enable-slurpd \
  69. --disable-shared
  70. %{l_make} %{l_mflags}
  71. %install
  72. rm -rf $RPM_BUILD_ROOT
  73. %{l_shtool} subst -v -s \
  74. -e "s;^\\(prefix[^=]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \
  75. -e "s;^\\(exec_prefix[^=]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \
  76. -e "s;^\\(localstatedir[^=]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix}/var/openldap;g" \
  77. `find . -name Makefile -print`
  78. %{l_make} %{l_mflags} install
  79. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/openldap/*.default
  80. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/openldap/*/*.default
  81. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/openldap
  82. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  83. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  84. %{SOURCE rc.openldap} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  85. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  86. %{l_files_std} \
  87. '%config %{l_prefix}/etc/openldap/ldap*'
  88. %files -f files
  89. %clean
  90. rm -rf $RPM_BUILD_ROOT