diff --git a/README.md b/README.md index 7a6d387..f683b7e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # libdbi +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 DBs and multiple simultaneous DB connections by using this framework. + diff --git a/libdbi-0.8.2-cflags.patch b/libdbi-0.8.2-cflags.patch new file mode 100644 index 0000000..bea7565 --- /dev/null +++ b/libdbi-0.8.2-cflags.patch @@ -0,0 +1,17 @@ +Ensure desirable compile flags are used. We want RPM_OPT_FLAGS rather than +upstream's idea of suitable optimization flags, per Fedora packaging +guidelines, and we *don't* want -ffast-math, per bug #629964. + + +diff -Naur libdbi-0.8.2.orig/configure.in libdbi-0.8.2/configure.in +--- libdbi-0.8.2.orig/configure.in 2007-02-14 17:51:02.000000000 -0500 ++++ libdbi-0.8.2/configure.in 2007-10-30 16:11:59.000000000 -0400 +@@ -55,7 +55,7 @@ + case $host in + *-*-linux*) + DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char -std=gnu99" +- CFLAGS="-O20 -ffast-math -D_REENTRANT -fsigned-char -std=gnu99" ++ CFLAGS="-D_REENTRANT -fsigned-char -std=gnu99 $RPM_OPT_FLAGS" + PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char -std=gnu99";; + sparc-sun-*) + DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8 -std=gnu99" diff --git a/libdbi.spec b/libdbi.spec new file mode 100644 index 0000000..ef766c5 --- /dev/null +++ b/libdbi.spec @@ -0,0 +1,90 @@ +Name: libdbi +Version: 0.9.0 +Release: 1mamba +Summary: Database Independent Abstraction Layer +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://libdbi.sourceforge.net/ +Source0: http://downloads.sourceforge.net/project/libdbi/libdbi/libdbi-%{version}/libdbi-%{version}.tar.gz +Patch0: libdbi-0.8.2-cflags.patch +License: LGPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +## AUTOBUILDREQ-END +BuildRequires: autoconf +BuildRequires: docbook-dsssl +BuildRequires: openjade +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%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 DBs and multiple simultaneous DB connections by using this framework. + +%package devel +Group: Development/Libraries +Summary: Libraries and headers for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +libdbi implements a database-independent abstraction layer in C. +This package contains libraries and header files need for development. + +%package static +Group: Development/Libraries +Summary: Static libraries for %{name} +Requires: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release} + +%description static +libdbi implements a database-independent abstraction layer in C. +This package contains static libraries need for development. + +%prep +%setup -q +sed -i "s,| arm-\* |,| aarch64-\* | arm-\* |," config.sub +#%patch0 -p1 +#autoconf + +%build +%configure +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_libdir}/libdbi.so.* +%doc AUTHORS COPYING + +%files devel +%defattr(-,root,root) +%dir %{_includedir}/dbi +%{_includedir}/dbi/*.h +%{_libdir}/libdbi.so +%{_libdir}/pkgconfig/dbi.pc +%doc doc/programmers-guide.pdf +%doc doc/programmers-guide/ +%doc doc/driver-guide.pdf +%doc doc/driver-guide/ TODO +%dir %{_datadir}/doc/libdbi-%{version} +%{_datadir}/doc/libdbi-%{version}/* +%doc ChangeLog NEWS README + +%files static +%defattr(-,root,root) +%{_libdir}/libdbi.*a + +%changelog +* Mon Mar 18 2013 Automatic Build System 0.9.0-1mamba +- automatic version update by autodist + +* Tue Nov 09 2010 gil 0.8.4-1mamba +- package created by autospec