From 2c51dc225d668cab12ede4911a8a1e5fedf9e9ce9a5e9d5e5b9d5ceb5d621f41 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 2 Oct 2019 11:35:29 +0000 Subject: [PATCH 1/3] 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 --- _multibuild | 3 ++ libdbi.changes | 8 +++++ libdbi.spec | 98 ++++++++++++++++++++++++++++++++++---------------- 3 files changed, 79 insertions(+), 30 deletions(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..ef22a56 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + devel-doc + diff --git a/libdbi.changes b/libdbi.changes index 6ec00f2..d67f3b9 100644 --- a/libdbi.changes +++ b/libdbi.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Sep 23 20:23:16 UTC 2019 - Stefan Brüns + +- 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 diff --git a/libdbi.spec b/libdbi.spec index 4ce5f04..2ba6605 100644 --- a/libdbi.spec +++ b/libdbi.spec @@ -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 From 348a9b9245af45f0c47f234b1d8065b8fb012682f89fe00e54f675eb6b7fc515 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 4 Oct 2019 11:11:21 +0000 Subject: [PATCH 2/3] restore consistency of styling OBS-URL: https://build.opensuse.org/package/show/server:database/libdbi?expand=0&rev=17 --- libdbi.spec | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/libdbi.spec b/libdbi.spec index 2ba6605..10ca90c 100644 --- a/libdbi.spec +++ b/libdbi.spec @@ -15,10 +15,10 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%global flavor @BUILD_FLAVOR@%{nil} +%global flavor @BUILD_FLAVOR@%nil %global sname libdbi -%if "%{flavor}" == "devel-doc" +%if "%flavor" == "devel-doc" %global psuffix -devel-doc %endif @@ -27,7 +27,7 @@ Name: libdbi%{?psuffix} Version: 0.9.0.g33 #Snapshot: libdbi-0.9.0-33-gcdc4479 Release: 0 -%if "%{flavor}" == "" +%if "%flavor" == "" Summary: Database Independent Abstraction Layer for C Group: Development/Libraries/C and C++ %endif @@ -36,14 +36,14 @@ 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: %{sname}-%{version}.tar.xz +Source: %sname-%version.tar.xz Source2: baselibs.conf BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: xz -%if "%{flavor}" == "devel-doc" +%if "%flavor" == "devel-doc" # Only needed when doc is not already prebuilt BuildRequires: docbook-dsssl-stylesheets BuildRequires: openjade @@ -55,10 +55,10 @@ BuildRequires: tex(wasy10.tfm) BuildRequires: texlive-jadetex BuildRequires: texlive-pdftex-bin Recommends: libdbi-devel = %version -Provides: libdbi-devel:%{_docdir}/libdbi/driver-guide.pdf +Provides: libdbi-devel:%_docdir/libdbi/driver-guide.pdf %endif -%if "%{flavor}" == "" +%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 @@ -96,37 +96,37 @@ applications with libdbi. %prep -%setup -qn %{sname} +%setup -qn %sname %build autoreconf -fi sed -i s,\-O20,\-O2,g configure %configure \ -%if "%{flavor}" == "" - --disable-docs \ +%if "%flavor" == "" + --disable-docs \ %else - --enable-docs \ + --enable-docs \ %endif - --docdir="%{_docdir}/libdbi" \ - --disable-static + --docdir="%_docdir/libdbi" \ + --disable-static -%if "%{flavor}" == "" +%if "%flavor" == "" %make_build %else %make_build -C doc %endif %install -%if "%{flavor}" == "" +%if "%flavor" == "" %make_install -rm "%{buildroot}/%{_libdir}/libdbi.la" +rm "%buildroot/%_libdir/libdbi.la" %else %make_install -C doc %endif -%if "%{flavor}" == "" +%if "%flavor" == "" %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig @@ -142,9 +142,9 @@ rm "%{buildroot}/%{_libdir}/libdbi.la" %else -%files -n %{sname}-devel-doc -%dir %{_docdir}/libdbi -%{_docdir}/libdbi/*-guide* +%files -n %sname-devel-doc +%dir %_docdir/libdbi +%_docdir/libdbi/*-guide* %endif From d8c34100a5f064f5525994f3eb4076d78307fc0c0b7ac355353d2ed76ed72bf5 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 4 Oct 2019 11:11:52 +0000 Subject: [PATCH 3/3] . OBS-URL: https://build.opensuse.org/package/show/server:database/libdbi?expand=0&rev=18 --- libdbi.changes | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libdbi.changes b/libdbi.changes index d67f3b9..98a61d2 100644 --- a/libdbi.changes +++ b/libdbi.changes @@ -2,7 +2,7 @@ Mon Sep 23 20:23:16 UTC 2019 - Stefan Brüns - Use _multibuild for documentation building, move documentation - out of devel subpackage. + out of devel subpackage. - Spec file cleanup, modernization. - Streamline texlive BuildRequires. @@ -70,7 +70,7 @@ Thu Dec 15 20:54:59 UTC 2011 - jengelh@medozas.de ------------------------------------------------------------------- Tue Dec 13 13:32:14 UTC 2011 - idonmez@suse.com -- Optimization level 20 doesn't really exist, fix it to -O3 +- Optimization level 20 doesn't really exist, fix it to -O3 - Fix license to be LGPL-2.1+ ------------------------------------------------------------------- @@ -88,4 +88,3 @@ Wed Dec 15 16:08:27 CET 2010 - meissner@suse.de - initial import if libdbi, a database-independent abstraction layer in C, similar to the DBI/DBD layer in Perl. -