rsync.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. ##
  2. ## rsync.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@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: rsync
  26. Summary: Remote Filesystem Synchronization
  27. URL: http://rsync.samba.org/
  28. Vendor: Andrew Tridgell & Paul Mackerras
  29. Packager: The OpenPKG Project
  30. Distribution: OpenPKG [EXP]
  31. Group: Filesystem
  32. License: GPL
  33. Version: 2.4.6
  34. Release: 20011121.0
  35. # list of sources
  36. Source0: http://rsync.samba.org/ftp/rsync/rsync-%{version}.tar.gz
  37. Source1: rsyncd.conf
  38. Source2: rsyncd.motd
  39. Source3: rc.rsyncd
  40. Patch0: rsync-2.4.6.patch-zlib
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 0.9-20011025.0
  45. PreReq: OpenPKG, openpkg >= 0.9-20011025.0
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. Rsync is a replacement for rcp that has many more features. rsync uses the
  50. "rsync algorithm" which provides a very fast method for bringing remote
  51. files into sync. It does this by sending just the differences in the files
  52. across the link, without requiring that both sets of files are present at
  53. one of the ends of the link beforehand. At first glance this may seem
  54. impossible because the calculation of diffs between two files normally
  55. requires local access to both files.
  56. %prep
  57. %setup -q
  58. %patch -p0
  59. %build
  60. CC="%{l_cc}" \
  61. CFLAGS="%{l_cflags -O}" \
  62. ./configure \
  63. --prefix=%{l_prefix}
  64. %{l_make} %{l_mflags -O}
  65. %install
  66. rm -rf $RPM_BUILD_ROOT
  67. %{l_make} %{l_mflags} install \
  68. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  69. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  70. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  71. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rsync
  72. %{l_shtool} install -c -m 644 \
  73. -e 's;@l_prefix@;%{l_prefix};g' \
  74. -e 's;@l_npusr@;%{l_npusr};g' \
  75. -e 's;@l_npgrp@;%{l_npgrp};g' \
  76. -e 's;@version@;%{version};g' \
  77. %{SOURCE rsyncd.conf} \
  78. %{SOURCE rsyncd.motd} \
  79. $RPM_BUILD_ROOT%{l_prefix}/etc/rsync/
  80. %{l_shtool} install -c -m 644 /dev/null \
  81. $RPM_BUILD_ROOT%{l_prefix}/etc/rsync/rsyncd.passwd
  82. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  83. %{l_shtool} install -c -m 755 \
  84. -e 's;@l_prefix@;%{l_prefix};g' \
  85. -e 's;@l_fsusr@;%{l_fsusr};g' \
  86. -e 's;@l_fsgrp@;%{l_fsgrp};g' \
  87. %{SOURCE rc.rsyncd} \
  88. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  89. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/rsync
  90. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  91. %{l_files_std} \
  92. '%config %{l_prefix}/etc/rsync/rsyncd.*'
  93. %files -f files
  94. %clean
  95. rm -rf $RPM_BUILD_ROOT