diff --git a/aom.spec b/aom.spec index f7265d4..26c8c9b 100644 --- a/aom.spec +++ b/aom.spec @@ -1,13 +1,21 @@ %global sover 0 +# Use commit with updated changelog for correct versioning +%global commit 0ddc150516b7672101265eac032a11a9aae4cb53 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global snapshotdate 20180911 + Name: aom Version: 1.0.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Royalty-free next-generation video format License: BSD URL: http://aomedia.org/ -Source0: https://aomedia.googlesource.com/aom/+archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# We want to keep the git data for versioning aom.pc correctly +# so we can't download the archive directly from the repo. +Source0: %{name}-%{version}.tar.gz +Source1: makesrc.sh BuildRequires: gcc-c++ BuildRequires: gcc @@ -46,11 +54,11 @@ video format. %prep -%autosetup -p1 -c %{name}-%{version} +%autosetup -p1 -n %{name}-%{version} %build -cd build +mkdir _build && cd _build %cmake3 ../ -DENABLE_CCACHE=1 \ -DCMAKE_SKIP_RPATH=1 \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ @@ -76,7 +84,7 @@ cd build %install -cd build +cd _build %make_install install -pm 0755 examples/analyzer %{buildroot}%{_bindir}/aomanalyzer @@ -94,13 +102,16 @@ install -pm 0755 examples/analyzer %{buildroot}%{_bindir}/aomanalyzer %files devel -%doc build/docs/html/ +%doc _build/docs/html/ %{_includedir}/%{name} %{_libdir}/libaom.so %{_libdir}/pkgconfig/%{name}.pc %changelog +* Tue Sep 11 2018 Robert-André Mauchin - 1.0.0-3 +- Update the archive in order to detect the correct version from the changelog + * Thu Jul 12 2018 Fedora Release Engineering - 1.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..79a7a3a --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +NAME=$(basename $PWD) +VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) +COMMIT=$(sed -n '/^%global commit/{s/.* //;p}' $NAME.spec) +SHORT=${COMMIT:0:7} + +echo -e "\nCreate git snapshot\n" + +echo "Cloning..." +rm -rf $NAME-$VERSION +git clone https://aomedia.googlesource.com/aom $NAME-$VERSION + +echo "Getting commit..." +pushd $NAME-$VERSION +git checkout $COMMIT +popd + +echo "Archiving..." +tar czf $NAME-$VERSION.tar.gz $NAME-$VERSION/ + +echo "Cleaning..." +rm -rf $NAME-$VERSION + +echo "Done." diff --git a/sources b/sources index 4a5a564..42a6063 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (aom-1.0.0.tar.gz) = 85bca7eff7a247efd0772bcbbba2e8d1bc10390c64551b4a63ecf95b89bca3ad899e4aa04b8cb5d3ed3aaa42ab5e0b7f5612b085106375088062b38a2121d203 +SHA512 (aom-1.0.0.tar.gz) = 467aeaa02dee485a7f8d87abe1ab3ee3c847f355db8897250f300e47c35e678d8aa0e34e1a1faeeda57c0faabb5b2c6f99f0a82e6177dbda51d4d90de6c26d0f