libvpx/libvpx.spec

418 lines
13 KiB
RPMSpec
Raw Normal View History

%global somajor 5
2015-04-06 19:30:29 +00:00
%global sominor 0
%global sotiny 0
%global soversion %{somajor}.%{sominor}.%{sotiny}
2012-05-29 21:09:27 +00:00
2010-05-21 15:21:15 +00:00
Name: libvpx
2016-07-22 16:09:34 +00:00
Summary: VP8/VP9 Video Codec SDK
Version: 1.7.0
Release: 5%{?dist}
2010-05-21 15:21:15 +00:00
License: BSD
Group: System Environment/Libraries
2017-01-16 18:22:16 +00:00
#Source0: http://downloads.webmproject.org/releases/webm/%{name}-%{version}.tar.bz2
Source0: https://github.com/webmproject/libvpx/archive/v%{version}.tar.gz
Source1: vpx_config.h
2010-06-24 19:04:55 +00:00
# Thanks to debian.
Source2: libvpx.ver
URL: http://www.webmproject.org/code/
2010-05-21 15:21:15 +00:00
%ifarch %{ix86} x86_64
BuildRequires: yasm
%endif
2015-09-15 17:13:32 +00:00
BuildRequires: doxygen, php-cli, perl(Getopt::Long)
# Do not disable FORTIFY_SOURCE=2
Patch0: libvpx-1.7.0-leave-fortify-source-on.patch
2018-01-17 09:01:09 +00:00
2010-05-21 15:21:15 +00:00
%description
2016-07-22 16:09:34 +00:00
libvpx provides the VP8/VP9 SDK, which allows you to integrate your applications
with the VP8 and VP9 video codecs, high quality, royalty free, open source codecs
2010-05-21 15:21:15 +00:00
deployed on millions of computers and devices worldwide.
%package devel
Summary: Development files for libvpx
Group: Development/Libraries
2012-01-30 18:42:20 +00:00
Requires: %{name}%{?_isa} = %{version}-%{release}
2010-05-21 15:21:15 +00:00
%description devel
Development libraries and headers for developing software against
libvpx.
%package utils
Summary: VP8 utilities and tools
Group: Development/Tools
2012-01-30 18:42:20 +00:00
Requires: %{name}%{?_isa} = %{version}-%{release}
2010-05-21 15:21:15 +00:00
%description utils
A selection of utilities and tools for VP8, including a sample encoder
and decoder.
%prep
2015-12-01 21:01:52 +00:00
%setup -q -n libvpx-%{version}
%patch0 -p1 -b .leave-fs-on
2010-05-21 15:21:15 +00:00
%build
%ifarch %{ix86}
%global vpxtarget x86-linux-gcc
%else
%ifarch x86_64
%global vpxtarget x86_64-linux-gcc
%else
2014-02-11 17:51:04 +00:00
%ifarch armv7hl
2014-02-11 19:24:15 +00:00
%global vpxtarget armv7-linux-gcc
2014-02-11 17:51:04 +00:00
%else
%ifarch aarch64
%global vpxtarget arm64-linux-gcc
%else
2010-05-21 15:21:15 +00:00
%global vpxtarget generic-gnu
%endif
%endif
2014-02-11 17:51:04 +00:00
%endif
%endif
2010-05-21 15:21:15 +00:00
# History: The configure script used to reject the shared flag on the generic target.
# This meant that we needed to fall back to manual shared lib creation.
# However, the modern configure script permits the shared flag and assumes ELF.
# Additionally, the libvpx.ver would need to be updated to work properly.
# As a result, we disable this universally, but keep it around in case we ever need to support
# something "special".
2010-06-24 19:04:55 +00:00
%if "%{vpxtarget}" == "generic-gnu"
%global generic_target 0
2010-06-24 19:04:55 +00:00
%else
%global generic_target 0
%endif
# only found in Fedora 28+
%if 0%{?fedora} >= 28
%set_build_flags
%endif
2014-02-11 19:24:15 +00:00
%ifarch armv7hl
CROSS=armv7hl-redhat-linux-gnueabi- CHOST=armv7hl-redhat-linux-gnueabi-hardfloat ./configure \
%else
./configure --target=%{vpxtarget} \
%endif
2015-04-06 20:53:32 +00:00
%ifarch %{arm}
--disable-neon --disable-neon_asm \
%endif
2014-02-11 19:24:15 +00:00
--enable-pic --disable-install-srcs \
--enable-vp9-decoder --enable-vp9-encoder \
--enable-experimental --enable-spatial-svc \
--enable-vp9-highbitdepth \
2010-06-24 19:04:55 +00:00
%if ! %{generic_target}
--enable-shared \
%endif
--enable-install-srcs \
2015-09-15 15:49:23 +00:00
--prefix=%{_prefix} --libdir=%{_libdir} --size-limit=16384x16384
2010-05-21 15:21:15 +00:00
# Hack our optflags in.
2010-06-24 14:04:47 +00:00
sed -i "s|-O3|%{optflags}|g" libs-%{vpxtarget}.mk
sed -i "s|-O3|%{optflags}|g" examples-%{vpxtarget}.mk
sed -i "s|-O3|%{optflags}|g" docs-%{vpxtarget}.mk
2010-05-21 15:21:15 +00:00
2014-02-11 19:24:15 +00:00
%ifarch armv7hl
#hackety hack hack
sed -i "s|AR=armv7hl-redhat-linux-gnueabi-ar|AR=ar|g" libs-%{vpxtarget}.mk
sed -i "s|AR=armv7hl-redhat-linux-gnueabi-ar|AR=ar|g" examples-%{vpxtarget}.mk
sed -i "s|AR=armv7hl-redhat-linux-gnueabi-ar|AR=ar|g" docs-%{vpxtarget}.mk
sed -i "s|AS=armv7hl-redhat-linux-gnueabi-as|AS=as|g" libs-%{vpxtarget}.mk
sed -i "s|AS=armv7hl-redhat-linux-gnueabi-as|AS=as|g" examples-%{vpxtarget}.mk
sed -i "s|AS=armv7hl-redhat-linux-gnueabi-as|AS=as|g" docs-%{vpxtarget}.mk
sed -i "s|NM=armv7hl-redhat-linux-gnueabi-nm|NM=nm|g" libs-%{vpxtarget}.mk
sed -i "s|NM=armv7hl-redhat-linux-gnueabi-nm|NM=nm|g" examples-%{vpxtarget}.mk
sed -i "s|NM=armv7hl-redhat-linux-gnueabi-nm|NM=nm|g" docs-%{vpxtarget}.mk
%endif
2015-04-06 19:30:29 +00:00
make %{?_smp_mflags} verbose=true
2010-05-21 15:21:15 +00:00
2010-06-24 19:04:55 +00:00
# Manual shared library creation
# We should never need to do this anymore, and if we do, we need to fix the version-script.
%if %{generic_target}
2010-06-24 19:04:55 +00:00
mkdir tmp
cd tmp
ar x ../libvpx_g.a
cd ..
2015-04-06 19:30:29 +00:00
gcc -fPIC -shared -pthread -lm -Wl,--no-undefined -Wl,-soname,libvpx.so.%{somajor} -Wl,--version-script,%{SOURCE2} -Wl,-z,noexecstack -o libvpx.so.%{soversion} tmp/*.o
2010-06-24 19:04:55 +00:00
rm -rf tmp
%endif
2010-05-21 15:21:15 +00:00
# Temporarily dance the static libs out of the way
2015-04-06 19:30:29 +00:00
# mv libvpx.a libNOTvpx.a
# mv libvpx_g.a libNOTvpx_g.a
2010-05-21 15:21:15 +00:00
# We need to do this so the examples can link against it.
2015-04-06 19:30:29 +00:00
# ln -sf libvpx.so.%{soversion} libvpx.so
2010-05-21 15:21:15 +00:00
2015-04-06 19:30:29 +00:00
# make %{?_smp_mflags} verbose=true target=examples CONFIG_SHARED=1
# make %{?_smp_mflags} verbose=true target=docs
2010-05-21 15:21:15 +00:00
# Put them back so the install doesn't fail
2015-04-06 19:30:29 +00:00
# mv libNOTvpx.a libvpx.a
# mv libNOTvpx_g.a libvpx_g.a
2010-05-21 15:21:15 +00:00
%install
2010-06-24 14:04:47 +00:00
make DIST_DIR=%{buildroot}%{_prefix} dist
2010-05-21 15:21:15 +00:00
# Simpler to label the dir as %%doc.
2015-09-15 17:27:12 +00:00
if [ -d %{buildroot}/usr/docs ]; then
mv %{buildroot}/usr/docs doc/
fi
2010-05-21 15:21:15 +00:00
# Again, we should never need to do this anymore.
2010-06-24 19:04:55 +00:00
%if %{generic_target}
install -p libvpx.so.%{soversion} %{buildroot}%{_libdir}
2010-06-24 19:04:55 +00:00
pushd %{buildroot}%{_libdir}
ln -sf libvpx.so.%{soversion} libvpx.so
2015-04-06 19:30:29 +00:00
ln -sf libvpx.so.%{soversion} libvpx.so.%{somajor}
ln -sf libvpx.so.%{soversion} libvpx.so.%{somajor}.%{sominor}
2010-06-24 19:04:55 +00:00
popd
%endif
2010-05-21 15:21:15 +00:00
pushd %{buildroot}
# Stuff we don't need.
rm -rf usr/build/ usr/md5sums.txt usr/lib*/*.a usr/CHANGELOG usr/README
2015-04-06 19:30:29 +00:00
# No, bad google. No treat.
mv usr/bin/examples/* usr/bin/
rm -rf usr/bin/examples
2010-05-21 15:21:15 +00:00
# Rename a few examples
2010-06-24 14:04:47 +00:00
mv usr/bin/postproc usr/bin/vp8_postproc
2010-05-21 15:21:15 +00:00
mv usr/bin/simple_decoder usr/bin/vp8_simple_decoder
mv usr/bin/simple_encoder usr/bin/vp8_simple_encoder
mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder
# Fix the binary permissions
chmod 755 usr/bin/*
popd
# Get the vpx_config.h file
%ifarch %{arm}
cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-arm.h
%else
# Does ppc64le need its own?
%ifarch ppc64 ppc64le
cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-ppc64.h
%else
%ifarch s390 s390x
cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-s390.h
%else
%ifarch %{ix86}
cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-x86.h
%else
cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-%{_arch}.h
%endif
%endif
%endif
%endif
cp %{SOURCE1} %{buildroot}%{_includedir}/vpx/vpx_config.h
# for timestamp sync
touch -r AUTHORS %{buildroot}%{_includedir}/vpx/vpx_config.h
mv %{buildroot}%{_prefix}/src/vpx_dsp %{buildroot}%{_includedir}/
mv %{buildroot}%{_prefix}/src/vpx_mem %{buildroot}%{_includedir}/
mv %{buildroot}%{_prefix}/src/vpx_ports %{buildroot}%{_includedir}/
mv %{buildroot}%{_prefix}/src/vpx_scale %{buildroot}%{_includedir}/
rm -rf %{buildroot}%{_prefix}/src
%ldconfig_scriptlets
2010-05-21 15:21:15 +00:00
%files
%license LICENSE
%doc AUTHORS CHANGELOG README
2010-05-21 15:21:15 +00:00
%{_libdir}/libvpx.so.*
%files devel
# These are SDK docs, not really useful to an end-user.
2010-09-01 21:06:23 +00:00
%doc docs/html/
2010-05-21 15:21:15 +00:00
%{_includedir}/vpx/
%{_includedir}/vpx_dsp/
%{_includedir}/vpx_mem/
%{_includedir}/vpx_ports/
%{_includedir}/vpx_scale/
2011-08-09 18:31:28 +00:00
%{_libdir}/pkgconfig/vpx.pc
2010-05-21 15:21:15 +00:00
%{_libdir}/libvpx.so
%files utils
%{_bindir}/*
%changelog
* Mon Feb 12 2018 Tom Callaway <spot@fedoraproject.org> - 1.7.0-5
- properly set build flags in rawhide (bz1543819)
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Feb 3 2018 Tom Callaway <spot@fedoraproject.org> - 1.7.0-3
- package more files (for firefox)
- setup vpx_config.h for multilib
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.7.0-2
- Switch to %%ldconfig_scriptlets
* Fri Jan 26 2018 Tom Callaway <spot@fedoraproject.org> - 1.7.0-1
- update to 1.7.0 (ABI change)
2018-01-17 09:01:09 +00:00
* Wed Jan 17 2018 Wim Taymans <wtaymans@wredhat.com> - 1.6.1-5
- fix for CVE-2017-13194
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2017-01-16 18:22:16 +00:00
* Mon Jan 16 2017 Tom Callaway <spot@fedoraproject.org> - 1.6.1-1
- update to 1.6.1
* Thu Jan 12 2017 Tom Callaway <spot@fedoraproject.org> - 1.6.0-2
- enable vp9-highbitdepth (thanks to mike@cchtml.com)
2016-07-22 16:09:34 +00:00
* Fri Jul 22 2016 Tom Callaway <spot@fedoraproject.org> - 1.6.0-1
- update to 1.6.0
* Wed Mar 16 2016 Tom Callaway <spot@fedoraproject.org> - 1.5.0-4
- disable generic_target conditional universally (bz1311125)
* Tue Mar 8 2016 Tom Callaway <spot@fedoraproject.org> - 1.5.0-3
- enable-experimental and enable-spatial-svc
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2015-12-01 21:01:52 +00:00
* Tue Dec 1 2015 Tom Callaway <spot@fedoraproject.org> - 1.5.0-1
- update to 1.5.0
2015-09-21 13:26:23 +00:00
* Mon Sep 21 2015 Tom Callaway <spot@fedoraproject.org> - 1.4.0-6
- remove exit 0
2015-09-15 15:49:23 +00:00
* Tue Sep 15 2015 Tom Callaway <spot@fedoraproject.org> - 1.4.0-5
- set --size-limit=16384x16384 to avoid CVE-2015-1258
* Mon Jul 27 2015 Kalev Lember <klember@redhat.com> - 1.4.0-4
- Package review fixes (#1225648)
- Update URL
- Use license macro
- Escape a commented out macro
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2015-05-02 13:36:06 +00:00
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.4.0-2
- Rebuilt for GCC 5 C++11 ABI change
2015-04-06 19:30:29 +00:00
* Mon Apr 6 2015 Tom Callaway <spot@fedoraproject.org> - 1.4.0-1
- update to 1.4.0
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu Mar 20 2014 Wim Taymans <wtaymans@redhat.com> - 1.3.0-4
- fix Illegal Instruction abort
* Thu Feb 13 2014 Dan Horák <dan[at]danny.cz> - 1.3.0-3
- update library symbol list for 1.3.0 from Debian
2014-02-11 17:51:04 +00:00
* Tue Feb 11 2014 Tom Callaway <spot@fedoraproject.org> - 1.3.0-2
- armv7hl specific target
* Tue Feb 11 2014 Tom Callaway <spot@fedoraproject.org> - 1.3.0-1
- update to 1.3.0
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
2013-02-28 17:58:23 +00:00
* Thu Feb 28 2013 Tom Callaway <spot@fedoraproject.org> - 1.2.0-1
- update to 1.2.0
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2012-05-29 21:09:27 +00:00
* Tue May 29 2012 Tom Callaway <spot@fedoraproject.org> - 1.1.0-1
- update to 1.1.0
2012-05-29 14:52:22 +00:00
* Tue May 29 2012 Tom Callaway <spot@fedoraproject.org> - 1.0.0-3
- fix vpx.pc file to include -lm (bz825754)
* Fri May 11 2012 Tom Callaway <spot@fedoraproject.org> - 1.0.0-2
- use included vpx.pc file (drop local libvpx.pc)
- apply upstream fix to vpx.pc file (bz 814177)
2012-01-30 18:42:20 +00:00
* Mon Jan 30 2012 Tom Callaway <spot@fedoraproject.org> - 1.0.0-1
- update to 1.0.0
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.7.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Oct 10 2011 Dan Horák <dan[at]danny.cz> - 0.9.7.1-3
- use macro instead of hard-coded version
2011-09-12 08:54:27 +00:00
* Mon Sep 12 2011 Dan Horák <dan[at]danny.cz> - 0.9.7.1-2
- fix build on generic targets
2011-08-16 19:23:35 +00:00
* Tue Aug 16 2011 Adam Jackson <ajax@redhat.com> 0.9.7.1-1
- libvpx 0.9.7-p1
2011-08-09 18:31:28 +00:00
* Tue Aug 09 2011 Adam Jackson <ajax@redhat.com> 0.9.7-1
- libvpx 0.9.7
* Mon Mar 21 2011 Dan Horák <dan[at]danny.cz> - 0.9.6-2
- add 2 symbols to the shared library for generic targets
2011-03-10 19:42:04 +00:00
* Thu Mar 10 2011 Tom Callaway <spot@fedoraproject.org> - 0.9.6-1
- update to 0.9.6
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Nov 17 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.5-2
- apply patch from upstream git (Change I6266aba7), should resolve CVE-2010-4203
2010-11-01 20:12:04 +00:00
* Mon Nov 1 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.5-1
- update to 0.9.5
2010-09-01 21:06:23 +00:00
* Wed Sep 1 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.1-3
- only package html docs to avoid multilib conflict (bz 613185)
2010-06-24 19:04:55 +00:00
* Thu Jun 24 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.1-2
- build shared library the old way for generic arches
2010-06-24 14:04:47 +00:00
* Thu Jun 24 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.1-1
- update to 0.9.1
* Fri Jun 11 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-7
- update to git revision 8389f1967c5f8b3819cca80705b1b4ba04132b93
- upstream fix for bz 599147
- proper shared library support
* Wed Jun 2 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-6
- add hackish fix for bz 599147
(upstream will hopefully fix properly in future release)
2010-05-21 20:22:40 +00:00
* Fri May 21 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-5
- fix noexecstack flag
2010-05-21 15:21:15 +00:00
* Thu May 20 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-4
- BuildRequires: yasm (we're optimized again)
* Thu May 20 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-3
- add pkg-config file
- move headers into include/vpx/
- enable optimization
* Thu May 20 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-2
- fix permissions on binaries
- rename generic binaries to v8_*
- link shared library to -lm, -lpthread to resolve missing weak symbols
* Wed May 19 2010 Tom "spot" Callaway <tcallawa@redhat.com> 0.9.0-1
- Initial package for Fedora