sasl.spec 5.1 KB

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