zsync.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. ##
  2. ## zsync.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package information
  24. Name: zsync
  25. Summary: RSYNC over HTTP
  26. URL: http://zsync.moria.org.uk/
  27. Vendor: Colin Phipps et al.
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: EVAL
  31. Group: Networking
  32. License: Artistic
  33. Version: 0.6.1
  34. Release: 20090429
  35. # list of sources
  36. Source0: http://zsync.moria.org.uk/download/zsync-%{version}.tar.bz2
  37. Patch0: zsync.patch
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20060823
  42. PreReq: OpenPKG, openpkg >= 20060823
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. zsync is a file transfer program. It allows you to download a
  47. file from a remote server, where you have a copy of an older
  48. version of the file on your computer already. zsync downloads only
  49. the new parts of the file. It uses the same algorithm as rsync.
  50. However, where rsync is designed for synchronising data from one
  51. computer to another within an organisation, zsync is designed for
  52. file distribution, with one file on a server to be distributed to
  53. thousands of downloaders. zsync requires no special server software
  54. just a web server to host the files and imposes no extra load on the
  55. server, making it ideal for large scale file distribution.
  56. %track
  57. prog zsync = {
  58. version = %{version}
  59. url = http://zsync.moria.org.uk/downloads
  60. regex = zsync-(__VER__)\.tar\.bz2
  61. }
  62. %prep
  63. %setup -q
  64. %patch -p0
  65. %build
  66. endian="-DLITTLE_ENDIAN=0 -DBIG_ENDIAN=1"
  67. case "%{l_platform -t}" in
  68. sparc64-* ) endian="$endian -DBYTE_ORDER=1" ;;
  69. ix86*-* ) endian="$endian -DBYTE_ORDER=0" ;;
  70. amd64-* ) endian="$endian -DBYTE_ORDER=0" ;;
  71. * ) endian="$endian -DBYTE_ORDER=0" ;;
  72. esac
  73. CC="%{l_cc}" \
  74. CFLAGS="%{l_cflags -O}" \
  75. CPPFLAGS="%{l_cppflags} $endian" \
  76. LDFLAGS="%{l_ldflags}" \
  77. ./configure \
  78. --prefix=%{l_prefix} \
  79. --mandir=%{l_prefix}/man
  80. %{l_make} %{l_mflags -O}
  81. %install
  82. rm -rf $RPM_BUILD_ROOT
  83. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  84. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  85. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc >/dev/null 2>&1 || true
  86. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  87. %files -f files
  88. %clean
  89. rm -rf $RPM_BUILD_ROOT