commit deddb69bbfb37bd95108756a512e6761b7a822a7
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Mon Jun 6 21:02:21 2022 +0100
always make the snapshot with the same hash
version.h | 4 ++++
x264-snapshot.sh | 7 ++-----
x264.spec | 2 ++
3 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/version.h b/version.h
new file mode 100644
index 0000000..c5b2800
--- /dev/null
+++ b/version.h
@@ -0,0 +1,4 @@
+#define X264_REV 3060
+#define X264_REV_DIFF 0
+#define X264_VERSION " r3060 5db6aa6"
+#define X264_POINTVER "0.163.3060 5db6aa6"
diff --git a/x264-snapshot.sh b/x264-snapshot.sh
index 3a34692..883255a 100755
--- a/x264-snapshot.sh
+++ b/x264-snapshot.sh
@@ -22,13 +22,10 @@ git clone
https://code.videolan.org/videolan/x264.git -b ${branch}
cd ${package}
tag=$(git rev-list HEAD -n 1 | cut -c 1-8)
git checkout ${commit}
-git checkout -b rpmfusion
-./version.sh > version.h
+./version.sh > "$pwd"/version.h
API="$(grep '#define X264_BUILD' < x264.h | sed 's/^.*
\([1-9][0-9]*\).*$/\1/')"
date=$(git log -1 --format=%cd --date=short | tr -d \-)
-git add version.h
-git commit -m "generated version.h" version.h
-git archive --prefix="${package}-0.$API-${date}git${tag}/" --format=tar
rpmfusion | bzip2 > "$pwd"/${package}-0.$API-${date}git${tag}.tar.bz2
+git archive --prefix="${package}-0.$API-${date}git${tag}/" --format=tar
${branch} | bzip2 > "$pwd"/${package}-0.$API-${date}git${tag}.tar.bz2
popd >/dev/null
echo \# globals for x264-0.$API-${date}git${tag}.tar.bz2
diff --git a/x264.spec b/x264.spec
index 1d8b5d9..7dd3e30 100644
--- a/x264.spec
+++ b/x264.spec
@@ -38,6 +38,7 @@ License: GPLv2+
URL:
https://www.videolan.org/developers/x264.html
Source0: %{name}-0.%{api}-%{snapshot}.tar.bz2
Source1: x264-snapshot.sh
+Source2: version.h
# don't remove config.h and don't re-run version.sh
Patch0: x264-nover.patch
@@ -103,6 +104,7 @@ This package contains the development files.
%prep
%setup -q -c -n %{name}-0.%{api}-%{snapshot}
pushd %{name}-0.%{api}-%{snapshot}
+cp %{SOURCE2} .
%patch0 -p1 -b .nover
%patch1 -p1 -b .10b
%patch11 -p1 -b .opencl