| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- ##
- ## tripwire.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
- ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # FIXME: thl fsl does not make it into the binary
- # package versions
- %define V_tripwire 2.3.1
- %define V_lvl 2
- %define V_openpkg %{V_tripwire}.%{V_lvl}
- %define V_vendor %{V_tripwire}-%{V_lvl}
- # package information
- Name: tripwire
- Summary: File and Directory Integrity Checker
- URL: http://www.tripwire.org/
- Vendor: Tripwire, Inc
- Packager: The OpenPKG Project
- Distribution: OpenPKG [EVAL]
- Group: Security
- License: GPL
- Version: %{V_openpkg}
- Release: 20030708
- # package options
- %option with_fsl yes
- # list of sources
- Source0: http://osdn.dl.sourceforge.net/sourceforge/tripwire/tripwire-%{V_vendor}.tar.gz
- Source1: tw.cfg
- Source2: sparc-solaris.inc
- Source3: sparc-solaris.mak
- Source4: rc.tripwire
- Source5: fsl.tripwire
- Patch0: tripwire.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20030415, make, gcc, perl
- PreReq: OpenPKG, openpkg >= 20030415
- %if "%{with_fsl}" == "yes"
- BuildPreReq: fsl
- PreReq: fsl
- %endif
- AutoReq: no
- AutoReqProv: no
- %description
- Tripwire is a policy driven file system integrity checking tool that
- allows system administrators to verify the integrity of their data.
- %prep
- %setup -q -n tripwire-%{V_vendor}
- %patch -p0
- %build
- case "%{l_target}" in
- *-freebsd* ) syspre="i386-unknown-freebsd" ;;
- *-linux* ) syspre="i686-pc-linux" ;;
- *-solaris* ) syspre="sparc-solaris" ;;
- *-netbsd* ) syspre="i386-unknown-openbsd" ;;
- *) echo "ERROR: Unsupport platform '%{l_target}'"; exit 1 ;;
- esac
- cd src
- cp %{SOURCE sparc-solaris.inc} make_include/
- cp %{SOURCE sparc-solaris.mak} cryptlib/
- %{l_shtool} subst \
- -e '/^targets/s/STLport_r//' \
- Makefile
- touch STLport_r
- for f in cryptlib/*.mak make_include/*.inc; do
- %{l_shtool} subst \
- -e 's;-[IL]../STLPort[^[:blank:]]*;;' \
- -e 's;stlport_gcc;stdc++;' \
- $f
- done
- for f in *.pl; do
- %{l_shtool} subst \
- -e '1s;/usr/bin/perl;%{l_prefix}/bin/perl;' \
- $f
- done
- %{l_shtool} subst \
- -e 's;!(IS_SOLARIS && IS_IX86);0;' \
- tripwire/smtpmailmessage.cpp
- %{l_shtool} subst \
- -e 's;@l_prefix@;%{l_prefix};g' \
- core/stdcore.h
- %{l_shtool} subst \
- -e 's;<malloc\.h>;<stdlib.h>;g' \
- `find . -type f -print`
- %{l_make} %{l_mflags -O} release \
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
- LIBS="%{l_fsl_libs}" \
- CXX="%{l_cxx}" \
- CXXFLAGS="%{l_cxxflags -O} -fpermissive" \
- CPPFLAGS="%{l_cppflags}" \
- GMAKE="%{l_make}" \
- SYSPRE="$syspre" \
- STLPORT="No-STLPort"
- %install
- rm -rf $RPM_BUILD_ROOT
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/bin \
- $RPM_BUILD_ROOT%{l_prefix}/etc/tripwire \
- $RPM_BUILD_ROOT%{l_prefix}/man/man4 \
- $RPM_BUILD_ROOT%{l_prefix}/man/man5 \
- $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
- $RPM_BUILD_ROOT%{l_prefix}/var/tripwire
- for f in bin/*_r/*; do
- %{l_shtool} install -c -s -m 755 \
- $f $RPM_BUILD_ROOT%{l_prefix}/bin/
- done
- %{l_shtool} install -c -m 644 \
- policy/twpol.txt \
- $RPM_BUILD_ROOT%{l_prefix}/etc/tripwire/tw.pol
- %{l_shtool} install -c -m 644 \
- policy/policyguide.txt \
- $RPM_BUILD_ROOT%{l_prefix}/etc/tripwire/policyguide
- %{l_shtool} install -c -m 644 \
- -e 's;@l_prefix@;%{l_prefix};g' \
- %{SOURCE tw.cfg} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/tripwire/
- for f in man/man[458]/*.[458]; do
- %{l_shtool} install -c -m 644 \
- $f $RPM_BUILD_ROOT%{l_prefix}/$f
- done
- # install run-command script
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
- %{l_shtool} install -c -m 755 \
- -e 's;@l_prefix@;%{l_prefix};g' \
- -e 's;@l_susr@;%{l_susr};g' \
- -e 's;@l_rusr@;%{l_rusr};g' \
- -e 's;@l_rgrp@;%{l_rgrp};g' \
- %{SOURCE rc.tripwire} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- # install OSSP fsl configuration
- %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
- %{l_shtool} install -c -m 644 \
- -e 's;@l_prefix@;%{l_prefix};g' \
- %{SOURCE fsl.tripwire} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%not %dir %{l_prefix}/etc/fsl' \
- '%config %{l_prefix}/etc/fsl/fsl.tripwire'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|