File toolame.spec of Package toolame

#
# spec file for package toolame
#
# Copyright (c) 2018 SUSE LINUX 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:           toolame
Version:        0.2l
Release:        0
%global short_version 02l
Summary:        An Optimized MPEG Audio 1/2 Layer 2 Encoder
License:        LGPL-2.1
Group:          Productivity/Multimedia/Sound/Editors and Convertors
Url:            http://%{name}.sourceforge.net/
Source0:        %{name}-%{short_version}.tar.xz
Patch0:         %{name}-makefile.patch
%if 0%{?suse_version} > 1500
BuildRequires:  gcc7
BuildRequires:  gcc7-c++
%endif

%package doc
Summary:        Documentation for %{name}
Group:          Documentation/Man
BuildArch:      noarch
Requires:       %{name} = %{version}

%description
tooLAME is an optimized MPEG Audio 1/2 Layer 2 encoder. It is based heavily on
- the ISO dist10 code
- improvement to algorithms as part of the LAME project (www.sulaco.org/mp3)
- work by myself and other contributors (see CONTRIBUTORS)

%description doc
This package contains the documentation for %{name}.

%prep
%setup -q -n %{name}-%{short_version}
%patch -P 0

%build
%if 0%{?suse_version} > 1500
export CC="gcc-7"
export CXX="g++-7"
%endif
%make_build
%{__strip} -s %{name}

%install
%{__mkdir_p} %{buildroot}%{_bindir}
%{__install} -m 0755 -p -t %{buildroot}%{_bindir} %{name}

%files
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/%{name}

%files doc
%defattr(-,root,root,-)
%doc FUTURE HISTORY README html/ text/
%license LGPL.txt

%changelog
openSUSE Build Service is sponsored by