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:   18-Sep-2006 19:45:39
  Branch: HEAD                             Handle: 2006091818453800

  Added files:
    openpkg-src/db          db.pc
  Modified files:
    openpkg-src/db          db.spec

  Log:
    install a db.pc pkg-config file which remembers that we need to link
    against librt under Solaris; also polish the packaging a little bit
    while I'm here

  Summary:
    Revision    Changes     Path
    1.1         +10 -0      openpkg-src/db/db.pc
    1.68        +24 -2      openpkg-src/db/db.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/db/db.pc
  ============================================================================
  $ cvs diff -u -r0 -r1.1 db.pc
  --- /dev/null 2006-09-18 19:45:12 +0200
  +++ db.pc     2006-09-18 19:45:38 +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.67 -r1.68 db.spec
  --- openpkg-src/db/db.spec    12 Sep 2006 17:36:50 -0000      1.67
  +++ openpkg-src/db/db.spec    18 Sep 2006 17:45:38 -0000      1.68
  @@ -37,7 +37,7 @@
   Group:        Database
   License:      BSD
   Version:      %{V_version}.%{V_revision}
  -Release:      20060912
  +Release:      20060918
   
   #   package options
   %option       with_compat no
  @@ -45,6 +45,7 @@
   
   #   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
  @@ -84,6 +85,7 @@
           dist/Makefile.in
   
   %build
  +    #   configure library
       mutex="no"
       case "%{l_platform -p}" in
           ix86-*   ) mutex="x86/gcc-assembly"   ;;
  @@ -94,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"
  @@ -115,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"
  @@ -132,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                     openpkg-cvs@openpkg.org

Reply via email to