diff --git a/_multibuild b/_multibuild index 58ef5ee..0bc293a 100644 --- a/_multibuild +++ b/_multibuild @@ -1,3 +1,3 @@ - doc + tests diff --git a/_service b/_service new file mode 100644 index 0000000..ad055ab --- /dev/null +++ b/_service @@ -0,0 +1,16 @@ + + + 1.11.1 + 1.11.1+git%cd.%h + https://github.com/taglib/taglib.git + git + .git + enable + taglib + + + xz + *.tar + + + diff --git a/taglib-1.11.1+git20190531.ba7adc2b.tar.xz b/taglib-1.11.1+git20190531.ba7adc2b.tar.xz new file mode 100644 index 0000000..a5aa361 --- /dev/null +++ b/taglib-1.11.1+git20190531.ba7adc2b.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f5bd0a3525a50d22638d019f85130490a26a67e4ec4caf57d1774cb5192f69a +size 902668 diff --git a/taglib-1.11.2~git20190601.tar.gz b/taglib-1.11.2~git20190601.tar.gz deleted file mode 100644 index 3f7ead4..0000000 --- a/taglib-1.11.2~git20190601.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5ca08920a9a7e8ef5fc1bbb235aecea37ba63cd2025695b08cd7d1d719ec0633 -size 1300498 diff --git a/taglib.changes b/taglib.changes index 9f9887a..e820a81 100644 --- a/taglib.changes +++ b/taglib.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jul 8 09:06:19 UTC 2019 - Tomáš Chvátal + +- Switch to service file for generating the package +- Use conditions to enable the multibuild tests in other loop while + also generating the docs +- Make sure the tests are actually executed + ------------------------------------------------------------------- Thu Jul 4 18:04:10 UTC 2019 - Stefan Brüns diff --git a/taglib.spec b/taglib.spec index c8041e9..df98353 100644 --- a/taglib.spec +++ b/taglib.spec @@ -17,53 +17,43 @@ %global flavor @BUILD_FLAVOR@%{nil} -%global sname taglib - +%global sname taglib %if "%{flavor}" != "" -%global pname %{sname}-%{flavor} -%else -%global pname %{sname} -%endif - -%if "%{flavor}" == "" +%global psuffix -%{flavor} +# build also examples with tests %bcond_without tests -%bcond_without examples %else +%global psuffix %{nil} %bcond_with tests -%bcond_with examples %endif - -%define rev ba7adc2bc261ed634c2a964185bcffb9365ad2f4 - -Name: %{pname} -Version: 1.11.2~git20190601 +Name: taglib%{psuffix} +Version: 1.11.1+git20190531.ba7adc2b Release: 0 Summary: Audio Meta-Data Library License: LGPL-2.1-or-later AND MPL-1.1 Group: Productivity/Multimedia/Other URL: http://taglib.github.io/ -Source0: https://github.com/taglib/taglib/archive/%{rev}.tar.gz#/%{sname}-%{version}.tar.gz -#Source0: http://taglib.github.io/releases/%%{sname}-%%{version}.tar.gz +Source0: %{sname}-%{version}.tar.xz Source1: %{sname}.desktop Source100: baselibs.conf Patch0: taglib-versionbump.patch BuildRequires: cmake >= 2.8 BuildRequires: fdupes BuildRequires: gcc-c++ -%if "%{flavor}" == "doc" -BuildRequires: doxygen -BuildRequires: ghostscript-fonts-std -BuildRequires: graphviz-gd -BuildRequires: update-desktop-files -%else -BuildRequires: libcppunit-devel BuildRequires: pkgconfig BuildRequires: pkgconfig(zlib) -%endif # NOTE: The tagreader and writer executables give different results when built with # an earlier taglib-1.8-ds-rusxmms patch. See bnc#814814 Requires: libtag1 = %{version}-%{release} Requires: libtag_c0 = %{version}-%{release} +%if %{with tests} +BuildRequires: doxygen +BuildRequires: ghostscript-fonts-std +BuildRequires: graphviz-gd +BuildRequires: libcppunit-devel +BuildRequires: pkgconfig +BuildRequires: update-desktop-files +%endif %description TagLib is a library for reading and editing the meta-data of several popular @@ -73,7 +63,6 @@ TrueAudio, WAV, AIFF, MP4 and ASF files. This package contains built examples which manipulate tags from the command line. -%if "%{flavor}" == "" %package -n libtag1 Summary: Audio Meta-Data Library License: LGPL-2.1-or-later @@ -113,7 +102,6 @@ Obsoletes: taglib-devel <= 1.6.3 %description -n libtag-devel This package contains development files for taglib. -%else %package -n libtag-doc Summary: API documentation for taglib License: LGPL-2.1-or-later @@ -122,27 +110,33 @@ BuildArch: noarch %description -n libtag-doc This package contains the taglib API Documentation in HTML format. -%endif %prep -%setup -q -n %{sname}-%{rev} -%patch0 -p0 +%setup -q -n %{sname}-%{version} +%patch0 %build +# The testing needs static libs too %cmake \ - -DBUILD_TESTS:BOOL=%{?with_tests:ON}%{?without_tests:OFF} \ -DWITH_ASF:BOOL=ON \ -DWITH_MP4:BOOL=ON \ - -DBUILD_EXAMPLES:BOOL=%{?with_examples:ON}%{?without_examples:OFF} - -%if "%{flavor}" == "doc" -%cmake_build docs +%if %{with tests} + -DBUILD_TESTS:BOOL=ON \ + -DBUILD_EXAMPLES:BOOL=ON \ + -DBUILD_STATIC_LIBS:BOOL=ON \ + -DBUILD_SHARED_LIBS:BOOL=OFF %else -%cmake_build all + -DBUILD_TESTS:BOOL=OFF \ + -DBUILD_EXAMPLES:BOOL=OFF +%endif +%cmake_build + +%if %{with tests} +%cmake_build docs %endif %install -%if "%{flavor}" == "doc" +%if %{with tests} # install susehelp file mkdir -p %{buildroot}%{_datadir}/susehelp/meta/Development/Libraries/ install -pm 0644 %{SOURCE1} %{buildroot}%{_datadir}/susehelp/meta/Development/Libraries/ @@ -155,26 +149,28 @@ mkdir -p %{buildroot}%{_defaultdocdir}/libtag-doc cp -a build/doc/html/ %{buildroot}%{_defaultdocdir}/libtag-doc/ %else -%cmake_install all - -# Add built examples to taglib package. -mkdir -p %{buildroot}%{_bindir} -find build/examples -maxdepth 1 ! -type d -executable -exec cp -v \{\} %{buildroot}%{_bindir} \; - +%cmake_install %endif %fdupes %{buildroot} -%if "%{flavor}" == "" +%check +%if %{with tests} +%ctest +%endif + +%if !%{with tests} %post -n libtag1 -p /sbin/ldconfig %postun -n libtag1 -p /sbin/ldconfig %post -n libtag_c0 -p /sbin/ldconfig %postun -n libtag_c0 -p /sbin/ldconfig %files -n libtag1 +%license COPYING.LGPL COPYING.MPL %{_libdir}/libtag.so.1 %{_libdir}/libtag.so.1.* %files -n libtag_c0 +%license COPYING.LGPL COPYING.MPL %{_libdir}/libtag_c.so.0 %{_libdir}/libtag_c.so.0.* @@ -183,19 +179,7 @@ find build/examples -maxdepth 1 ! -type d -executable -exec cp -v \{\} %{buildro %{_includedir}/taglib/ %{_libdir}/libtag*.so %{_libdir}/pkgconfig/*.pc - -%files -%license COPYING.LGPL COPYING.MPL -%{_bindir}/* -%exclude %{_bindir}/taglib-config - -%else -%post -%desktop_database_post - -%postun -%desktop_database_postun - +%else %files -n libtag-doc %doc AUTHORS NEWS examples %{_docdir}/libtag-doc/html