rsync.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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.2
  35. Release: 20020213
  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.patch-zlib
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20020206
  46. PreReq: OpenPKG, openpkg >= 20020206
  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. --disable-debug
  66. %{l_make} %{l_mflags -O}
  67. %install
  68. rm -rf $RPM_BUILD_ROOT
  69. %{l_make} %{l_mflags} install \
  70. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  71. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  72. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  73. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rsync
  74. %{l_shtool} install -c -m 644 \
  75. -e 's;@l_prefix@;%{l_prefix};g' \
  76. -e 's;@l_nusr@;%{l_nusr};g' \
  77. -e 's;@l_ngrp@;%{l_ngrp};g' \
  78. -e 's;@version@;%{version};g' \
  79. %{SOURCE rsyncd.conf} \
  80. %{SOURCE rsyncd.motd} \
  81. $RPM_BUILD_ROOT%{l_prefix}/etc/rsync/
  82. %{l_shtool} install -c -m 644 /dev/null \
  83. $RPM_BUILD_ROOT%{l_prefix}/etc/rsync/rsyncd.passwd
  84. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  85. %{l_shtool} install -c -m 755 \
  86. -e 's;@l_prefix@;%{l_prefix};g' \
  87. -e 's;@l_musr@;%{l_musr};g' \
  88. -e 's;@l_mgrp@;%{l_mgrp};g' \
  89. %{SOURCE rc.rsyncd} \
  90. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  91. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/rsync
  92. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  93. %{l_files_std} \
  94. '%config %{l_prefix}/etc/rsync/rsyncd.*'
  95. %files -f files
  96. %clean
  97. rm -rf $RPM_BUILD_ROOT