File libmatroska.spec of Package libmatroska

#
# spec file for package libmatroska (Version 1.0.0)
#
# Copyright (c) 2010 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/
#


%define soname 2

Name:           libmatroska
Version:        1.0.0
Release:        3
License:        LGPLv2.1+
Summary:        Library to Deal with Matroska Files
Url:            http://dl.matroska.org/downloads/%{name}/
Group:          Development/Libraries/Other
Source0:        http://dl.matroska.org/downloads/%{name}/%{name}-%{version}.tar.bz2
Source1:        baselibs.conf
BuildRequires:  gcc-c++
BuildRequires:  libebml-devel >= 1.0.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Libmatroska is a C++ library to parse Matroska files (.mkv and .mka).
It depends on libebml to work. You only need this package to compile
your own applications.

%package -n %{name}%{soname}

License:        LGPLv2.1+
Summary:        Library to Deal with Matroska Files
Group:          Development/Libraries/Other

%description -n %{name}%{soname}
Libmatroska is a C++ library to parse Matroska files (.mkv and .mka).
It depends on libebml to work. You only need this package to compile
your own applications.

%package -n %{name}-devel

License:        LGPLv2.1+
Summary:        Library to Deal with Matroska Files
Group:          Development/Libraries/Other
Requires:       %{name}%{soname} = %{version}
Requires:       libebml-devel

%description -n %{name}-devel
Libmatroska is a C++ library to parse Matroska files (.mkv and .mka).
It depends on libebml to work. You only need this package to compile
your own applications.

%prep
%setup -q
FAKE_BUILDTIMESTAMP=$(LC_ALL=C date -r %{_sourcedir}/%{name}.changes '+%a %b %e %H:%M:%S %Y')
sed -i "s/__TIMESTAMP__/\"$FAKE_BUILDTIMESTAMP\"/" matroska/KaxVersion.h

%build
cd make/linux
%{__make} %{?jobs:-j%jobs} CXXFLAGS='%{optflags}' sharedlib

%install
cd make/linux
%{__make} libdir=%{buildroot}%{_libdir} includedir=%{buildroot}%{_includedir}/matroska install_sharedlib install_headers

%clean
%{__rm} -rf %{buildroot}

%post -n %{name}%{soname} -p /sbin/ldconfig

%postun -n %{name}%{soname} -p /sbin/ldconfig

%files -n %{name}%{soname}
%defattr (-,root,root)
%{_libdir}/%{name}.so.%{soname}

%files -n %{name}-devel
%defattr (-,root,root)
%{_libdir}/%{name}.so
%{_includedir}/matroska

%changelog
openSUSE Build Service is sponsored by