File faac.spec of Package faac

#
# spec file for package faac
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2013 Marguerite Su <marguerite@opensuse.org>
#
# 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 major     0
%define lib       libfaac
%define libname   %{lib}%{major}
%define _version  1_30

Name:           faac
Version:        1.30
Release:        0
Summary:        Frontend for encoding MPEG2/4 AAC
# Original Code was free to use but restricted. Modifications are LGPL-2.1+
License:        SUSE-Freeware and LGPL-2.1+
Group:          Productivity/Multimedia/Video/Editors and Convertors
Url:            https://github.com/knik0/faac
Source0:        https://github.com/knik0/faac/archive/%{_version}/%{name}-%{version}.tar.gz
Source99:       baselibs.conf
BuildRequires:  gcc-c++
BuildRequires:  gnome-common
Requires:       %{libname} = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
FAAC is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC encoder, completely
written from scratch.

%package -n %{libname}
Summary:        Shared library part of faac
Group:          System/Libraries
Provides:       %{lib} = %{version}
Obsoletes:      %{lib} < %{version}

%description -n %{libname}
FAAC is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC encoder, completely
written from scratch.
Shared library part of faac

%package -n %{lib}-devel
Summary:        Header files and static library for the faac library
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}
Provides:       %{libname}-devel = %{version}
Provides:       %{name}-devel = %{version}
Obsoletes:      %{libname}-devel < %{version}
Obsoletes:      %{name}-devel < %{version}

%description -n %{lib}-devel
FAAC is a LC, MAIN and LTP profile, MPEG2 and MPEG-4 AAC encoder, completely
written from scratch.
Header files and static library for the faac library

%prep
%setup -q -n %{name}-%{_version}

%build
autoreconf -fi
%configure --enable-shared \
           --disable-static
%make_build

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print

%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

%files
%defattr(-, root, root)
%doc AUTHORS ChangeLog NEWS README TODO
%license COPYING
%{_bindir}/*
%{_mandir}/man1/faac.1%{ext_man}

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

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

%changelog