On Sun, Jan 26, 2003 at 10:53:49AM +0100, Ralf S. Engelschall wrote:
>On Sat, Jan 25, 2003, Bill Campbell wrote:
>
>> >
>> >>   Added files:
>> >>     openpkg-src/tripwire    tripwire.spec
>> >
>> >Do not forget to add the version tracking file vc.tripwire. If you use
>> >"openpkg-dev new tripwire" for creating new packages and "openpkg-dev
>> >release tripwire-xx-xx" for releasing it will created and comitted
>> >automatically in the future.
>>
>> I tried building here with this tripwire.spec file, but wasn't successful.
>> [...]
>
>Thanks for your help. I've included the patches into the new tripwire
>package Michael v.E. created. But it unfortunately still does not build
>correctly under FreeBSD. Seems like we've to bash it a little bit more
>next week...

The tripwire-2.3.1-2 SRC that appeared in the current/SRC directory tonight
build under SuSE 8.1, creating executables:
        ./bin/i686-pc-linux_r/tripwire
        ./bin/i686-pc-linux_r/twadmin
        ./bin/i686-pc-linux_r/twprint
        ./bin/i686-pc-linux_r/siggen

The generated binary RPM had nothing in it.  The ``make install'' reported
nothing to do.  Given the general nastiness of tripwire's Makefiles, it
might be sufficient to handle this in the spec file.  I've hacked this
here, and tested the install using --short-circuit (which is why the
``rpm -rf bin/CVS'' since I had to make a couple of tries before getting
it right :-).  The build itself takes quite a while even on a dual 1GhZ
PIII and generates almost a half meg of output.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Whenever you find yourself on the side of the majority it is time to
pause and reflect.''
               -- Mark Twain   
##
##  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 <[EMAIL PROTECTED]>
##
##  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.
##

#   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 [JUNK]
Group:        Security
License:      GPL
Version:      %{V_openpkg}
Release:      20030127

#   list of sources
Source0:      
http://osdn.dl.sourceforge.net/sourceforge/tripwire/tripwire-%{V_vendor}.tar.gz
Patch0:       tripwire.patch

#   build information
Prefix:       %{l_prefix}
BuildRoot:    %{l_buildroot}
BuildPreReq:  OpenPKG, openpkg >= 20030114, make, gcc
PreReq:       OpenPKG, openpkg >= 20030114
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-linux"          ;;
        *-netbsd*  ) syspre="i386-unknown-openbsd" ;;
        *) echo "ERROR: Unsupport platform '%{l_target}'"; exit 1 ;;
    esac
    cd src
    %{l_shtool} subst \
        -e '/^targets/s/STLport_r//' \
        Makefile
    touch STLport_r
    for f in cryptlib/*.mak; do
        %{l_shtool} subst \
            -e 's;-[IL]../STLPort[^[:blank:]]*;;' \
            -e 's;stlport_gcc;stdc++;' \
            $f
    done
    %{l_make} %{l_mflags -O} release \
        CC="%{l_cc}" \
        CFLAGS="%{l_cflags -O}" \
        CXX="%{l_cxx}" \
        CXXFLAGS="%{l_cxxflags -O} -fpermissive" \
        CPPFLAGS="%{l_cppflags}" \
        LDFLAGS="%{l_ldflags}" \
        GMAKE="%{l_make}" \
        SYSPRE="$syspre" \
        STLPORT="No-STLPort"

%install
    rm -rf $RPM_BUILD_ROOT
    # %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
        rm -rf bin/CVS 2>/dev/null # we really don't need this
        %{__install} -d $RPM_BUILD_ROOT/%{l_prefix}/bin
        %{__install} bin/*/* $RPM_BUILD_ROOT/%{l_prefix}/bin
        for sec in 4 5 8 ; do
                dir=$RPM_BUILD_ROOT%{_mandir}/man$sec
                %{__install} -d $dir
                %{__install} -m 644 man/man$sec/*.$sec $dir
        done
    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}

%files -f files

%clean
    rm -rf $RPM_BUILD_ROOT

Reply via email to