Name:          taglib
Summary:       Audio Meta-Data Library
Version:       1.13.1
Release:       1
License:       LGPLv2 or MPLv1.1
URL:           https://taglib.org/
Source0:       https://github.com/%{name}/%{name}/archive/%{version}/%{name}-%{version}.tar.gz

BuildRequires: gcc gcc-c++ cmake pkgconfig zlib-devel

%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, WAV, AIFF, MP4 and ASF files.

%package devel
Summary:       Configuration files and link library files for %{name}
Requires:      %{name}%{?_isa} = %{version}-%{release}
%description devel
Files needed when building software with %{name}.

%package_help


%prep
%autosetup -n %{name}-%{version} -p1

%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake} .. -DCMAKE_BUILD_TYPE:STRING="Release"
popd

%make_build -C %{_target_platform}

%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}

%check
export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig
test "$(pkg-config --modversion taglib)" = "%{version}"
test "$(pkg-config --modversion taglib_c)" = "%{version}"

%ldconfig_scriptlets

%files
%defattr(-,root,root)
%doc AUTHORS
%license COPYING.LGPL COPYING.MPL
%{_libdir}/libtag*.so.*

%files devel
%defattr(-,root,root)
%{_bindir}/%{name}-config
%{_includedir}/%{name}/
%{_libdir}/libtag*.so
%{_libdir}/pkgconfig/taglib*.pc

%files help
%defattr(-,root,root)
%doc NEWS examples


%changelog
* Tue Aug 01 2023 wangqia <wangqia@uniontech.com> - 1.13.1-1
- update to 1.13.1

* Wed Feb 15 2023 liweiganga <liweiganga@uniontech.com> - 1.13-1
- update to 1.13

* Sat Sep 10 2022 tianlijing <tianlijing@kylinos.cn> - 1.12-1
- update to 1.12

* Tue Dec 24 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.11.1-12
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:change the path of AUTHORS

* Wed Nov 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.11.1-11
- Type: enhancement
- ID:   NA
- SUG:  NA
- DESC:modify devel's summary

* Mon Sep 09 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.11.1-10
- Type: enhancement
- ID:   NA
- SUG:  NA
- DESC: Add help package, remove bcond_without doc&test.

* Wed Aug 21 2019 cangyi<cangyi@huawei.com> - 1.11.1-9.h2
- Type: bugfix
- ID:   NA
- SUG:  NA
- DESC: format patches

* Mon Jun 03 2019 gaoyi<gaoyi15@huawei.com> - 1.11.1-9.h1
- Type: bugfix
- ID:   NA
- SUG:  NA
- DESC: backport CVE-2018-11439

* Mon Jun 03 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.11.1-8
- Package init
