sendfile.spec 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. ##
  2. ## sendfile.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: sendfile
  26. Summary: Simple Asynchronous File Transfer (SAFT)
  27. URL: http://www.belwue.de/projekte/saft/sendfile.html
  28. Vendor: Ulli Horlacher
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: PLUS
  32. Group: Network
  33. License: GPL
  34. Version: 2.1b
  35. Release: 20051006
  36. # list of sources
  37. Source0: ftp://ftp.belwue.de/pub/unix/sendfile/sendfile-%{version}.tar.gz
  38. Source1: sendfiledx.tar.gz
  39. Source2: sendfile.cf
  40. Source3: rc.sendfile
  41. Patch0: sendfile.patch
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
  46. PreReq: OpenPKG, openpkg >= 20040130
  47. BuildPreReq: readline
  48. PreReq: readline
  49. AutoReq: no
  50. AutoReqProv: no
  51. %description
  52. Sendfile is a Unix implementation of Simple Asynchronous File
  53. Transfer (SAFT) which can be used to asynchronously send/receive
  54. files over the Internet.
  55. %track
  56. prog sendfile = {
  57. version = %{version}
  58. url = ftp://ftp.belwue.de/pub/unix/sendfile/
  59. regex = sendfile-(\d+\.\d+[a-z]?)\.tar\.gz
  60. }
  61. %prep
  62. %setup -q
  63. %setup -q -T -D -a 1
  64. %patch -p0
  65. %build
  66. # configure program
  67. ./makeconfig \
  68. CC="%{l_cc}" \
  69. CFLAGS="\"%{l_cflags -O}\"" \
  70. CPPFLAGS="%{l_cppflags}" \
  71. LDFLAGS="%{l_ldflags}" \
  72. FIFODIR=%{l_prefix}/var/sendfile/run \
  73. SPOOL=%{l_prefix}/var/sendfile/spool \
  74. BINDIR=%{l_prefix}/bin \
  75. MANDIR=%{l_prefix}/man \
  76. CONFIG=%{l_prefix}/etc/sendfile \
  77. SERVERDIR=%{l_prefix}/sbin \
  78. TAR=%{l_tar} \
  79. GZIP=%{l_gzip} \
  80. BZIP2=%{l_bzip2} \
  81. PGP=%{l_prefix}/bin/pgp \
  82. RECODE=%{l_prefix}/bin/recode \
  83. METAMAIL=%{l_prefix}/bin/metamail \
  84. SENDMAIL=%{l_prefix}/sbin/sendmail
  85. # build program
  86. %{l_make} %{l_mflags}
  87. # build sendfiledx addon
  88. ( cd sendfiledx
  89. CC="%{l_cc}" \
  90. CFLAGS="%{l_cflags -O}" \
  91. ./configure
  92. %{l_make} %{l_mflags}
  93. ) || exit $?
  94. %install
  95. # create installation hierarchy
  96. rm -rf $RPM_BUILD_ROOT
  97. %{l_shtool} mkdir -f -p -m 755 \
  98. $RPM_BUILD_ROOT%{l_prefix}/bin \
  99. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  100. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  101. $RPM_BUILD_ROOT%{l_prefix}/man/man7 \
  102. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  103. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  104. $RPM_BUILD_ROOT%{l_prefix}/etc/sendfile \
  105. $RPM_BUILD_ROOT%{l_prefix}/var/sendfile/spool \
  106. $RPM_BUILD_ROOT%{l_prefix}/var/sendfile/spool/OUTGOING \
  107. $RPM_BUILD_ROOT%{l_prefix}/var/sendfile/spool/LOG \
  108. $RPM_BUILD_ROOT%{l_prefix}/var/sendfile/run
  109. # install programs
  110. ( cd src
  111. %{l_shtool} install -c -s -m 755 \
  112. fetchfile receive sendfile sendmsg utf7encode wlock \
  113. $RPM_BUILD_ROOT%{l_prefix}/bin/
  114. %{l_shtool} install -c -s -m 755 \
  115. sendfiled $RPM_BUILD_ROOT%{l_prefix}/sbin/
  116. ) || exit $?
  117. ( cd etc
  118. %{l_shtool} install -c -m 755 \
  119. check_sendfile sf_cleanup sfconf sfdconf \
  120. $RPM_BUILD_ROOT%{l_prefix}/bin/
  121. ) || exit $?
  122. %{l_shtool} install -c -s -m 755 \
  123. sendfiledx/sendfiledx $RPM_BUILD_ROOT%{l_prefix}/sbin/
  124. ln $RPM_BUILD_ROOT%{l_prefix}/bin/utf7encode \
  125. $RPM_BUILD_ROOT%{l_prefix}/bin/utf7decode
  126. ln $RPM_BUILD_ROOT%{l_prefix}/bin/receive \
  127. $RPM_BUILD_ROOT%{l_prefix}/bin/rf
  128. ln $RPM_BUILD_ROOT%{l_prefix}/bin/sendfile \
  129. $RPM_BUILD_ROOT%{l_prefix}/bin/sf
  130. ln $RPM_BUILD_ROOT%{l_prefix}/bin/sendmsg \
  131. $RPM_BUILD_ROOT%{l_prefix}/bin/sm
  132. # install manual pages
  133. %{l_shtool} install -c -m 755 \
  134. doc/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  135. %{l_shtool} install -c -m 755 \
  136. doc/*.7 $RPM_BUILD_ROOT%{l_prefix}/man/man7/
  137. %{l_shtool} install -c -m 755 \
  138. doc/*.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  139. # install default configuration
  140. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  141. %{SOURCE sendfile.cf} $RPM_BUILD_ROOT%{l_prefix}/etc/sendfile/
  142. %{l_shtool} install -c -m 644 \
  143. etc/sendfile.deny $RPM_BUILD_ROOT%{l_prefix}/etc/sendfile/
  144. # install run-command script
  145. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  146. %{SOURCE rc.sendfile} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  147. # determine installation files
  148. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  149. %{l_files_std} \
  150. '%config %{l_prefix}/etc/sendfile/*'
  151. %files -f files
  152. %clean
  153. rm -rf $RPM_BUILD_ROOT