rdist.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. ##
  2. ## rdist.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. # FIXME: rse: does not compile under FreeBSD 4!
  26. # package versions
  27. %define V_base 7.0.0
  28. %define V_pl alpha10
  29. %define V_opkg 7.0.0a10
  30. # package information
  31. Name: rdist
  32. Summary: Remote File Distribution
  33. URL: http://www.magnicomp.com/rdist/
  34. Vendor: MagniComp
  35. Packager: The OpenPKG Project
  36. Distribution: OpenPKG [JUNK]
  37. Group: Filesystem
  38. License: BSD
  39. Version: %{V_opkg}
  40. Release: 20030708
  41. # package options
  42. %option with_fsl yes
  43. # list of sources
  44. Source0: http://www.magnicomp.com/download/rdist/rdist-%{V_base}-%{V_pl}.tar.gz
  45. Source1: rc.rdist
  46. Source2: fsl.rdist
  47. # build information
  48. Prefix: %{l_prefix}
  49. BuildRoot: %{l_buildroot}
  50. BuildPreReq: OpenPKG, openpkg >= 20030415, make, gcc, bison
  51. PreReq: OpenPKG, openpkg >= 20030415
  52. %if "%{with_fsl}" == "yes"
  53. BuildPreReq: fsl
  54. PreReq: fsl
  55. %endif
  56. AutoReq: no
  57. AutoReqProv: no
  58. %description
  59. RDist is an open source program to maintain identical copies of
  60. files over multiple hosts. It preserves the owner, group, mode,
  61. and mtime of files if possible and can update programs that are
  62. executing.
  63. %prep
  64. %setup -q -n rdist-%{V_base}-%{V_pl}
  65. %build
  66. CC="%{l_cc}" \
  67. CFLAGS="%{l_cflags -O}" \
  68. LDFLAGS="%{l_fsl_ldflags}" \
  69. LIBS="%{l_fsl_libs}" \
  70. ./configure \
  71. --prefix=%{l_prefix}
  72. %{l_make} %{l_mflags}
  73. %install
  74. rm -rf $RPM_BUILD_ROOT
  75. %{l_shtool} mkdir -f -p -m 755 \
  76. $RPM_BUILD_ROOT%{l_prefix}/bin \
  77. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  78. $RPM_BUILD_ROOT%{l_prefix}/man/man8
  79. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  80. $RPM_BUILD_ROOT%{l_prefix}/var/rdist
  81. %{l_shtool} install -c -s -m 755 \
  82. src/rdist \
  83. $RPM_BUILD_ROOT%{l_prefix}/bin/
  84. %{l_shtool} install -c -s -m 755 \
  85. src/rdistd \
  86. $RPM_BUILD_ROOT%{l_prefix}/sbin/
  87. %{l_shtool} install -c -m 644 \
  88. doc/rdist.man \
  89. $RPM_BUILD_ROOT%{l_prefix}/man/man1/rdist.1
  90. %{l_shtool} install -c -m 644 \
  91. doc/rdistd.man \
  92. $RPM_BUILD_ROOT%{l_prefix}/man/man8/rdistd.8
  93. # install run-command script
  94. %{l_shtool} mkdir -f -p -m 755 \
  95. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  96. %{l_shtool} install -c -m 755 \
  97. -e 's;@l_prefix@;%{l_prefix};g' \
  98. -e 's;@l_susr@;%{l_susr};g' \
  99. -e 's;@l_rusr@;%{l_rusr};g' \
  100. -e 's;@l_rgrp@;%{l_rgrp};g' \
  101. %{SOURCE rc.rdist} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  102. # install OSSP fsl configuration
  103. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  104. %{l_shtool} install -c -m 644 \
  105. -e 's;@l_prefix@;%{l_prefix};g' \
  106. %{SOURCE fsl.rdist} \
  107. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  108. # determine installation files
  109. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  110. %{l_files_std} \
  111. '%not %dir %{l_prefix}/etc/fsl' \
  112. '%config %{l_prefix}/etc/fsl/fsl.rdist'
  113. %files -f files
  114. %clean
  115. rm -rf $RPM_BUILD_ROOT