openldap.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. ##
  2. ## openldap.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 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.21
  35. Release: 20030530
  36. # package options
  37. %option with_sasl no
  38. # list of sources
  39. Source0: ftp://ftp.openldap.org/pub/openldap/openldap-release/openldap-%{version}.tgz
  40. Source1: rc.openldap
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20020206, openssl, db >= 4.1.24, make, gcc
  45. PreReq: OpenPKG, openpkg >= 20020206
  46. %if "%{with_sasl}" == "yes"
  47. BuildPreReq: sasl
  48. PreReq: sasl
  49. %endif
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. OpenLDAP is an open source implementation of the Lightweight
  54. Directory Access Protocol. The suite includes: slapd: stand-alone
  55. LDAP server; slurpd:- stand-alone LDAP replication server; libraries
  56. implementing the LDAP protocol, and utilities, tools, and sample
  57. clients.
  58. %prep
  59. %setup -q
  60. %build
  61. %if "%{with_sasl}" == "yes"
  62. # hard-code configure to use SASL2 library
  63. %{l_shtool} subst \
  64. -e '4s/.*/ac_cv_lib_sasl2_sasl_client_init=yes/' \
  65. configure
  66. cf="%{l_cppflags sasl}"
  67. %else
  68. cf="%{l_cppflags}"
  69. %endif
  70. CC="%{l_cc}" \
  71. CFLAGS="%{l_cflags -O}" \
  72. CPPFLAGS="$cf" \
  73. LDFLAGS="%{l_ldflags}" \
  74. ./configure \
  75. --prefix=%{l_prefix} \
  76. --localstatedir=%{l_prefix}/var/openldap \
  77. --enable-ldbm \
  78. --with-ldbm-api=berkeley \
  79. --with-ldbm-module=static \
  80. --with-ldbm-type=btree \
  81. %if "%{with_sasl}" == "yes"
  82. --with-cyrus-sasl \
  83. --enable-spasswd \
  84. %else
  85. --without-cyrus-sasl \
  86. --disable-spasswd \
  87. %endif
  88. --enable-slurpd \
  89. --disable-shared
  90. %{l_make} %{l_mflags}
  91. %install
  92. rm -rf $RPM_BUILD_ROOT
  93. %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT"
  94. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/openldap/*.default
  95. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/openldap/*/*.default
  96. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/openldap
  97. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  98. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  99. -e 's;@l_susr@;%{l_susr};g' \
  100. %{SOURCE rc.openldap} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  101. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  102. %{l_files_std} \
  103. '%config %{l_prefix}/etc/openldap/*.conf'
  104. %files -f files
  105. %clean
  106. rm -rf $RPM_BUILD_ROOT