sendfile.spec 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. ##
  2. ## sendfile.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2005 Cable & Wireless <http://www.cw.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: sendfile
  27. Summary: Simple Asynchronous File Transfer (SAFT)
  28. URL: http://www.belwue.de/projekte/saft/sendfile.html
  29. Vendor: Ulli Horlacher
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: Network
  34. License: GPL
  35. Version: 2.1a
  36. Release: 20050319
  37. # list of sources
  38. Source0: ftp://ftp.belwue.de/pub/unix/sendfile/sendfile-%{version}.tar.gz
  39. Source1: sendfiledx.tar.gz
  40. Source2: sendfile.cf
  41. Source3: rc.sendfile
  42. Patch0: sendfile.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
  47. PreReq: OpenPKG, openpkg >= 20040130
  48. BuildPreReq: readline
  49. PreReq: readline
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. Sendfile is a Unix implementation of Simple Asynchronous File
  54. Transfer (SAFT) which can be used to asynchronously send/receive
  55. files over the Internet.
  56. %track
  57. prog sendfile = {
  58. version = %{version}
  59. url = ftp://ftp.belwue.de/pub/unix/sendfile/
  60. regex = sendfile-(__VER__)\.tar\.gz
  61. }
  62. %prep
  63. %setup -q
  64. %setup -q -T -D -a 1
  65. %patch -p0
  66. %build
  67. # configure program
  68. ./makeconfig \
  69. CC="%{l_cc}" \
  70. CFLAGS="\"%{l_cflags -O}\"" \
  71. CPPFLAGS="%{l_cppflags}" \
  72. LDFLAGS="%{l_ldflags}" \
  73. FIFODIR=%{l_prefix}/var/sendfile/run \
  74. SPOOL=%{l_prefix}/var/sendfile/spool \
  75. BINDIR=%{l_prefix}/bin \
  76. MANDIR=%{l_prefix}/man \
  77. CONFIG=%{l_prefix}/etc/sendfile \
  78. SERVERDIR=%{l_prefix}/sbin \
  79. TAR=%{l_tar} \
  80. GZIP=%{l_gzip} \
  81. BZIP2=%{l_bzip2} \
  82. PGP=%{l_prefix}/bin/pgp \
  83. RECODE=%{l_prefix}/bin/recode \
  84. METAMAIL=%{l_prefix}/bin/metamail \
  85. SENDMAIL=%{l_prefix}/sbin/sendmail
  86. # build program
  87. %{l_make} %{l_mflags}
  88. # build sendfiledx addon
  89. ( cd sendfiledx
  90. CC="%{l_cc}" \
  91. CFLAGS="%{l_cflags -O}" \
  92. ./configure
  93. %{l_make} %{l_mflags}
  94. ) || exit $?
  95. %install
  96. # create installation hierarchy
  97. rm -rf $RPM_BUILD_ROOT
  98. %{l_shtool} mkdir -f -p -m 755 \
  99. $RPM_BUILD_ROOT%{l_prefix}/bin \
  100. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  101. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  102. $RPM_BUILD_ROOT%{l_prefix}/man/man7 \
  103. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  104. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  105. $RPM_BUILD_ROOT%{l_prefix}/etc/sendfile \
  106. $RPM_BUILD_ROOT%{l_prefix}/var/sendfile/spool \
  107. $RPM_BUILD_ROOT%{l_prefix}/var/sendfile/spool/OUTGOING \
  108. $RPM_BUILD_ROOT%{l_prefix}/var/sendfile/spool/LOG \
  109. $RPM_BUILD_ROOT%{l_prefix}/var/sendfile/run
  110. # install programs
  111. ( cd src
  112. %{l_shtool} install -c -s -m 755 \
  113. fetchfile receive sendfile sendmsg utf7encode wlock \
  114. $RPM_BUILD_ROOT%{l_prefix}/bin/
  115. %{l_shtool} install -c -s -m 755 \
  116. sendfiled $RPM_BUILD_ROOT%{l_prefix}/sbin/
  117. ) || exit $?
  118. ( cd etc
  119. %{l_shtool} install -c -m 755 \
  120. check_sendfile sf_cleanup sfconf sfdconf \
  121. $RPM_BUILD_ROOT%{l_prefix}/bin/
  122. ) || exit $?
  123. %{l_shtool} install -c -s -m 755 \
  124. sendfiledx/sendfiledx $RPM_BUILD_ROOT%{l_prefix}/sbin/
  125. ln $RPM_BUILD_ROOT%{l_prefix}/bin/utf7encode \
  126. $RPM_BUILD_ROOT%{l_prefix}/bin/utf7decode
  127. ln $RPM_BUILD_ROOT%{l_prefix}/bin/receive \
  128. $RPM_BUILD_ROOT%{l_prefix}/bin/rf
  129. ln $RPM_BUILD_ROOT%{l_prefix}/bin/sendfile \
  130. $RPM_BUILD_ROOT%{l_prefix}/bin/sf
  131. ln $RPM_BUILD_ROOT%{l_prefix}/bin/sendmsg \
  132. $RPM_BUILD_ROOT%{l_prefix}/bin/sm
  133. # install manual pages
  134. %{l_shtool} install -c -m 755 \
  135. doc/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  136. %{l_shtool} install -c -m 755 \
  137. doc/*.7 $RPM_BUILD_ROOT%{l_prefix}/man/man7/
  138. %{l_shtool} install -c -m 755 \
  139. doc/*.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  140. # install default configuration
  141. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  142. %{SOURCE sendfile.cf} $RPM_BUILD_ROOT%{l_prefix}/etc/sendfile/
  143. %{l_shtool} install -c -m 644 \
  144. etc/sendfile.deny $RPM_BUILD_ROOT%{l_prefix}/etc/sendfile/
  145. # install run-command script
  146. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  147. %{SOURCE rc.sendfile} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  148. # determine installation files
  149. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  150. %{l_files_std} \
  151. '%config %{l_prefix}/etc/sendfile/*'
  152. %files -f files
  153. %clean
  154. rm -rf $RPM_BUILD_ROOT