rsync.spec 3.9 KB

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