A new user interface for you! Read more...

File taglib.spec of Package taglib

#
# spec file for package taglib
#
# Copyright (c) 2014 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# 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/
#


Name:           taglib
Version:        1.9.1
Release:        1.1
Summary:        Audio Meta-Data Library
License:        LGPL-2.1+ and MPL-1.1
Group:          Productivity/Multimedia/Other
Url:            http://taglib.github.io/
Source0:        http://taglib.github.io/releases/taglib-%{version}.tar.gz
Source1:        %{name}.desktop
Source100:      baselibs.conf
Patch1:         taglib-1.7.2-doxygen.patch
# Get example executables to build without rpath
Patch3:         taglib-1.8-strip-rpath.patch
# Fix build error with 11.4
Patch4:         taglib-1.9.1.uint.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  cmake >= 2.8
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  graphviz-gnome
BuildRequires:  libcppunit-devel
BuildRequires:  pkg-config
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
BuildRequires:  librcc-devel
BuildRequires:  zlib-devel
# 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}

%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.
This package contains built examples which manipulate tags from the
command line.

%package -n libtag1
Summary:        Audio Meta-Data Library
License:        LGPL-2.1+
Group:          System/Libraries
# Without this the old taglib package containing the libraries isn't removed when this package is installed.
# The only alternative is for the libraries to Require: taglib version-release, badness 440
Conflicts:      taglib <= 1.6.3

%description -n libtag1
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 -n libtag_c0
Summary:        Audio Meta-Data Library
License:        LGPL-2.1+
Group:          System/Libraries
# Without this the old taglib package containing the libraries isn't removed when this package is installed.
# The only alternative is for the libraries to Require: taglib version-release, badness 440
Conflicts:      taglib <= 1.6.3

%description -n libtag_c0
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 -n libtag-devel
Summary:        Development files for taglib
License:        LGPL-2.1+
Group:          Development/Libraries/C and C++
Requires:       libstdc++-devel
Requires:       libtag1 = %{version}-%{release}
Requires:       libtag_c0 = %{version}-%{release}
# taglib-devel was last used in openSUSE 11.4 (taglib-devel-1.6.2)
# The last taglib-devel used was version 1.6.3 from multimedia:libs.
Provides:       taglib-devel = %{version}
Obsoletes:      taglib-devel <= 1.6.3

%description -n libtag-devel
This package contains development files for taglib.

%prep
%setup -q
%patch1 -p1
%patch3
%patch4 -p1

%build
mkdir build
cd build
export CXXFLAGS="%{optflags} -D_GNU_SOURCE $(getconf LFS_CFLAGS)"
export CFLAGS="%{optflags} -D_GNU_SOURCE $(getconf LFS_CFLAGS)"
_libsuffix=$(echo %{_lib} | cut -b4-)
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
    -DBUILD_TESTS:BOOL=ON \
    -DLIB_SUFFIX=$_libsuffix \
    -DWITH_ASF:BOOL=ON \
    -DWITH_MP4:BOOL=ON \
    -DBUILD_EXAMPLES:BOOL=ON ..
make %{?_smp_mflags} VERBOSE=1
cd ..

doxygen -u
doxygen

%install
pushd build
make DESTDIR=%{buildroot} install
popd

# install susehelp file
mkdir -p %{buildroot}%{_datadir}/susehelp/meta/Development/Libraries/
install -pm 0644 %{SOURCE1} %{buildroot}%{_datadir}/susehelp/meta/Development/Libraries/

%if 0%{?suse_version}
%suse_update_desktop_file %{buildroot}%{_datadir}/susehelp/meta/Development/Libraries/%{name}.desktop
%endif

# Documentation
mkdir -p %{buildroot}%{_defaultdocdir}/libtag-devel
rm -f examples/CMake*
cp -a AUTHORS COPYING.LGPL COPYING.MPL NEWS doc/html/ examples/ %{buildroot}%{_defaultdocdir}/libtag-devel/

%fdupes -s %{buildroot}
# Add built examples to taglib package.
mkdir -p %{buildroot}%{_bindir}
for i in `find build/examples -maxdepth 1 ! -type d -executable`; do cp -v ${i} %{buildroot}%{_bindir}/; done

%check
# check the library
#pushd tests
#make check
#popd

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%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
%defattr(-,root,root,-)
%{_libdir}/libtag.so.1
%{_libdir}/libtag.so.1.*

%files -n libtag_c0
%defattr(-,root,root,-)
%{_libdir}/libtag_c.so.0
%{_libdir}/libtag_c.so.0.*

%files -n libtag-devel
%defattr(-,root,root,-)
%doc %{_defaultdocdir}/libtag-devel
%{_bindir}/taglib-config
%{_includedir}/taglib/
%{_libdir}/libtag*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/susehelp/

%files
%defattr(-,root,root,-)
%if 1 == 1
%{_bindir}/*
%exclude %{_bindir}/taglib-config
%else
%doc README.taglib
%endif

%changelog
* Fri May 16 2014 ohering@suse.de
- BuildRequire cmake >= 2.8
* Tue Apr 15 2014 olaf@aepfle.de
- Fix build error in 11.4
  taglib-1.9.1.uint.patch
* Wed Oct  9 2013 hrvoje.senjan@gmail.com
- Update to 1.9.1
  * Fixed binary incompatible change in TagLib::Map and TagLib::List.
  * Fixed constructing String from ByteVector.
  * Fixed compilation on MSVC with the /Zc:wchar_t- option.
  * Fixed detecting of RIFF files with invalid chunk sizes.
  * Added TagLib::MP4::PropertyMap::codec().
* Mon Oct  7 2013 hrvoje.senjan@gmail.com
- Update to 1.9
  * Added support for the Ogg Opus file format.
  * Added support for INFO tags in WAV files.
  * Changed FileStream to use Windows file API.
  * Included taglib-config.cmd script for Windows.
  * New ID3v1::Tag methods for working directly with
    genre numbers.
  * New MPEG::File methods for checking which tags are saved in
    the file.
  * Added support for the PropertyMap API to ASF and MP4 files.
  * Added MusicBrainz identifiers to the PropertyMap API.
  * Allowed reading of MP4 cover art without an explicitly
    specified format.
  * Better parsing of corrupted FLAC files.
  * Fixed saving of PropertyMap comments without description
    into ID3v2 tags.
  * Fixed crash when parsing certain XM files.
  * Fixed compilation of unit test with clang.
  * Better handling of files that can't be open or have
    read-only permissions.
  * Improved atomic reference counting.
  * New hookable API for debug messages.
  * More complete Windows install instructions.
  * Many smaller bug fixes and performance improvements.
- Dropped taglib-1.8-ds-rusxmms-r9.patch, not required anymore
- Dropped Added-check-if-file-is-open-before-attempting-to-rea.patch
  and taglib-1.8-version_fix.patch, merged upstream
* Fri Jun 21 2013 jslaby@suse.com
- Added-check-if-file-is-open-before-attempting-to-rea.patch: Added
  check if file is open before attempting to read tags (bnc#826228)
- Fixed Urls in .spec
* Sun Jun  9 2013 crrodriguez@opensuse.org
- JUst like the rest of the system, taglib has to be built
  with LFS support/ 64bit off_t in 32 bit archs.
* Thu May 23 2013 davejplater@gmail.com
- Added taglib-1.8-ds-rusxmms-r9.patch and deleted
  taglib-1.8-ds-rusxmms-r8.patch to fix the reopened bnc#814814
* Fri Apr 26 2013 davejplater@gmail.com
- Added taglib-1.8-ds-rusxmms-r8.patch which fixes bnc#814814
- Removed old taglib-1.8-ds-rusxmms-r4.patch
* Thu Apr 25 2013 davejplater@gmail.com
- Incorporated updated taglib-1.8-ds-rusxmms-r4.patch see bnc#814814
- Added built binary examples which manipulate tags from the command line
  to enable easier testing of libtag. These are in the taglib rpm.
- Created taglib-1.8-strip-rpath.patch to remove rpath from binaries.
* Mon Feb  4 2013 hessijames@gmail.com
- Replace taglib-1.6-ds-rusxmms.patch with
  taglib-1.8-ds-rusxmms-r2.patch: Update rusxmms patch to also work
  with non-Russian locale (bnc#780256).
* Mon Feb  4 2013 hessijames@gmail.com
- Update rusxmms patch to version taglib-1.8-ds-rusxmms-r2 in order to fix bnc#780256
* Fri Feb  1 2013 coolo@suse.com
- update license to new format
* Thu Nov  8 2012 klaussfreire@gmail.com
- Add patch taglib-1.8-version_fix.patch: fix version defines
  in taglib.h
* Thu Sep 13 2012 cgiboudeaux@gmx.com
- Update to 1.8
  * Added support for OWNE ID3 frames.
  * Changed key validation in the new PropertyMap API.
  * ID3v1::Tag::setStringHandler will no londer delete the previous handler, the caller is responsible for this.
  * File objects will also no longer delete the passed IOStream objects. It should be done in the caller code after the File object is no longer used.
  * Added ID3v2::Tag::setLatin1StringHandler for custom handling of latin1-encoded text in ID3v2 frames.
  * Fixed validation of ID3v2 frame IDs (IDs with ‘0’ were ignored).
  * New API for accessing tags by name.
  * New abstract I/O stream layer to allow custom I/O handlers.
  * Support for writing ID3v2.3 tags.
  * Support for various module file formats (MOD, S3M, IT, XM).
  * Support for MP4 and ASF is now enabled by default.
  * Started using atomic int operations for reference counting.
  * Added methods for checking if WMA and MP4 files are DRM-protected.
  * Added taglib_free to the C bindings.
  * New method to allow removing pictures from FLAC files.
  * Support for reading audio properties from ALAC and Musepack SV8 files.
  * Added replay-gain information to Musepack audio properties.
  * Support for APEv2 binary tags.
  * Many AudioProperties subclasses now provide information about the total number of samples.
  * Various small bug fixes.
- Drop taglib-noansiflags.patch (no longer relevant)
* Fri May 11 2012 vdziewiecki@suse.com
-Update to 1.7.2:
  * Fixed division by zero while parsing corrupted MP4 files (CVE-2012-2396).
  * Fixed compilation on Haiku.
  * Improved parsing of corrupted WMA, RIFF and OGG files.
  * Fixed a memory leak in the WMA parser.
  * Fixed a memory leak in the FLAC parser.
  * Fixed a possible division by zero in the APE parser.
  * Added detection of TTA2 files.
  * Fixed saving of multiple identically named tags to Vorbis Comments.
-Fixed a build failure related to doxygen.
* Thu May 10 2012 crrodriguez@opensuse.org
- Also, define GNU_SOURCE
* Thu May 10 2012 crrodriguez@opensuse.org
- No dont use -ansi gcc flag.
* Thu Mar  8 2012 avm-xandry@yandex.ru
- Add rusxmms patch to be fixed https://features.opensuse.org/313273
* Sat May 28 2011 davejplater@gmail.com
- Made taglib become a package again to satisfy the depencies of
  packages that still require it.
* Sat May 28 2011 davejplater@gmail.com
- Conflict the last version of taglib that contained the libraries
  from the library subpackages.
- Make sure the devel package obsoletes the last version of
  taglib-devel where the main package contained the libraries.
- taglib is the name of the srcrpm, moved docs to devel subpackage.
* Wed May 25 2011 coolo@novell.com
- obsolete the right version of taglib
* Mon May 23 2011 pascal.bleser@opensuse.org
- make taglib become a package again, that has only one duty, to require
  libtag1 and libtag_c0 for packages that still require taglib instead of
  the new package names libtag1 and libtag_c0
* Tue May 17 2011 asterios.dramis@gmail.com
- Update to version 1.7:
  * Fixed memory leaks in the FLAC file format parser.
  * Fixed bitrate calculation for WAV files.
  From 1.7 RC1
  * Support for reading/writing tags from Monkey's Audio files. (BUG:210404)
  * Support for reading/writing embedded pictures from WMA files.
  * Support for reading/writing embedded pictures from FLAC files (BUG:218696).
  * Implemented APE::Tag::isEmpty() to check for all APE tags, not just the
    basic ones.
  * Added reading of WAV audio length. (BUG:116033)
  * Exposed FLAC MD5 signature of the uncompressed audio stream via
    FLAC::Properties::signature(). (BUG:160172)
  * Added function ByteVector::toHex() for hex-encoding of byte vectors.
  * WavPack reader now tries to get the audio length by finding the final
    block, if the header doesn't have the information. (BUG:258016)
  * Fixed a memory leak in the ID3v2.2 PIC frame parser. (BUG:257007)
  * Fixed writing of RIFF files with even chunk sizes. (BUG:243954)
  * Fixed compilation on MSVC 2010.
  * Removed support for building using autoconf/automake.
  * API docs can be now built using "make docs".
- Spec file updates:
  * Changes based on openSUSE shared library packaging policy (added libtag1,
    libtag_c0 and libtag-devel packages, removed taglib and taglib-devel
    packages).
  * Changes based on spec-cleaner run.
  * Changed License: to LGPLv2.1+ ; MPLv1.1 ..
  * Updates in Group, Summary and %%description entries.
  * Added libcppunit-devel and pkg-config in BuildRequires.
  * Minor other updates.
- Updated taglib.desktop for susehelp to point to libtag-devel.
* Sat Feb 26 2011 toddrme2178@gmail.com
- update to version 1.6.3
  * Fixed definitions of the TAGLIB_WITH_MP4 and TAGLIB_WITH_ASF macros.
  * Fixed upgrading of ID3v2.3 genre frame with ID3v1 code 0 (Blues).
  * New method `int String::toInt(bool *ok)` which can return whether the conversion to a number was successful.
  * Fixed parsing of incorrectly written lengths in ID3v2 (affects mainly compressed frames).
* Sun Apr 11 2010 tittiatcoke@gmail.com
- update to version 1.6.2
  * Read Vorbis Comments from the first FLAC metadata block,
    if there are multipe ones.
  * Fixed a memory leak in FileRef's OGA format detection.
  * Fixed compilation with the Sun Studio compiler.
  * Handle WM/TrackNumber attributes with DWORD content in WMA files.
  * More strict check if something is a valid MP4 file.
  * Correctly save MP4 int-pair atoms with flags set to 0.
  * Fixed compilation of the test runner on Windows.
  * Store ASF attributes larger than 64k in the metadata library object.
  * Ignore trailing non-data atoms when parsing MP4 covr atoms.
  * Don't upgrade ID3v2.2 frame TDA to TDRC.
* Mon Feb  1 2010 jengelh@medozas.de
- Package baselibs.conf
* Wed Nov  4 2009 beineri@opensuse.org
- Update to version 1.6.1
  * Better detection of the audio codec of .oga files in FileRef.
  * Fixed saving of Vorbis comments to Ogg FLAC files. TagLib tried to
  include the Vorbis framing bit, which is only correct for Ogg Vorbis.
  * Public symbols now have explicitly set visibility to "default" on GCC.
  * Added missing exports for static ID3v1 functions.
  * Fixed a typo in taglib_c.pc
  * Fixed a failing test on ppc64.
  * Support for binary 'covr' atom in MP4 files. TagLib 1.6 treated them
  as text atoms, which corrupted them in some cases.
  * Fixed ID3v1-style genre to string conversion in MP4 files.
* Tue Sep 22 2009 tittiatcoke@gmail.com
- Update to version 1.6
  * New CMake option to build a static version - ENABLE_STATIC.
  * Added support for disabling dllimport/dllexport on Windows
    using the TAGLIB_STATIC macro.
  * Support for parsing the obsolete 'gnre' MP4 atom.
  * New cpp macros TAGLIB_WITH_MP4 and TAGLIB_WITH_ASF to determine
    if TagLib was built with MP4/ASF support.
  * Split Ogg packets larger than 64k into multiple pages.
  * TagLib can now use FLAC padding block.
  * ID3v2.2 frames are now not incorrectly saved.
  * Support for ID3v2.2 PIC frames.
  * Fixed a bug in ByteVectorList::split().
  * XiphComment::year() now falls back to YEAR if DATE doesn't exist
    and XiphComment::year() falls back to TRACKNUM if TRACKNUMBER
    doesn't exist.
  * Improved ID3v2.3 genre parsing.
  * Better checking of corrupted ID3v2 APIC data.
  * Bitrate calculating using the Xing header now uses floating
    point numbers.
  * New TagLib::String method rfind().
  * Added support for MP4 file format with iTunes-style metadata
  * Added support for ASF (WMA) file format.
  * Fixed crash when saving a Locator APEv2 tag.
  * Fixed a possible crash in the non-const version of String::operator[]
    and in String::operator+=.
  * Added support for PRIV ID3v2 frames.
  * Empty ID3v2 genres are no longer treated as numeric ID3v1 genres.
  * Added support for the POPM (rating/playcount) ID3v2 frame.
  * Generic RIFF file format support:
  * Support for AIFF files with ID3v2 tags.
  * Support for WAV files with ID3v2 tags.
  * Fixed crash on handling unsupported ID3v2 frames, e.g. on encrypted
    frames.
  * Fixed overflow while calculating bitrate of FLAC files with a very
    high bitrate
* Tue Mar 10 2009 coolo@suse.de
- fix build with new cmake
* Wed Jan  7 2009 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Thu Apr 10 2008 dmueller@suse.de
- fix build for older distros
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Sat Feb 23 2008 crrodriguez@suse.de
- build using Cmake
- update to version 1.5
  * Support for Mac OS X and Microsoft Windows
  * Distributed under the MPL (in addition to the previous LGPL license)
  * Added support for Speex files
  * Added support for TrueAudio files
  * Added support for WavPack files
  * Added support for ID3v2 general encapsulated object frames
  * Added support for ID3v2 unsynchronized lyrics frames
  * Added support for ID3v2 URL frames
  * Propper exports of all public classes / functions
  * Updated the APE::Item API to work with value lists
  * Added support to the FileRef class for new Xiph (Ogg) extensions
  * Made the samples per frame for MPEG headers accessible
  * Made MP3 Xing headers accessible
  * Prevent invalid encodings from being written to ID3v1 tags
  * Non-Latin1 ID3v2 text frames are automatically converted to UTF-8 on write (if they are not explicitly set to UTF-16)
  * Added support for reading ID3v2.2/3 unsynchronized tags
  * Made it possible to search for ID3v2 comment frames by description
  * Fixed a number of bugs in ID3v2 relative volume adjustment reading and writing
  * Added work arounds for iTunes writing invalid ID3v2 frame lengths
  * Added work arounds for iTunes not being able to correctly parse numerical ID3v2 genres
  * Added work arounds for iTunes putting non-text information in ID3v2 comment frames
  * Added a function to export strings to std::wstring
  * Added a function to check ASCII compatibility of strings
  * Added a function to check Latin1 compatibility of strings
* Wed Nov  7 2007 meissner@suse.de
- fixed gcc4.3 build
* Wed Aug  8 2007 crrodriguez@suse.de
- fix more issues:
  - this package does NOT require libjpeg-devel for build
  - after adding missing zlib-devel on BuildRequires in the
    previous checkin, libtool archives causes bloat.
* Tue Aug  7 2007 crrodriguez@suse.de
- run ldconfig instead of using deprecated macro
- move the docs to the devel packages
- use fdupes to avoid duplicate files
- run make check in the check section
* Fri Oct 20 2006 dmueller@suse.de
- fix build with automake 1.10
* Tue Sep 12 2006 dmueller@suse.de
- fix include's in installed headers
* Mon Jul  3 2006 cthiel@suse.de
- fix build
* Wed Jun 14 2006 dmueller@suse.de
- build parallel
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Nov 29 2005 ro@suse.de
- added fontconfig to nfb
* Mon Sep 26 2005 mls@suse.de
- make devel package require base package
* Wed Aug 10 2005 dmueller@suse.de
- fix filelist
* Tue Aug  9 2005 dmueller@suse.de
- don't package empty TODO file
* Thu Jul 28 2005 adrian@suse.de
- update to version 1.4
* Mon Nov  8 2004 adrian@suse.de
- update to version 1.3.1
  * 64bit OGG/Vorbis file lenght fixes
  * crash fixes with broken mp3 files
* Fri Oct  1 2004 adrian@suse.de
- fix susehelp entry for API documentation
* Fri Sep 10 2004 adrian@suse.de
- update to version 1.3
  * support for AOE tags and MPC files
  * compressed ID3v2 frame support
  * several checks for SIGFPE
* Wed Jul 28 2004 adrian@suse.de
- update to version 1.2
  * flac in ogg support
  * support for relativ volume adjustement
  * support for attached picture
* Sun Apr 18 2004 adrian@suse.de
- update to version 1.1
  * bugfixes
  * some more supported tag types
  * speed improvements
* Wed Jan 21 2004 adrian@suse.de
- update to version 1.0 final
- generate and install API documentation
* Mon Dec 15 2003 adrian@suse.de
- update to version 0.96 (beta 2)
* Thu Nov 13 2003 adrian@suse.de
- update to current HEAD, to get kdemultimedia compiling again
* Mon Nov  3 2003 adrian@suse.de
- package also taglib_c.so
* Mon Nov  3 2003 adrian@suse.de
- update to version 0.95 (beta 1)
* Thu Oct 30 2003 adrian@suse.de
- initial package from kdeextragear-2/taglib snapshot