rsync.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. ##
  2. ## rsync.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 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.1
  35. Release: 20020124
  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-%{version}.patch-zlib
  42. Patch1: rsync-%{version}.patch-sec
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20011227
  47. PreReq: OpenPKG, openpkg >= 20011227
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. Rsync is a replacement for rcp that has many more features. rsync uses the
  52. "rsync algorithm" which provides a very fast method for bringing remote
  53. files into sync. It does this by sending just the differences in the files
  54. across the link, without requiring that both sets of files are present at
  55. one of the ends of the link beforehand. At first glance this may seem
  56. impossible because the calculation of diffs between two files normally
  57. requires local access to both files.
  58. %prep
  59. %setup -q
  60. %patch0 -p0
  61. %patch1 -p0
  62. %build
  63. CC="%{l_cc}" \
  64. CFLAGS="%{l_cflags -O}" \
  65. ./configure \
  66. --prefix=%{l_prefix} \
  67. --disable-debug
  68. %{l_make} %{l_mflags -O}
  69. %install
  70. rm -rf $RPM_BUILD_ROOT
  71. %{l_make} %{l_mflags} install \
  72. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  73. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  74. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  75. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rsync
  76. %{l_shtool} install -c -m 644 \
  77. -e 's;@l_prefix@;%{l_prefix};g' \
  78. -e 's;@l_npusr@;%{l_npusr};g' \
  79. -e 's;@l_npgrp@;%{l_npgrp};g' \
  80. -e 's;@version@;%{version};g' \
  81. %{SOURCE rsyncd.conf} \
  82. %{SOURCE rsyncd.motd} \
  83. $RPM_BUILD_ROOT%{l_prefix}/etc/rsync/
  84. %{l_shtool} install -c -m 644 /dev/null \
  85. $RPM_BUILD_ROOT%{l_prefix}/etc/rsync/rsyncd.passwd
  86. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  87. %{l_shtool} install -c -m 755 \
  88. -e 's;@l_prefix@;%{l_prefix};g' \
  89. -e 's;@l_fsusr@;%{l_fsusr};g' \
  90. -e 's;@l_fsgrp@;%{l_fsgrp};g' \
  91. %{SOURCE rc.rsyncd} \
  92. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  93. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/rsync
  94. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  95. %{l_files_std} \
  96. '%config %{l_prefix}/etc/rsync/rsyncd.*'
  97. %files -f files
  98. %clean
  99. rm -rf $RPM_BUILD_ROOT