Avoid hardcoding prefix=/usr

This commit is contained in:
Owen W. Taylor 2018-09-18 14:54:41 -04:00
parent e52a830c09
commit a5331752d0

View File

@ -6,7 +6,7 @@
Name: libvpx
Summary: VP8/VP9 Video Codec SDK
Version: 1.7.0
Release: 7%{?dist}
Release: 8%{?dist}
License: BSD
Group: System Environment/Libraries
#Source0: http://downloads.webmproject.org/releases/webm/%{name}-%{version}.tar.bz2
@ -160,8 +160,8 @@ export CHOST=armv7hl-redhat-linux-gnueabi-hardfloat
make DIST_DIR=%{buildroot}%{_prefix} dist
# Simpler to label the dir as %%doc.
if [ -d %{buildroot}/usr/docs ]; then
mv %{buildroot}/usr/docs doc/
if [ -d %{buildroot}%{_prefix}/docs ]; then
mv %{buildroot}%{_prefix}/docs doc/
fi
# Again, we should never need to do this anymore.
@ -176,18 +176,18 @@ popd
pushd %{buildroot}
# Stuff we don't need.
rm -rf usr/build/ usr/md5sums.txt usr/lib*/*.a usr/CHANGELOG usr/README
rm -rf .%{_prefix}/build/ .%{_prefix}/md5sums.txt .%{_libdir}*/*.a .%{_prefix}/CHANGELOG .%{_prefix}/README
# No, bad google. No treat.
mv usr/bin/examples/* usr/bin/
rm -rf usr/bin/examples
mv .%{_bindir}/examples/* .%{_bindir}
rm -rf .%{_bindir}/examples
# Rename a few examples
mv usr/bin/postproc usr/bin/vp8_postproc
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
mv .%{_bindir}/postproc .%{_bindir}/vp8_postproc
mv .%{_bindir}/simple_decoder .%{_bindir}/vp8_simple_decoder
mv .%{_bindir}/simple_encoder .%{_bindir}/vp8_simple_encoder
mv .%{_bindir}/twopass_encoder .%{_bindir}/vp8_twopass_encoder
# Fix the binary permissions
chmod 755 usr/bin/*
chmod 755 .%{_bindir}/*
popd
# Get the vpx_config.h file
@ -242,6 +242,9 @@ rm -rf %{buildroot}%{_prefix}/src
%{_bindir}/*
%changelog
* Tue Sep 18 2018 Owen Taylor <otaylor@redhat.com> - 1.7.0-8
- Avoid hardcoding prefix=/usr
* Fri Jul 20 2018 Wim Taymans <wtaymans@redhat.com> - 1.7.0-7
- Add compilers as buildrequires