File libid3tag.spec of Package libid3tag

# spec file for package libid3tag
# Copyright (c) 2011 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

# norootforbuild

Name:           libid3tag
BuildRequires:  gperf zlib-devel
BuildRequires:  pkg-config
BuildRequires:  libtool
Summary:        ID3 Tag Manipulation Library
Version:        0.15.1b
Release:        169
Group:          System/Libraries
License:        GPL-2.0+
Source:         %{name}-%{version}.tar.bz2
Patch:          libid3tag-noweak.dif
Patch1:         libid3tag-gperf.dif
Patch2:         libid3tag-0.15.1b-mb.diff
Patch3:         libid3tag-automake-fix.dif
Patch4:         libid3tag-optflags.patch
Patch5:         libid3tag-0.15.1b-fix_overflow.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

libid3tag is a library for reading and writing ID3 tags, both ID3v1 and
the various versions of ID3v2.

%package devel
License:        GPL-2.0+
Summary:        Development package for libid3tag library
Group:          Development/Libraries/C and C++
Requires:       libid3tag = %version zlib-devel

%description devel
This package contains the header files and static libraries needed to
develop applications with libid3tag.

%setup -q

autoreconf -fi
%configure --disable-static
make %{?jobs:-j %jobs}
echo -e "prefix=%_prefix\nexec_prefix=%_prefix\nlibdir=%_libdir\nincludedir=%_includedir\nName: id3tag\nDescription: ID3 tag library\nRequires:\nVersion: %version\nLibs: -L%_libdir -lid3tag\nLibs.private: -lz\nCflags: -I%_includedir\n" > id3tag.pc

install -m 644 -D id3tag.pc %{buildroot}%{_libdir}/pkgconfig/id3tag.pc
rm -f $RPM_BUILD_ROOT%{_libdir}/libid3tag*.*a

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT


%files devel