%global gituser FFMS %global gitname ffms2 %global commit 129952a9e2a0ef6d1dd9c1f94324bedf642af36e %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: ffms2 Version: 2.22 Release: 3%{?dist} Summary: Cross-platform wrapper library around FFmpeg/libav License: MIT and GPLv2+ URL: https://github.com/FFMS/ffms2 Source0: https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: autoconf BuildRequires: automake BuildRequires: pkgconfig BuildRequires: libtool BuildRequires: ffmpeg-devel BuildRequires: zlib-devel %description FFmpegSource (usually known as FFMS or FFMS2) is a cross-platform wrapper library around FFmpeg/libav. It gives you an easy, convenient way to say "open and decompress this media file for me, I don't care how you do it" and get frame- and sample-accurate access (usually), without having to bother with the sometimes less than straightforward and less than perfectly documented libav API. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %autosetup %build %configure --disable-static --disable-rpath #the flag --disable-rpath doesn't work :( so we need to fix the local libtool sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %make_build %install rm -rf %{buildroot} %make_install find %{buildroot} -name '*.la' -exec rm -f {} ';' rm -f %{buildroot}/usr/share/doc/ffms2/ffms2-api.md rm -f %{buildroot}/usr/share/doc/ffms2/ffms2-changelog.md %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %license COPYING %doc README.md %{_libdir}/*.so.* %{_bindir}/ffmsindex %files devel %doc doc/* %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/%{name}.pc %changelog * Fri Sep 9 2016 Michal Ambroz - 2.22-1 - initial build for Fedora