whoson.spec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. ##
  2. ## whoson.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: whoson
  27. Summary: WHOSON daemon for POP before SMTP
  28. URL: http://whoson.sourceforge.net/
  29. Vendor: Eugene Crosser
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EVAL]
  32. Group: Mail
  33. License: GPL
  34. Version: 2.02a
  35. Release: 20030708
  36. # package options
  37. %option with_fsl yes
  38. %option with_perl no
  39. # list of sources
  40. Source0: http://osdn.dl.sourceforge.net/sourceforge/whoson/whoson-%{version}.tar.gz
  41. Source1: rc.whoson
  42. Source2: fsl.whoson
  43. Patch0: whoson.patch
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20030415
  48. PreReq: OpenPKG, openpkg >= 20030415
  49. %if "%{with_fsl}" == "yes"
  50. BuildPreReq: fsl
  51. PreReq: fsl
  52. %endif
  53. %if "%{with_perl}" == "yes"
  54. BuildPreReq: perl, perl-openpkg
  55. PreReq: perl, perl-openpkg
  56. %endif
  57. AutoReq: no
  58. AutoReqProv: no
  59. %description
  60. Whoson (WHO iS ONline) is a proposed Internet protocol that
  61. allows Internet server programs know if a particular (dynamically
  62. allocated) IP address is currently allocated to a known (trusted)
  63. user and, optionally, the identity of the said user.
  64. %prep
  65. %setup -q
  66. %patch -p0
  67. %build
  68. %{l_shtool} subst \
  69. -e 's;@l_prefix@;%{l_prefix};g' \
  70. -e 's;@l_rusr@;%{l_rusr};g' \
  71. -e 's;@l_rgrp@;%{l_rgrp};g' \
  72. whoson.conf
  73. CC="%{l_cc}" \
  74. CFLAGS="%{l_cflags -O}" \
  75. CPPFLAGS="%{l_cppflags}" \
  76. LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
  77. LIBS="%{l_fsl_libs}" \
  78. ./configure \
  79. --prefix="%{l_prefix}" \
  80. --with-config="%{l_prefix}/etc/whoson/whoson.conf" \
  81. --enable-static \
  82. --disable-shared
  83. %{l_make} %{l_mflags -O}
  84. %install
  85. rm -rf $RPM_BUILD_ROOT
  86. %if "%{with_perl}" == "yes"
  87. ( cd WHOSON
  88. %{l_prefix}/bin/perl-openpkg prolog
  89. %{l_prefix}/bin/perl-openpkg install
  90. %{l_prefix}/bin/perl-openpkg epilog
  91. ) || exit $?
  92. %endif
  93. %{l_shtool} mkdir -f -p -m 755 \
  94. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  95. $RPM_BUILD_ROOT%{l_prefix}/etc/whoson \
  96. $RPM_BUILD_ROOT%{l_prefix}/var/whoson/run \
  97. $RPM_BUILD_ROOT%{l_prefix}/var/whoson/log \
  98. $RPM_BUILD_ROOT%{l_prefix}/var/whoson/empty
  99. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  100. # tidy installation area
  101. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  102. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
  103. # add startup script
  104. %{l_shtool} install -c -m 755 \
  105. -e 's;@l_prefix@;%{l_prefix};g' \
  106. -e 's;@l_susr@;%{l_susr};g' \
  107. -e 's;@l_rusr@;%{l_rusr};g' \
  108. -e 's;@l_rgrp@;%{l_rgrp};g' \
  109. %{SOURCE rc.whoson} \
  110. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  111. # install OSSP fsl configuration
  112. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  113. %{l_shtool} install -c -m 644 \
  114. -e 's;@l_prefix@;%{l_prefix};g' \
  115. %{SOURCE fsl.whoson} \
  116. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  117. # determine installation files
  118. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  119. %{l_files_std} \
  120. '%not %dir %{l_prefix}/etc/fsl' \
  121. '%config %{l_prefix}/etc/fsl/fsl.whoson' \
  122. '%attr(0750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/whoson' \
  123. '%attr(0750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/whoson/run' \
  124. '%attr(0750,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/whoson/log' \
  125. '%attr(0700,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/whoson/empty' \
  126. '%config %{l_prefix}/etc/whoson/*'
  127. %files -f files
  128. %clean
  129. rm -rf $RPM_BUILD_ROOT