cfengine.spec 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. ##
  2. ## cfengine.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. # FIXME: rse: reasonable default configuration missing
  26. # package information
  27. Name: cfengine
  28. Summary: Automated System Administration Tool
  29. URL: http://www.cfengine.org/
  30. Vendor: Oslo University College, Norway
  31. Packager: The OpenPKG Project
  32. Distribution: OpenPKG
  33. Class: PLUS
  34. Group: System
  35. License: GPL
  36. Version: 2.1.1
  37. Release: 20040203
  38. # package options
  39. %option with_fsl yes
  40. # list of sources
  41. Source0: ftp://ftp.iu.hio.no/pub/cfengine/cfengine-%{version}.tar.gz
  42. Source1: rc.cfengine
  43. Source2: fsl.cfengine
  44. Patch0: cfengine.patch
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20040130, db, openssl, bison, flex, gcc
  49. PreReq: OpenPKG, openpkg >= 20040130, db, openssl
  50. %if "%{with_fsl}" == "yes"
  51. BuildPreReq: fsl >= 1.2.0
  52. PreReq: fsl >= 1.2.0
  53. %endif
  54. AutoReq: no
  55. AutoReqProv: no
  56. %description
  57. Cfengine is a tool for setting up and maintaining BSD and System-5-like
  58. operating system optionally attached to a TCP/IP network. You can think
  59. of cfengine as a very high level language, much higher level than Perl
  60. or shell: a single statement can result in many hundreds of operations
  61. being performed on multiple hosts. Cfengine is good at performing a lot
  62. of common system administration tasks, and allows you to build on its
  63. strengths with your own scripts. You can also use it as a netwide
  64. front-end for `cron'.
  65. %track
  66. prog cfengine = {
  67. version = 2.1.1
  68. url = ftp://ftp.iu.hio.no/pub/cfengine/
  69. regex = \bcfengine-(\d+.\d+\.\d+)\.tar\.gz
  70. }
  71. %prep
  72. %setup -q
  73. %patch -p0
  74. %build
  75. CC="%{l_cc}" \
  76. CFLAGS="%{l_cflags -O}" \
  77. CPPLAGS="%{l_cppflags}" \
  78. LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
  79. LIBS="%{l_fsl_libs}" \
  80. ./configure \
  81. --prefix=%{l_prefix} \
  82. --with-berkeleydb=%{l_prefix} \
  83. --with-openssl=%{l_prefix} \
  84. --with-workdir=%{l_prefix}/var/cfengine
  85. %{l_make} %{l_mflags -O}
  86. %install
  87. rm -rf $RPM_BUILD_ROOT
  88. %{l_shtool} mkdir -f -p -m 755 \
  89. $RPM_BUILD_ROOT%{l_prefix}/var/cfengine
  90. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  91. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  92. rm -rf $RPM_BUILD_ROOT%{l_prefix}/doc
  93. rmdir $RPM_BUILD_ROOT%{l_prefix}/share/cfengine/doc
  94. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
  95. # install run-command script
  96. %{l_shtool} mkdir -f -p -m 755 \
  97. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  98. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  99. %{SOURCE rc.cfengine} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  100. # install OSSP fsl configuration
  101. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  102. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  103. %{SOURCE fsl.cfengine} \
  104. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  105. # determine installation files
  106. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  107. %{l_files_std} \
  108. '%not %dir %{l_prefix}/etc/fsl' \
  109. '%config %{l_prefix}/etc/fsl/fsl.cfengine'
  110. %files -f files
  111. %clean
  112. rm -rf $RPM_BUILD_ROOT