rsync.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ##
  2. ## rsync.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 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 [CORE]
  32. Group: Filesystem
  33. License: GPL
  34. Version: 2.5.5
  35. Release: 20021227
  36. # list of sources
  37. Source0: http://rsync.samba.org/ftp/rsync/rsync-%{version}.tar.gz
  38. Source1: rsync.conf
  39. Source2: rc.rsync
  40. Patch0: rsync.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20020404
  45. PreReq: OpenPKG, openpkg >= 20020404
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. Rsync is a replacement for rcp(1) that has many more features.
  50. Rsync uses the "rsync algorithm" which provides a very fast method
  51. for bringing remote files into sync. It does this by sending just
  52. the differences in the files across the link, without requiring
  53. that both sets of files are present at one of the ends of the link
  54. beforehand. At first glance this may seem impossible because the
  55. calculation of differences between two files normally requires local
  56. access to both files.
  57. %prep
  58. # unpack vendor sources
  59. %setup -q
  60. %patch -p0
  61. %build
  62. # configure vendor sources
  63. CC="%{l_cc}" \
  64. CFLAGS="%{l_cflags -O}" \
  65. ./configure \
  66. --prefix=%{l_prefix} \
  67. --disable-debug \
  68. --with-included-popt
  69. # build vendor sources
  70. %{l_make} %{l_mflags -O}
  71. %install
  72. # perform vendor installation
  73. rm -rf $RPM_BUILD_ROOT
  74. %{l_make} %{l_mflags} install \
  75. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  76. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  77. # post-adjust vendor installation
  78. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  79. mv $RPM_BUILD_ROOT%{l_prefix}/man/man5/rsyncd.conf.5 \
  80. $RPM_BUILD_ROOT%{l_prefix}/man/man5/rsync.conf.5
  81. # provide default (deamon) configuration
  82. %{l_shtool} mkdir -f -p -m 755 \
  83. $RPM_BUILD_ROOT%{l_prefix}/etc/rsync
  84. %{l_shtool} install -c -m 644 \
  85. -e 's;@l_prefix@;%{l_prefix};g' \
  86. -e 's;@l_nusr@;%{l_nusr};g' \
  87. -e 's;@l_ngrp@;%{l_ngrp};g' \
  88. -e 's;@version@;%{version};g' \
  89. %{SOURCE rsync.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/rsync/
  90. %{l_shtool} install -c -m 644 /dev/null \
  91. $RPM_BUILD_ROOT%{l_prefix}/etc/rsync/rsync.passwd
  92. %{l_shtool} mkdir -f -p -m 755 \
  93. $RPM_BUILD_ROOT%{l_prefix}/var/rsync
  94. # provide run-command script
  95. %{l_shtool} mkdir -f -p -m 755 \
  96. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  97. %{l_shtool} install -c -m 755 \
  98. -e 's;@l_prefix@;%{l_prefix};g' \
  99. -e 's;@l_musr@;%{l_musr};g' \
  100. -e 's;@l_mgrp@;%{l_mgrp};g' \
  101. %{SOURCE rc.rsync} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  102. # determine binary package files
  103. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  104. %{l_files_std} '%config %{l_prefix}/etc/rsync/rsync.*'
  105. %files -f files
  106. %clean
  107. rm -rf $RPM_BUILD_ROOT