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.4
  35. Release: 20020314
  36. # list of sources
  37. Source0: http://rsync.samba.org/ftp/rsync/rsync-%{version}.tar.gz
  38. Source1: rsync.conf
  39. Source2: rsync.motd
  40. Source3: rc.rsync
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20020206
  45. PreReq: OpenPKG, openpkg >= 20020206
  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. %build
  59. CC="%{l_cc}" \
  60. CFLAGS="%{l_cflags -O}" \
  61. ./configure \
  62. --prefix=%{l_prefix} \
  63. --disable-debug
  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. mv $RPM_BUILD_ROOT%{l_prefix}/man/man5/rsyncd.conf.5 \
  72. $RPM_BUILD_ROOT%{l_prefix}/man/man5/rsync.conf.5
  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 rsync.conf} \
  80. %{SOURCE rsync.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/rsync.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.rsync} \
  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/rsync.*'
  95. %files -f files
  96. %clean
  97. rm -rf $RPM_BUILD_ROOT