%undefine __cmake_in_source_build ## 1.11 currently disables tests with BUILD_SHARED_LIBS=ON #bcond_without tests #bcond_without doc %global apidocdir __api-doc_fedora Name: taglib Summary: Audio Meta-Data Library Version: 1.12 Release: 1%{?dist} License: LGPLv2 or MPLv1.1 URL: http://taglib.github.io/ %if 0%{?snap:1} && !0%{?os2_version} Source0: taglib-%{version}-%{snap}.tar.gz Source0: http://taglib.github.io/releases/taglib-%{version}%{?beta}.tar.gz %else %scm_source github https://github.com/taglib/taglib master %endif # The snapshot tarballs generated with the following script: %if !0%{?os2_version} Source1: taglib-snapshot.sh %endif # http://bugzilla.redhat.com/343241 # fix multilib, and drop -lz flag to consumers (probably only needed for static linking) %if !0%{?os2_version} Patch0: taglib-1.12-multilib.patch %endif BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: pkgconfig BuildRequires: zlib-devel %if %{with tests} && !0%{?os2_version} BuildRequires: cppunit-devel %endif %if %{with doc} BuildRequires: doxygen %if !0%{?os2_version} BuildRequires: graphviz %endif %endif %description TagLib is a library for reading and editing the meta-data of several popular audio formats. Currently it supports both ID3v1 and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC, Speex, WavPack, TrueAudio files, as well as APE Tags. %package doc Summary: API Documentation for %{name} BuildArch: noarch %description doc This is API documentation generated from the TagLib source code. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %if ! %{with doc} Obsoletes: %{name}-doc < %{version}-%{release} %endif %description devel Files needed when building software with %{name}. %prep %if !0%{?os2_version} %autosetup -n taglib-%{version}%{?beta} -p1 %else %scm_setup %endif %build %if 0%{?os2_version} mkdir builder cd builder export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" export LIBS="-lcx" %{cmake} .. \ %if %{with tests} && !0%{?os2_version} -DBUILD_TESTS:BOOL=ON \ %endif -DCMAKE_INSTALL_PREFIX:PATH=/@unixroot/usr \ -DCMAKE_SKIP_RPATH:BOOL=YES \ -DBUILD_BINDINGS=ON \ -DCMAKE_BUILD_TYPE=Release \ -Wno-dev \ -DBUILD_SHARED_LIBS=ON \ %endif %if !0%{?os2_version} %cmake_build %else make %{?_smp_mflags} %endif %if %{with doc} %cmake_build --target docs %endif %install %if !0%{?os2_version} %cmake_install %else make install/fast DESTDIR=%{buildroot} -C builder %endif %if %{with doc} rm -fr %{apidocdir} ; mkdir %{apidocdir} cp -a %{_vpath_builddir}/doc/html/ %{apidocdir}/ ln -s html/index.html %{apidocdir} find %{apidocdir} -name '*.md5' | xargs rm -fv %endif %check %if !0%{?os2_version} export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig test "$(pkg-config --modversion taglib)" = "%{version}" test "$(pkg-config --modversion taglib_c)" = "%{version}" %if %{with tests} #ln -s ../../tests/data %{_target_platform}/tests/ #LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH \ %ctest %endif %endif %if !0%{?os2_version} %ldconfig_scriptlets %endif %files %doc AUTHORS NEWS %license COPYING.LGPL COPYING.MPL %if !0%{?os2_version} %{_libdir}/libtag.so.1* %{_libdir}/libtag_c.so.0* %else %{_libdir}/*.dll %endif %files devel %doc examples %{_bindir}/taglib-config %{_includedir}/taglib/ %if !0%{?os2_version} %{_libdir}/libtag.so %{_libdir}/libtag_c.so %else %{_libdir}/*tag*.a %endif %{_libdir}/pkgconfig/taglib.pc %{_libdir}/pkgconfig/taglib_c.pc %if %{with doc} %files doc %doc %{apidocdir}/* %endif %changelog * Mon Mar 29 2021 Rex Dieter - 1.12-4 - fix multilib.patch (#1943870)