Accepting request 732795 from home:StefanBruens:branches:openSUSE:Factory

- Use _multibuild for documentation building, move documentation
  out of devel subpackage. 
- Spec file cleanup, modernization.
- Streamline texlive BuildRequires.

OBS-URL: https://build.opensuse.org/request/show/732795
OBS-URL: https://build.opensuse.org/package/show/server:database/libdbi?expand=0&rev=16
This commit is contained in:
Martin Pluskal 2019-10-02 11:35:29 +00:00 committed by Git OBS Bridge
parent a54ec55ea1
commit 2c51dc225d
3 changed files with 79 additions and 30 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>devel-doc</package>
</multibuild>

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Sep 23 20:23:16 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Use _multibuild for documentation building, move documentation
out of devel subpackage.
- Spec file cleanup, modernization.
- Streamline texlive BuildRequires.
-------------------------------------------------------------------
Tue Dec 29 17:25:50 UTC 2015 - lars@linux-schulserver.de

View File

@ -1,7 +1,7 @@
#
# spec file for package libdbi
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,51 +12,69 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
Name: libdbi
%global sname libdbi
%if "%{flavor}" == "devel-doc"
%global psuffix -devel-doc
%endif
Name: libdbi%{?psuffix}
%define lname libdbi3
Version: 0.9.0.g33
#Snapshot: libdbi-0.9.0-33-gcdc4479
Release: 0
%if "%{flavor}" == ""
Summary: Database Independent Abstraction Layer for C
License: LGPL-2.1+
Group: Development/Libraries/C and C++
URL: http://libdbi.sf.net/
%endif
License: LGPL-2.1-or-later
URL: http://libdbi.sourceforge.net/
#Git-Clone: git://git.code.sf.net/p/libdbi/libdbi
#Source: http://downloads.sf.net/libdbi/%name-%version.tar.gz
Source: %name-%version.tar.xz
#Source: http://downloads.sf.net/libdbi/%%name-%%version.tar.gz
Source: %{sname}-%{version}.tar.xz
Source2: baselibs.conf
BuildRoot: %_tmppath/%name-%version-build
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: xz
%if 0%{?suse_version} >= 1130
# SLE_11 does not have texlive-collection-fontsrecommended
%define build_doc 1
%else
%define build_doc 0
%endif
%if %build_doc
%if "%{flavor}" == "devel-doc"
# Only needed when doc is not already prebuilt
BuildRequires: docbook-dsssl-stylesheets
BuildRequires: openjade
BuildRequires: texlive-collection-fontsrecommended
BuildRequires: tex(8r.enc)
BuildRequires: tex(t1ptm.fd)
BuildRequires: tex(t1phv.fd)
BuildRequires: tex(uwasy.fd)
BuildRequires: tex(wasy10.tfm)
BuildRequires: texlive-jadetex
BuildRequires: texlive-pdftex-bin
Recommends: libdbi-devel = %version
Provides: libdbi-devel:%{_docdir}/libdbi/driver-guide.pdf
%endif
%if "%{flavor}" == ""
%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.
%else
Summary: Development documentation for libdbi
Group: Documentation/Other
BuildArch: noarch
%description
The libdbi-devel-doc package contains libdbi programmers-guide
and driver-guide.
%endif
%package -n %lname
Summary: Database Independent Abstraction Layer for C
Group: System/Libraries
@ -73,41 +91,61 @@ Group: Development/Libraries/C and C++
Requires: %lname = %version
%description devel
The libdbi-devel package contains the header files and documentation
needed to develop applications with libdbi.
The libdbi-devel package contains the header files needed to develop
applications with libdbi.
%prep
%setup -qn %name
%setup -qn %{sname}
%build
autoreconf -fi
sed -i s,\-O20,\-O2,g configure
%configure \
%if !%build_doc
--disable-docs \
%if "%{flavor}" == ""
--disable-docs \
%else
--enable-docs \
%endif
--docdir="%{_docdir}/libdbi" \
--disable-static
%if "%{flavor}" == ""
%make_build
%else
%make_build -C doc
%endif
--disable-static --docdir="%_docdir/%name"
make %{?_smp_mflags}
%install
make install DESTDIR="%buildroot"
rm README.win32 "%buildroot/%_libdir/libdbi.la"
%if "%{flavor}" == ""
%make_install
rm "%{buildroot}/%{_libdir}/libdbi.la"
%else
%make_install -C doc
%endif
%if "%{flavor}" == ""
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING README*
%doc AUTHORS ChangeLog README
%license COPYING
%_libdir/libdbi.so.3*
%files devel
%defattr(-,root,root)
%_includedir/dbi/
%_libdir/libdbi.so
%_libdir/pkgconfig/dbi.pc
%if %build_doc
%_docdir/%name/
%else
%files -n %{sname}-devel-doc
%dir %{_docdir}/libdbi
%{_docdir}/libdbi/*-guide*
%endif
%changelog