%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 %global INSTALL_SUFFIX -2 Name: taglib2 Summary: Audio Meta-Data Library Version: 2.0.2 Release: 1%{?dist} License: (LGPL-2.1-only OR MPL-1.1) AND BSD-2-Clause AND LGPL-2.1-only URL: https://taglib.github.io/ Source0: https://taglib.github.io/releases/taglib-%{version}%{?beta}.tar.gz BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: pkgconfig BuildRequires: zlib-devel BuildRequires: utf8cpp-devel %if %{with tests} BuildRequires: cppunit-devel %endif %if %{with doc} BuildRequires: doxygen BuildRequires: graphviz %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 %autosetup -n taglib-%{version}%{?beta} -p1 %build %{cmake} \ %if %{with tests} -DBUILD_TESTS:BOOL=ON \ %endif -DCMAKE_BUILD_TYPE:STRING="Release" \ -DBUILD_SHARED_LIBS=on \ -DTAGLIB_INSTALL_SUFFIX=%{INSTALL_SUFFIX} %cmake_build %if %{with doc} %cmake_build --target docs %endif %install %cmake_install %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 export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig test "$(pkg-config --modversion taglib%{INSTALL_SUFFIX})" = "%{version}" test "$(pkg-config --modversion taglib%{INSTALL_SUFFIX}_c)" = "%{version}" %if %{with tests} #ln -s ../../tests/data %{_target_platform}/tests/ #LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH \ %ctest %endif %ldconfig_scriptlets %files %doc AUTHORS %license COPYING.LGPL COPYING.MPL %{_libdir}/libtag%{INSTALL_SUFFIX}.so.2* %{_libdir}/libtag_c%{INSTALL_SUFFIX}.so.2* %files devel %doc examples %{_bindir}/taglib%{INSTALL_SUFFIX}-config %{_includedir}/taglib%{INSTALL_SUFFIX}/ %{_libdir}/libtag%{INSTALL_SUFFIX}.so %{_libdir}/libtag_c%{INSTALL_SUFFIX}.so %{_libdir}/pkgconfig/taglib%{INSTALL_SUFFIX}.pc %{_libdir}/pkgconfig/taglib%{INSTALL_SUFFIX}_c.pc %{_libdir}/cmake/taglib%{INSTALL_SUFFIX}/* %if %{with doc} %files doc %doc %{apidocdir}/* %endif %changelog %autochangelog