stunnel.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. ##
  2. ## stunnel.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: stunnel
  27. Summary: SSL/TLS Tunneling Tool
  28. URL: http://www.stunnel.org/
  29. Vendor: Michal Trojnara
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [BASE]
  32. Group: Network
  33. License: GPL
  34. Version: 4.04
  35. Release: 20030708
  36. # package options
  37. %option with_fsl yes
  38. # list of sources
  39. Source0: http://www.stunnel.org/download/stunnel/src/stunnel-%{version}.tar.gz
  40. Source1: stunnel.pem
  41. Source2: rc.stunnel
  42. Source3: fsl.stunnel
  43. Patch0: http://www.stunnel.org/patches/patches/blinding-4.x_bri.patch
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20030415, gcc, make
  48. PreReq: OpenPKG, openpkg >= 20030415
  49. BuildPreReq: openssl
  50. PreReq: openssl
  51. %if "%{with_fsl}" == "yes"
  52. BuildPreReq: fsl
  53. PreReq: fsl
  54. %endif
  55. AutoReq: no
  56. AutoReqProv: no
  57. %description
  58. The Stunnel program is designed to work as SSL encryption wrapper
  59. between remote client and local (inetd-startable) or remote server.
  60. The concept is that having non-SSL aware daemons running on your
  61. system you can easily setup them to communicate with clients over
  62. secure SSL channel. Stunnel can be used to add SSL functionality
  63. to commonly used inetd daemons like POP-2, POP-3 and IMAP servers
  64. without any changes in the programs' code.
  65. %prep
  66. %setup -q
  67. %patch -p1
  68. %build
  69. CC="%{l_cc}" \
  70. CFLAGS="%{l_cflags -O}" \
  71. LDFLAGS="%{l_fsl_ldflags}" \
  72. LIBS="%{l_fsl_libs}" \
  73. ./configure \
  74. --prefix=%{l_prefix} \
  75. --with-ssl=%{l_prefix} \
  76. --disable-shared
  77. cp %{SOURCE stunnel.pem} tools/
  78. %{l_make} %{l_mflags}
  79. %install
  80. rm -rf $RPM_BUILD_ROOT
  81. %{l_shtool} mkdir -f -p -m 755 \
  82. $RPM_BUILD_ROOT%{l_prefix}/var/stunnel
  83. %{l_make} %{l_mflags} install prefix=$RPM_BUILD_ROOT%{l_prefix}
  84. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
  85. mv $RPM_BUILD_ROOT%{l_prefix}/etc/stunnel/stunnel.conf-sample \
  86. $RPM_BUILD_ROOT%{l_prefix}/etc/stunnel/stunnel.conf
  87. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
  88. # install run-command script
  89. %{l_shtool} mkdir -f -p -m 755 \
  90. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  91. %{l_shtool} install -c -m 755 \
  92. -e 's;@l_prefix@;%{l_prefix};g' \
  93. -e 's;@l_susr@;%{l_susr};g' \
  94. -e 's;@l_rusr@;%{l_rusr};g' \
  95. -e 's;@l_rgrp@;%{l_rgrp};g' \
  96. %{SOURCE rc.stunnel} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  97. # install OSSP fsl configuration
  98. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  99. %{l_shtool} install -c -m 644 \
  100. -e 's;@l_prefix@;%{l_prefix};g' \
  101. %{SOURCE fsl.stunnel} \
  102. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  103. # determine installation files
  104. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  105. %{l_files_std} \
  106. '%not %dir %{l_prefix}/etc/fsl' \
  107. '%config %{l_prefix}/etc/fsl/fsl.stunnel'
  108. %files -f files
  109. %clean
  110. rm -rf $RPM_BUILD_ROOT