OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 27-Dec-2004 12:37:29
Branch: HEAD Handle: 2004122711372900
Added files:
openpkg-src/libdbi libdbi.spec
Log:
new package: libdbi 0.7.2 (Database Independent (DBI) Abstraction
Layer for C)
Summary:
Revision Changes Path
1.1 +169 -0 openpkg-src/libdbi/libdbi.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/libdbi/libdbi.spec
============================================================================
$ cvs diff -u -r0 -r1.1 libdbi.spec
--- /dev/null 2004-12-27 12:37:29 +0100
+++ libdbi.spec 2004-12-27 12:37:29 +0100
@@ -0,0 +1,169 @@
+##
+## libdbi.spec -- OpenPKG RPM Specification
+## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
+## Copyright (c) 2000-2004 Ralf S. Engelschall <[EMAIL PROTECTED]>
+## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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.
+##
+
+# package version
+%define V_dbi 0.7.2
+%define V_dbi_drivers 0.7.1
+
+# package information
+Name: libdbi
+Summary: Database Independent (DBI) Abstraction Layer for C
+URL: http://libdbi.sourceforge.net/
+Vendor: David A. Parker
+Packager: The OpenPKG Project
+Distribution: OpenPKG
+Class: EVAL
+Group: Database
+License: LGPL
+Version: %{V_dbi}
+Release: 20041227
+
+# package options
+%option with_sqlite yes
+%option with_mysql no
+%option with_pgsql no
+
+# list of sources
+Source0:
http://osdn.dl.sourceforge.net/sourceforge/libdbi/libdbi-%{V_dbi}.tar.gz
+Source1:
http://osdn.dl.sourceforge.net/sourceforge/libdbi-drivers/libdbi-drivers-%{V_dbi_drivers}.tar.gz
+
+# build information
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+BuildPreReq: OpenPKG, openpkg >= 20040130
+PreReq: OpenPKG, openpkg >= 20040130
+%if "%{with_sqlite}" == "yes"
+BuildPreReq: sqlite
+PreReq: sqlite
+%endif
+%if "%{with_mysql}" == "yes"
+BuildPreReq: mysql, openssl
+PreReq: mysql, openssl
+%endif
+%if "%{with_pgsql}" == "yes"
+BuildPreReq: postgresql, openssl
+PreReq: postgresql, openssl
+%endif
+AutoReq: no
+AutoReqProv: no
+
+%description
+ libdbi implements a database-independent abstraction layer in C,
+ similar to the DBI/DBD layer in Perl. Writing one generic set of
+ code, programmers can leverage the power of multiple databases and
+ multiple simultaneous database connections by using this framework.
+ Currently the SQLite, MySQL, and PostgreSQL RDBMS are supported.
+
+%track
+ prog libdbi = {
+ version = %{V_dbi}
+ url = http://prdownloads.sourceforge.net/libdbi/
+ regex = libdbi-(__VER__)\.tar\.gz
+ }
+ prog libdbi:drivers = {
+ version = %{V_dbi_drivers}
+ url = http://prdownloads.sourceforge.net/libdbi-drivers/
+ regex = libdbi-drivers-(__VER__)\.tar\.gz
+ }
+
+%prep
+ %setup -q -c
+ %setup -q -D -T -a 1
+
+%build
+ ( cd libdbi-%{V_dbi}
+ CC="%{l_cc}" \
+ CFLAGS="%{l_cflags -O}" \
+ CPPFLAGS="%{l_cppflags}" \
+ LDFLAGS="%{l_ldflags}" \
+ ./configure \
+ --prefix=%{l_prefix} \
+ --disable-shared
+ %{l_make} %{l_mflags -O}
+ ) || exit $?
+ ( cd libdbi-drivers-%{V_dbi_drivers}
+ LIBS=""
+%if "%{with_mysql}" == "yes"
+ LIBS="$LIBS -lssl -lcrypto -lm"
+%endif
+%if "%{with_pgsql}" == "yes"
+ LIBS="$LIBS -lssl -lcrypto -lcrypt"
+%endif
+ CC="%{l_cc}" \
+ CFLAGS="%{l_cflags -O}" \
+ CPPFLAGS="%{l_cppflags}" \
+ LDFLAGS="%{l_ldflags}" \
+ LIBS="$LIBS" \
+ ./configure \
+ --prefix=%{l_prefix} \
+ --with-dbi-incdir=`pwd`/../libdbi-%{V_dbi}/include \
+%if "%{with_sqlite}" == "yes"
+ --with-sqlite \
+ --with-sqlite-dir=%{l_prefix} \
+ --with-sqlite-incdir=%{l_prefix}/include \
+ --with-sqlite-libdir=%{l_prefix}/lib \
+%endif
+%if "%{with_mysql}" == "yes"
+ --with-mysql \
+ --with-mysql-dir=%{l_prefix} \
+ --with-mysql-incdir=%{l_prefix}/include \
+ --with-mysql-libdir=%{l_prefix}/lib/mysql \
+%endif
+%if "%{with_pgsql}" == "yes"
+ --with-pgsql \
+ --with-pgsql-dir=%{l_prefix} \
+ --with-pgsql-incdir=%{l_prefix}/include/postgresql \
+ --with-pgsql-libdir=%{l_prefix}/lib \
+%endif
+ --disable-static \
+ --enable-shared
+ %{l_make} %{l_mflags -O}
+ ) || exit $?
+
+%install
+ rm -rf $RPM_BUILD_ROOT
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/share/libdbi
+ ( cd libdbi-%{V_dbi}
+ %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
+ mv $RPM_BUILD_ROOT%{l_prefix}/share/doc/libdbi-*/*.pdf \
+ $RPM_BUILD_ROOT%{l_prefix}/share/libdbi/
+ ) || exit $?
+ ( cd libdbi-drivers-%{V_dbi_drivers}
+ %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
+ mv $RPM_BUILD_ROOT%{l_prefix}/share/doc/libdbi-drivers-*/*.pdf \
+ $RPM_BUILD_ROOT%{l_prefix}/share/libdbi/
+ ) || exit $?
+ rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
+ strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+ %{l_files_std} \
+ '%doc %{l_prefix}/share/libdbi/*.pdf'
+
+%files -f files
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]