sasl.spec 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. ##
  2. ## sasl.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 options
  26. %ifndef with_fsl
  27. %define with_fsl no
  28. %endif
  29. %ifndef with_pam
  30. %define with_pam no
  31. %endif
  32. # package information
  33. Name: sasl
  34. Summary: Simple Authentication and Security Layer
  35. URL: http://asg.web.cmu.edu/sasl/
  36. Vendor: Cyrus Project, CMU
  37. Packager: The OpenPKG Project
  38. Distribution: OpenPKG [PLUS]
  39. Group: Cryptography
  40. License: BSD
  41. Version: 2.1.10
  42. Release: 20021209
  43. # list of sources
  44. Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-%{version}.tar.gz
  45. Source1: rc.sasl
  46. Source2: fsl.sasl
  47. # build information
  48. Prefix: %{l_prefix}
  49. BuildRoot: %{l_buildroot}
  50. BuildPreReq: OpenPKG, openpkg >= 20020206, db >= 4.1.24, openssl, gcc
  51. %if "%{with_fsl}" == "yes"
  52. BuildPreReq: fsl
  53. PreReq: fsl
  54. %endif
  55. PreReq: OpenPKG, openpkg >= 20020206
  56. AutoReq: no
  57. AutoReqProv: no
  58. %description
  59. SASL is the Simple Authentication and Security Layer, a method
  60. for adding authentication support to connection-based protocols.
  61. To use SASL, a protocol includes a command for identifying and
  62. authenticating a user to a server and for optionally negotiating
  63. protection of subsequent protocol interactions. If its use is
  64. negotiated, a security layer is inserted between the protocol and
  65. the connection.
  66. Options:
  67. --define 'with_fsl %{with_fsl}'
  68. --define 'with_pam %{with_pam}'
  69. %prep
  70. %setup -q -n cyrus-sasl-%{version}
  71. %{l_shtool} subst \
  72. -e 's;^ *for dbname in ;for dbname in db ;' \
  73. configure
  74. %build
  75. %{l_shtool} subst \
  76. -e "s;javac;javac-xxx;g" \
  77. -e "s;javah;javah-xxx;g" \
  78. -e "s;javadoc;javadoc-xxx;g" \
  79. configure
  80. CC="%{l_cc}" \
  81. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  82. %if "%{with_fsl}" == "yes"
  83. LDFLAGS="-L%{l_prefix}/lib `%{l_prefix}/bin/fsl-config --all --ldflags`" \
  84. LIBS="-ldb `%{l_prefix}/bin/fsl-config --all --libs`" \
  85. %else
  86. LDFLAGS="-L%{l_prefix}/lib" \
  87. LIBS="-ldb" \
  88. %endif
  89. ./configure \
  90. --prefix=%{l_prefix} \
  91. --with-plugindir=%{l_prefix}/lib/sasl \
  92. --with-saslauthd=%{l_prefix}/var/sasl/saslauthd \
  93. --with-dbpath=%{l_prefix}/var/sasl/sasldb \
  94. --with-dblib=berkeley \
  95. --with-bdb-incdir=%{l_prefix}/include \
  96. --with-bdb-libdir=%{l_prefix}/lib \
  97. %if "%{with_pam}" == "yes"
  98. --with-pam \
  99. %else
  100. --without-pam \
  101. %endif
  102. --disable-shared \
  103. --enable-static \
  104. --disable-java \
  105. --disable-sample \
  106. --disable-krb4 \
  107. --disable-gssapi \
  108. --disable-otp \
  109. --without-opie
  110. %{l_make} %{l_mflags}
  111. %install
  112. rm -rf $RPM_BUILD_ROOT
  113. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  114. %{l_shtool} mkdir -f -p -m 755 \
  115. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  116. %{l_shtool} install -c -m 755 \
  117. -e 's;@l_prefix@;%{l_prefix};g' \
  118. %if "%{with_pam}" == "yes"
  119. -e 's;@authmech@;pam;g' \
  120. %else
  121. -e 's;@authmech@;getpwent;g' \
  122. %endif
  123. %{SOURCE rc.sasl} \
  124. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  125. %if "%{with_fsl}" == "yes"
  126. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  127. %{l_shtool} install -c -m 644 \
  128. -e 's;@l_prefix@;%{l_prefix};g' \
  129. %{SOURCE fsl.sasl} \
  130. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  131. %endif
  132. %{l_shtool} mkdir -f -p -m 700 \
  133. $RPM_BUILD_ROOT%{l_prefix}/var/sasl/log
  134. %{l_shtool} mkdir -f -p -m 755 \
  135. $RPM_BUILD_ROOT%{l_prefix}/var/sasl/saslauthd
  136. mv $RPM_BUILD_ROOT%{l_prefix}/lib/sasl2 \
  137. $RPM_BUILD_ROOT%{l_prefix}/lib/sasl
  138. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
  139. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libsasl*.so* >/dev/null 2>&1 || true
  140. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  141. %if "%{with_fsl}" == "yes"
  142. '%config %{l_prefix}/etc/fsl/fsl.sasl' \
  143. '%not %dir %{l_prefix}/etc/fsl' \
  144. %endif
  145. '%dir %attr(-,%{l_susr},%{l_sgrp}) %{l_prefix}/var/sasl/log'
  146. %files -f files
  147. %clean
  148. rm -rf $RPM_BUILD_ROOT