File ffmpeg-ma.spec of Package ffmpeg-ma

# Copyright (c) 2020 info@mediaarea.net
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.

# norootforbuild

Name:           ffmpeg-ma
Version:        20201025git
Release:        1
Summary:        FFmpeg binary with patches from MediaArea.net
Group:          Productivity/Multimedia/Other
License:        GPL-3.0-or-later
URL:            https://mediaarea.net
Source0:        ffmpeg-ma-%{version}.tar.bz2
Prefix:         %{_prefix}
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  gcc
BuildRequires:  pkgconfig
BuildRequires:  automake
BuildRequires:  autoconf
BuildRequires:  zlib-devel
%description
FFmpeg binary with patches from MediaArea.net

%prep
%setup -q -n sources

%build

# build
pushd yasm
    ./configure --prefix="$(pwd)/output"
    %__make install
popd
pushd freetype
    ./configure --prefix="$(pwd)/output" --without-zlib --without-bzip2 --without-png --without-harfbuzz --enable-static --disable-shared CFLAGS=-fPIC
    %__make install
popd

./configure --enable-gpl --enable-version3 --enable-static --disable-shared --enable-debug --disable-ffplay --disable-ffprobe --disable-doc --extra-cflags=-Ifreetype/include --extra-libs=freetype/output/lib/libfreetype.a --x86asmexe=yasm/output/bin/yasm

%install
%__make
%__install -D -m 0755 ffmpeg_g %{buildroot}/%{_bindir}/ffmpeg-ma

%clean
[ -d "%{buildroot}" -a "%{buildroot}" != "" ] && %__rm -rf "%{buildroot}"

%files
%defattr(-,root,root,-)
%{_bindir}/ffmpeg-ma

%changelog