dsh.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ##
  2. ## dsh.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: dsh
  27. Summary: Dancer's Distributed shell
  28. URL: http://www.netfort.gr.jp/~dancer/software/dsh.html
  29. Vendor: Junichi Uekawa
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EXP]
  32. Group: Shell
  33. License: GPL
  34. Version: 0.0.17
  35. Release: 20020222
  36. # list of sources
  37. Source0: http://www.netfort.gr.jp/~dancer/software/downloads/dsh_%{version}.tar.gz
  38. Source1: dsh.conf
  39. Source2: machines.list
  40. Source3: localhost
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20020221
  45. PreReq: OpenPKG, openpkg >= 20020221, openssh
  46. AutoReq: no
  47. AutoReqProv: no
  48. ExclusiveOS: linux2.2
  49. %description
  50. Dsh executes command remotely on several different machines at the same
  51. time.
  52. %prep
  53. %setup -q -n dsh
  54. %build
  55. %{l_shtool} subst \
  56. -e 's;^\(#define DSH_CONF\).*$;\1 "%{l_prefix}/etc/dsh/dsh.conf";' \
  57. -- dsh.h
  58. %{l_shtool} subst \
  59. -e 's;/etc\(/dsh/dsh.conf\);%{l_prefix}/etc\1;' \
  60. -e 's;/etc\(/dsh/machines.list\);%{l_prefix}/etc\1;' \
  61. -e 's;/etc\(/dsh/group\);%{l_prefix}/etc\1;' \
  62. -- dsh.1 parameter.c
  63. %{l_shtool} subst \
  64. -e 's;^ gcc ; $(CC) $(CFLAGS) ;' \
  65. -- Makefile
  66. CC="%{l_cc}" \
  67. CFLAGS="%{l_cflags -O}" \
  68. %{l_make} %{l_mflags -O}
  69. %install
  70. rm -rf $RPM_BUILD_ROOT
  71. %{l_shtool} mkdir -f -p -m 755 \
  72. $RPM_BUILD_ROOT%{l_prefix}/bin \
  73. $RPM_BUILD_ROOT%{l_prefix}/etc/dsh/group \
  74. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  75. %{l_shtool} install -c -m 755 dsh $RPM_BUILD_ROOT%{l_prefix}/bin/
  76. %{l_shtool} install -c -m 644 dsh.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  77. %{l_shtool} install -c -m 644 \
  78. -e 's;@l_prefix@;%{l_prefix};g' \
  79. %{SOURCE dsh.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/dsh/
  80. %{l_shtool} install -c -m 644 \
  81. %{SOURCE machines.list} $RPM_BUILD_ROOT%{l_prefix}/etc/dsh/
  82. %{l_shtool} install -c -m 644 \
  83. %{SOURCE localhost} $RPM_BUILD_ROOT%{l_prefix}/etc/dsh/group/
  84. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  85. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  86. '%config %{l_prefix}/etc/dsh/dsh.conf' \
  87. '%config %{l_prefix}/etc/dsh/machines.list' \
  88. '%config %{l_prefix}/etc/dsh/group/localhost' \
  89. %files -f files
  90. %clean
  91. rm -rf $RPM_BUILD_ROOT