cfengine/cfengine.spec

Mon, 17 Sep 2012 19:10:10 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 17 Sep 2012 19:10:10 +0200
changeset 689
9fe04d4d4e5a
parent 562
fb1ea36eaee4
child 692
67831a9de168
permissions
-rw-r--r--

Update to new version of vendor software although Oracle fails to deliver.
More specifically, newer db(3) patch revisions exist but Oracle has
removed them from the canonical download server URI for Berkely DB.

michael@562 1 ##
michael@562 2 ## cfengine.spec -- OpenPKG RPM Package Specification
michael@562 3 ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@562 4 ##
michael@562 5 ## Permission to use, copy, modify, and distribute this software for
michael@562 6 ## any purpose with or without fee is hereby granted, provided that
michael@562 7 ## the above copyright notice and this permission notice appear in all
michael@562 8 ## copies.
michael@562 9 ##
michael@562 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@562 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@562 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@562 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@562 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@562 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@562 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@562 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@562 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@562 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@562 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@562 21 ## SUCH DAMAGE.
michael@562 22 ##
michael@562 23
michael@562 24 # package information
michael@562 25 Name: cfengine
michael@562 26 Summary: Automated System Administration Tool
michael@562 27 URL: http://www.cfengine.org/
michael@562 28 Vendor: Oslo University College, Norway
michael@562 29 Packager: OpenPKG Foundation e.V.
michael@562 30 Distribution: OpenPKG Community
michael@562 31 Class: BASE
michael@562 32 Group: System
michael@562 33 License: GPL
michael@563 34 Version: 3.3.5
michael@563 35 Release: 20120800
michael@562 36
michael@562 37 # package options
michael@562 38 %option with_fsl yes
michael@562 39
michael@562 40 # list of sources
michael@562 41 Source0: http://cfengine.com/source-code/download?file=cfengine-%{version}.tar.gz
michael@562 42 Source1: rc.cfengine
michael@562 43 Source2: fsl.cfengine
michael@562 44
michael@562 45 # build information
michael@563 46 BuildPreReq: OpenPKG, openpkg >= 20100101, bison, flex, make, gcc, pkgconfig
michael@562 47 PreReq: OpenPKG, openpkg >= 20100101
michael@563 48 BuildPreReq: tokyocabinet, openssl, pcre
michael@563 49 PreReq: tokyocabinet, openssl, pcre
michael@562 50 %if "%{with_fsl}" == "yes"
michael@562 51 BuildPreReq: fsl
michael@562 52 PreReq: fsl
michael@562 53 %endif
michael@562 54
michael@562 55 %description
michael@562 56 Cfengine is a tool for setting up and maintaining BSD and System-5-like
michael@562 57 operating system optionally attached to a TCP/IP network. You can think
michael@562 58 of cfengine as a very high level language, much higher level than Perl
michael@562 59 or shell: a single statement can result in many hundreds of operations
michael@562 60 being performed on multiple hosts. Cfengine is good at performing a lot
michael@562 61 of common system administration tasks, and allows you to build on its
michael@562 62 strengths with your own scripts. You can also use it as a netwide
michael@562 63 front-end for `cron'.
michael@562 64
michael@562 65 %track
michael@562 66 prog cfengine = {
michael@562 67 version = %{version}
michael@562 68 url = http://cfengine.com/source-code
michael@563 69 regex = cfengine-(\d+.\d+\.\d+(p\d+)?)\.tar\.gz
michael@562 70 }
michael@562 71
michael@562 72 %prep
michael@562 73 %setup -q
michael@563 74 %{l_shtool} subst \
michael@563 75 -e 's;\(LIBS=.*\)-ltokyocabinet;\1`%{l_prefix}/bin/pkg-config --libs-only-l tokyocabinet`;' \
michael@563 76 -e 's;\(LIBS=.*\)-lcrypto;\1`%{l_prefix}/bin/pkg-config --libs-only-l openssl`;' \
michael@563 77 configure
michael@563 78 %{l_shtool} subst \
michael@563 79 -e 's;\(masterfilesdir = \$(projdatadir)\)/CoreBase;\1/cfengine;' \
michael@563 80 masterfiles/Makefile.in
michael@562 81
michael@562 82 %build
michael@562 83 # configure package
michael@562 84 CC="%{l_cc}" \
michael@562 85 CFLAGS="%{l_cflags -O}" \
michael@563 86 CPPFLAGS="%{l_cppflags}" \
michael@563 87 LDFLAGS="%{l_fsl_ldflags}" \
michael@563 88 LIBS="%{l_fsl_libs}" \
michael@562 89 ./configure \
michael@562 90 --prefix=%{l_prefix} \
michael@562 91 --mandir=%{l_prefix}/man \
michael@562 92 --infodir=%{l_prefix}/info \
michael@562 93 --with-workdir=%{l_prefix}/var/cfengine \
michael@563 94 --with-tokyocabinet=%{l_prefix} \
michael@562 95 --with-openssl=%{l_prefix} \
michael@562 96 --with-pcre=%{l_prefix} \
michael@563 97 --without-sql \
michael@563 98 --disable-shared
michael@562 99
michael@562 100 # build package
michael@563 101 %{l_make} %{l_mflags -O}
michael@562 102
michael@562 103 %install
michael@562 104 # install package
michael@562 105 %{l_shtool} mkdir -f -p -m 755 \
michael@562 106 $RPM_BUILD_ROOT%{l_prefix}/var/cfengine
michael@562 107 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
michael@562 108
michael@562 109 # strip down installation
michael@562 110 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc >/dev/null 2>&1 || true
michael@562 111 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/lib* >/dev/null 2>&1 || true
michael@562 112 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir >/dev/null 2>&1 || true
michael@562 113 strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
michael@562 114
michael@562 115 # install run-command script
michael@562 116 %{l_shtool} mkdir -f -p -m 755 \
michael@562 117 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
michael@562 118 %{l_shtool} install -c -m 755 %{l_value -s -a} \
michael@562 119 %{SOURCE rc.cfengine} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
michael@562 120
michael@562 121 # install OSSP fsl configuration
michael@562 122 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
michael@562 123 %{l_shtool} install -c -m 644 %{l_value -s -a} \
michael@562 124 %{SOURCE fsl.cfengine} \
michael@562 125 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
michael@562 126
michael@562 127 # determine installation files
michael@562 128 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@562 129 %{l_files_std} \
michael@562 130 '%config %{l_prefix}/etc/fsl/fsl.cfengine'
michael@562 131
michael@562 132 %files -f files
michael@562 133
michael@562 134 %clean
michael@562 135
michael@562 136 %post
michael@562 137 # generate a public/private key pair for localhost
michael@562 138 if [ ! -f $RPM_INSTALL_PREFIX/var/cfengine/ppkeys/localhost.priv ]; then
michael@563 139 $RPM_INSTALL_PREFIX/bin/cf-key
michael@562 140 fi
michael@562 141

mercurial