8554d19
#global _with_tests 1
d5ddb74
#global _with_ffmpeg 1
d5ddb74
#global _with_ImageMagick 1
d5ddb74
d5ddb74
Name:       vapoursynth
d5ddb74
Version:    48
8554d19
Release:    5%{?dist}
8554d19
Summary:    Video processing framework with simplicity in mind
d5ddb74
License:    LGPLv2
d5ddb74
URL:        http://www.vapoursynth.com
d5ddb74
d5ddb74
Source0:    https://github.com/%{name}/%{name}/archive/R%{version}/%{name}-R%{version}.tar.gz
d5ddb74
Patch0:     %{name}-version-info.patch
d5ddb74
Patch1:     https://github.com/vapoursynth/vapoursynth/commit/a53ed4dda74d61d4cb56842dc0c6e6e7c3870e11.patch#/%{name}-python38.patch
d5ddb74
c7f8157
ExclusiveArch:  %{ix86} x86_64
c7f8157
d5ddb74
BuildRequires:  autoconf
d5ddb74
BuildRequires:  automake
d5ddb74
BuildRequires:  gcc-c++
d5ddb74
BuildRequires:  libtool
d5ddb74
BuildRequires:  nasm
d5ddb74
BuildRequires:  pkgconfig(python3)
d5ddb74
BuildRequires:  pkgconfig(tesseract)
d5ddb74
BuildRequires:  pkgconfig(zimg)
d5ddb74
BuildRequires:  python3-Cython
d5ddb74
BuildRequires:  python3-setuptools
d5ddb74
8554d19
%{?_with_tests:
8554d19
BuildRequires:  %{name}-devel
8554d19
BuildRequires:  python3dist(pytest)
8554d19
}
8554d19
d5ddb74
%{?_with_ImageMagick:
d5ddb74
BuildRequires:  pkgconfig(Magick++) >= 7.0
d5ddb74
}
d5ddb74
d5ddb74
%{?_with_ffmpeg:
d5ddb74
BuildRequires:  pkgconfig(libass)
d5ddb74
BuildRequires:  pkgconfig(libavcodec)
d5ddb74
BuildRequires:  pkgconfig(libavformat)
d5ddb74
BuildRequires:  pkgconfig(libavutil)
d5ddb74
}
d5ddb74
d5ddb74
%description
8554d19
VapourSynth is an application for video manipulation. Or a plugin. Or a library.
8554d19
It’s hard to tell because it has a core library written in C++ and a Python
8554d19
module to allow video scripts to be created.
d5ddb74
d5ddb74
8554d19
%package        libs
8554d19
Summary:        VapourSynth's core library with a C++ API
8554d19
Obsoletes:      lib%{name} < %{version}-%{release}
8554d19
Provides:       lib%{name} == %{version}-%{release}
8554d19
8554d19
%description    libs
d5ddb74
VapourSynth's core library with a C++ API.
d5ddb74
8554d19
8554d19
%package -n     python3-%{name}
8554d19
Summary:        Python interface for VapourSynth
d5ddb74
d5ddb74
%description -n python3-%{name}
d5ddb74
Python interface for VapourSynth/VSSCript.
d5ddb74
d5ddb74
8554d19
%package        devel
8554d19
Summary:        Development files for %{name}
8554d19
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
8554d19
8554d19
%description    devel
d5ddb74
Development files for %{name}.
d5ddb74
d5ddb74
8554d19
%package        tools
8554d19
Summary:        Extra tools for VapourSynth
8554d19
8554d19
%description    tools
d5ddb74
This package contains the vspipe tool for interfacing with VapourSynth.
d5ddb74
d5ddb74
8554d19
%package        plugins
8554d19
Summary:        VapourSynth plugins
8554d19
Requires:       libvapoursynth%{?_isa} = %{version}-%{release}
8554d19
8554d19
%description    plugins
d5ddb74
VapourSynth plugins.
d5ddb74
8554d19
d5ddb74
%prep
d5ddb74
%autosetup -p1 -n %{name}-R%{version}
d5ddb74
8554d19
d5ddb74
%build
d5ddb74
autoreconf -vif
d5ddb74
%configure \
d5ddb74
    --disable-static \
d5ddb74
    --enable-x86-asm \
d5ddb74
    --enable-core \
d5ddb74
    --enable-vsscript \
d5ddb74
    --enable-vspipe \
d5ddb74
    --enable-python-module \
d5ddb74
    --enable-eedi3 \
d5ddb74
    --%{?_with_ImageMagick:enable}%{!?_with_ImageMagick:disable}-imwri \
d5ddb74
    --enable-miscfilters \
d5ddb74
    --enable-morpho \
d5ddb74
    --enable-ocr \
d5ddb74
    --enable-removegrain \
d5ddb74
    --%{?_with_ffmpeg:enable}%{!?_with_ffmpeg:disable}-subtext \
d5ddb74
    --enable-vinverse \
d5ddb74
    --enable-vivtc \
d5ddb74
d5ddb74
%make_build
d5ddb74
8554d19
d5ddb74
%install
d5ddb74
%py3_install
d5ddb74
%make_install
d5ddb74
find %{buildroot} -type f -name "*.la" -delete
d5ddb74
d5ddb74
# Let RPM pick up docs in the files section
d5ddb74
rm -fr %{buildroot}%{_docdir}/%{name}
d5ddb74
d5ddb74
%ldconfig_scriptlets libs
d5ddb74
%ldconfig_scriptlets -n python3-%{name}
d5ddb74
8554d19
8554d19
%{?_with_tests:
8554d19
%check
8554d19
%{python3} -m pytest -v
8554d19
}
8554d19
8554d19
d5ddb74
%files libs
d5ddb74
%doc ChangeLog
d5ddb74
%license COPYING.LGPLv2.1 ofl.txt
d5ddb74
%dir %{_libdir}/%{name}
d5ddb74
%{_libdir}/lib%{name}.so.*
d5ddb74
%{_libdir}/lib%{name}-script.so.*
d5ddb74
d5ddb74
%files -n python3-%{name}
d5ddb74
%{python3_sitearch}/%{name}.so
d5ddb74
%{python3_sitearch}/VapourSynth-*.egg-info
d5ddb74
d5ddb74
%files devel
8554d19
%{_includedir}/%{name}/
d5ddb74
%{_libdir}/lib%{name}.so
d5ddb74
%{_libdir}/lib%{name}-script.so
d5ddb74
%{_libdir}/pkgconfig/%{name}.pc
d5ddb74
%{_libdir}/pkgconfig/%{name}-script.pc
d5ddb74
d5ddb74
%files tools
d5ddb74
%{_bindir}/vspipe
d5ddb74
d5ddb74
%files plugins
d5ddb74
%{_libdir}/%{name}/lib*.so
d5ddb74
8554d19
d5ddb74
%changelog
8554d19
* Tue Feb 25 2020 Artem Polishchuk <ego.cordatus@gmail.com> - 48-5
8554d19
- Add tests
8554d19
- Cosmetic spec file improvements
8554d19
d5ddb74
* Thu Feb 20 2020 Simone Caronni <negativo17@gmail.com> - 48-4
d5ddb74
- More review fixes.
d5ddb74
- Use upstream patch for Python 3.8.
d5ddb74
d5ddb74
* Fri Feb 07 2020 Simone Caronni <negativo17@gmail.com> - 48-3
d5ddb74
- Review fixes.
d5ddb74
d5ddb74
* Sun Jan 26 2020 Simone Caronni <negativo17@gmail.com> - 48-2
d5ddb74
- Move script library into main library package.
d5ddb74
- Fix build with Python 3.8.
d5ddb74
d5ddb74
* Thu Jan 16 2020 Simone Caronni <negativo17@gmail.com> - 48-1
d5ddb74
- First build.