distcc.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. ##
  2. ## distcc.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.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: distcc
  27. Summary: Distributing C Compiler Framework
  28. URL: http://distcc.samba.org/
  29. Vendor: Martin Pool
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EVAL]
  32. Group: Network
  33. License: GPL
  34. Version: 2.11.2
  35. Release: 20031127
  36. # package option
  37. %option with_x11 no
  38. # list of sources
  39. Source0: http://distcc.samba.org/ftp/distcc/distcc-%{version}.tar.bz2
  40. Source1: rc.distcc
  41. Patch0: distcc.patch
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20030103
  46. PreReq: OpenPKG, openpkg >= 20030103
  47. %if "%{with_x11}" == "yes"
  48. BuildPreReq: X11, gtk2
  49. PreReq: X11, gtk2
  50. %endif
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. distcc is a program to distribute builds of C, C++, Objective C or
  55. Objective C++ code across several machines on a network. distcc
  56. should always generate the same results as a local build, is simple
  57. to install and use, and is often two or more times faster than a
  58. local compile. distcc does not require all machines to share a
  59. filesystem, have synchronized clocks, or to have the same libraries
  60. or header files installed. They can even have different processors
  61. or operating systems, if cross-compilers are installed.
  62. %prep
  63. %setup -q
  64. %patch -p0
  65. %build
  66. # configure program
  67. CC="%{l_cc}" \
  68. CFLAGS="%{l_cflags -O}" \
  69. CPPFLAGS="%{l_cppflags}" \
  70. LDFLAGS="%{l_ldflags}" \
  71. ./configure \
  72. --prefix=%{l_prefix} \
  73. --sysconfdir=%{l_prefix}/etc/distcc \
  74. %if "%{with_x11}" == "yes"
  75. --with-gtk \
  76. %endif
  77. --with-included-popt
  78. # build program
  79. %{l_make} %{l_mflags -O}
  80. %install
  81. # install program
  82. rm -rf $RPM_BUILD_ROOT
  83. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  84. # post-adjust installation
  85. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  86. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
  87. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/distcc
  88. # create additional directories
  89. %{l_shtool} mkdir -f -p -m 755 \
  90. $RPM_BUILD_ROOT%{l_prefix}/etc/distcc \
  91. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  92. $RPM_BUILD_ROOT%{l_prefix}/var/distcc/tmp \
  93. $RPM_BUILD_ROOT%{l_prefix}/var/distcc/run
  94. # install hosts configuration
  95. echo "localhost" >hosts
  96. %{l_shtool} install -c -m 644 \
  97. hosts $RPM_BUILD_ROOT%{l_prefix}/etc/distcc/
  98. # install run-command script
  99. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  100. %{SOURCE rc.distcc} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  101. # determine installation files
  102. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  103. %{l_files_std} \
  104. '%config %{l_prefix}/etc/distcc/*' \
  105. '%attr(755,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/distcc/*'
  106. %files -f files
  107. %clean
  108. rm -rf $RPM_BUILD_ROOT