openldap.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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.11
  35. Release: 20030104
  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 >= 20020206, sasl, openssl, db >= 4.1.24, make, gcc
  43. PreReq: OpenPKG, openpkg >= 20020206, sasl
  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}" \
  57. CPPFLAGS="%{l_cppflags sasl}" \
  58. LDFLAGS="%{l_ldflags}" \
  59. ./configure \
  60. --prefix=%{l_prefix} \
  61. --localstatedir=%{l_prefix}/var/openldap \
  62. --enable-ldbm \
  63. --with-ldbm-api=berkeley \
  64. --with-ldbm-module=static \
  65. --with-ldbm-type=btree \
  66. --enable-slurpd \
  67. --disable-shared
  68. %{l_make} %{l_mflags}
  69. %install
  70. rm -rf $RPM_BUILD_ROOT
  71. %{l_shtool} subst -v -s \
  72. -e "s;^\\(prefix[^=]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \
  73. -e "s;^\\(exec_prefix[^=]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix};g" \
  74. -e "s;^\\(localstatedir[^=]*=\\).*;\\1 $RPM_BUILD_ROOT%{l_prefix}/var/openldap;g" \
  75. `find . -name Makefile -print`
  76. %{l_make} %{l_mflags} install
  77. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/openldap/*.default
  78. rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/openldap/*/*.default
  79. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/openldap
  80. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  81. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  82. %{SOURCE rc.openldap} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  83. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  84. %{l_files_std} \
  85. '%config %{l_prefix}/etc/openldap/ldap*'
  86. %files -f files
  87. %clean
  88. rm -rf $RPM_BUILD_ROOT