OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   20-Sep-2006 21:24:34
  Branch: OPENPKG_2_STABLE                 Handle: 2006092020243300

  Added files:              (Branch: OPENPKG_2_STABLE)
    openpkg-src/db          db.pc
  Modified files:           (Branch: OPENPKG_2_STABLE)
    openpkg-src/db          db.spec

  Log:
    MFC: recent improvements and cleanups

  Summary:
    Revision    Changes     Path
    1.1.2.2     +10 -0      openpkg-src/db/db.pc
    1.66.2.2    +28 -9      openpkg-src/db/db.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/db/db.pc
  ============================================================================
  $ cvs diff -u -r0 -r1.1.2.2 db.pc
  --- /dev/null 2006-09-20 21:24:34 +0200
  +++ db.pc     2006-09-20 21:24:34 +0200
  @@ -0,0 +1,10 @@
  [EMAIL PROTECTED]@
  +exec_prefix=${prefix}
  +libdir=${exec_prefix}/lib
  +includedir=${prefix}/include
  +
  +Name: db
  +Description: Berkeley-DB Library
  +Version: @version@
  +Libs: -L${libdir} @libs@
  +Cflags: -I${includedir}
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/db/db.spec
  ============================================================================
  $ cvs diff -u -r1.66.2.1 -r1.66.2.2 db.spec
  --- openpkg-src/db/db.spec    20 Jun 2006 15:15:58 -0000      1.66.2.1
  +++ openpkg-src/db/db.spec    20 Sep 2006 19:24:33 -0000      1.66.2.2
  @@ -24,7 +24,7 @@
   
   #   package version
   %define       V_version  4.4.20
  -%define       V_revision 2
  +%define       V_revision 4
   
   #   package information
   Name:         db
  @@ -37,7 +37,7 @@
   Group:        Database
   License:      BSD
   Version:      %{V_version}.%{V_revision}
  -Release:      2.20060622
  +Release:      2.20060920
   
   #   package options
   %option       with_compat no
  @@ -45,9 +45,12 @@
   
   #   list of sources
   Source0:      ftp://sleepycat1.inetu.net/releases/db-%{V_version}.tar.gz
  +Source1:      db.pc
   Patch0:       db.patch
   Patch1:       
http://www.sleepycat.com/update/%{V_version}/patch.%{V_version}.1
   Patch2:       
http://www.sleepycat.com/update/%{V_version}/patch.%{V_version}.2
  +Patch3:       
http://www.sleepycat.com/update/%{V_version}/patch.%{V_version}.3
  +Patch4:       
http://www.sleepycat.com/update/%{V_version}/patch.%{V_version}.4
   
   #   build information
   Prefix:       %{l_prefix}
  @@ -72,21 +75,17 @@
           url       = http://dev.sleepycat.com/downloads/latestreleases.html
           regex     = db-(__VER__)\.tar\.gz
       }
  -    prog db:patch = {
  -        version   = %{V_version}
  -        url       = http://dev.sleepycat.com/downloads/latestreleases.html
  -        regex     = patch\.(__VER__\.\d+)\.html
  -    }
   
   %prep
       %setup -q -n db-%{V_version}
  -    %patch -p0 -P 0 1 2
  +    %patch -p0 -P 0 1 2 3 4
       %{l_shtool} subst \
           -e 's;\($(ar) cr .*\);\1 _udivdi3.o _muldi3.o _clz.o;' \
           -e 's;install_utilities install_docs;install_utilities;' \
           dist/Makefile.in
   
   %build
  +    #   configure library
       mutex="no"
       case "%{l_platform -p}" in
           ix86-*   ) mutex="x86/gcc-assembly"   ;;
  @@ -97,7 +96,6 @@
           *        ) mutex="UNIX/fcntl"         ;;
       esac
       cd build_unix
  -    ar -vx `%{l_cc} -print-libgcc-file-name` _udivdi3.o _muldi3.o _clz.o
       CC="%{l_cc}" \
       CFLAGS="%{l_cflags -O}" \
   %if "%{with_cxx}" == "yes"
  @@ -118,14 +116,20 @@
   %endif
           --with-mutex="$mutex" \
           --disable-shared
  +
  +    #   build library
  +    ar -vx `%{l_cc} -print-libgcc-file-name` _udivdi3.o _muldi3.o _clz.o
       %{l_make} %{l_mflags -O}
   
   %install
  +    #   install library
       rm -rf $RPM_BUILD_ROOT
       ( cd build_unix
         %{l_make} %{l_mflags} install \
             prefix=$RPM_BUILD_ROOT%{l_prefix} \
       ) || exit $?
  +
  +    #   strip down installation
       rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libdb-[0-9]*.a
       strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   %if "%{with_compat}" == "no"
  @@ -135,6 +139,21 @@
       rm -f $RPM_BUILD_ROOT%{l_prefix}/include/db_cxx.h
       rm -f $RPM_BUILD_ROOT%{l_prefix}/include/cxx_*.h
   %endif
  +
  +    #   install pkg-config configuration
  +    libs="-ldb"
  +    case "%{l_platform -t}" in
  +        *-sunos* ) libs="$libs -lrt" ;;
  +    esac
  +    %{l_shtool} mkdir -f -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig
  +    %{l_shtool} install -c -m 644 %{l_value -s -a} \
  +        -e "s;@version@;%{version};" \
  +        -e "s;@libs@;$libs;" \
  +        %{SOURCE db.pc} \
  +        $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/
  +
  +    #   determine installation files
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   
   %files -f files
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to