distcc.spec 4.3 KB

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