diff --git a/_service b/_service
new file mode 100644
index 0000000..beee95d
--- /dev/null
+++ b/_service
@@ -0,0 +1,15 @@
+
+
+
+ git
+ https://github.com/any1/neatvnc.git
+ master
+ 0.8.1+git%cd.%h
+
+
+
+ *.tar
+ xz
+
+
+
diff --git a/fix-build-in-15.6.patch b/fix-build-in-15.6.patch
new file mode 100644
index 0000000..40bee8a
--- /dev/null
+++ b/fix-build-in-15.6.patch
@@ -0,0 +1,28 @@
+Index: neatvnc-0.8.0+git20241008.b539421/src/enc/h264/ffmpeg-impl.c
+===================================================================
+--- neatvnc-0.8.0+git20241008.b539421.orig/src/enc/h264/ffmpeg-impl.c
++++ neatvnc-0.8.0+git20241008.b539421/src/enc/h264/ffmpeg-impl.c
+@@ -224,8 +224,10 @@ static int h264_encoder__init_buffersrc(
+ params->sample_aspect_ratio = (AVRational){1, 1};
+ params->time_base = self->timebase;
+ params->hw_frames_ctx = self->hw_frames_ctx;
++#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(10,1,100)
+ params->color_space = AVCOL_SPC_RGB;
+ params->color_range = AVCOL_RANGE_JPEG;
++#endif
+
+ rc = av_buffersrc_parameters_set(self->filter_in, params);
+ assert(rc == 0);
+Index: neatvnc-0.8.0+git20241008.b539421/meson.build
+===================================================================
+--- neatvnc-0.8.0+git20241008.b539421.orig/meson.build
++++ neatvnc-0.8.0+git20241008.b539421/meson.build
+@@ -54,7 +54,7 @@ libturbojpeg = dependency('libturbojpeg'
+ gnutls = dependency('gnutls', required: get_option('tls'))
+ nettle = dependency('nettle', required: get_option('nettle'))
+ hogweed = dependency('hogweed', required: get_option('nettle'))
+-gmp = dependency('gmp', required: get_option('nettle'))
++gmp = cc.find_library('gmp')
+ zlib = dependency('zlib')
+ gbm = dependency('gbm', required: get_option('gbm'))
+ libdrm = dependency('libdrm', required: get_option('h264'))
diff --git a/neatvnc-0.8.1+git20241008.b539421.obscpio b/neatvnc-0.8.1+git20241008.b539421.obscpio
new file mode 100644
index 0000000..b3f3b3b
--- /dev/null
+++ b/neatvnc-0.8.1+git20241008.b539421.obscpio
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:746b5a1bc20d3a50b167adaa5e743ac2cee51ab3d3c131551a6e6b2f46284d8a
+size 1491468
diff --git a/neatvnc.changes b/neatvnc.changes
index 5dfc83f..5ad490e 100644
--- a/neatvnc.changes
+++ b/neatvnc.changes
@@ -1,3 +1,16 @@
+-------------------------------------------------------------------
+Wed Oct 23 07:57:14 UTC 2024 - Antonio Larrosa
+
+- Update to 0.8.1+git20241008.b539421 adding a _service file to
+ get the sources from git. This fixes a FTBFS with ffmpeg-7 in
+ Factory. Note that we can't use @PARENT_TAG@ in the _service
+ file because 0.8.1 was branched from the v0.8 branch so using it
+ would look like going back to 0.8.0.
+- Add a patch to keep building with older ffmpeg versions too
+ as well as find the gmp dependency, which can't be found using
+ pkgconfig in 15.6:
+ * fix-build-in-15.6.patch
+
-------------------------------------------------------------------
Fri Aug 2 06:25:29 UTC 2024 - Michael Vetter
diff --git a/neatvnc.obsinfo b/neatvnc.obsinfo
new file mode 100644
index 0000000..49c9bf0
--- /dev/null
+++ b/neatvnc.obsinfo
@@ -0,0 +1,4 @@
+name: neatvnc
+version: 0.8.1+git20241008.b539421
+mtime: 1728377463
+commit: b539421d3b10bbb790c48200eb1955fd54a3b8fb
diff --git a/neatvnc.spec b/neatvnc.spec
index 242e260..c942c58 100644
--- a/neatvnc.spec
+++ b/neatvnc.spec
@@ -19,13 +19,14 @@
%define libsoname libneatvnc0
Name: neatvnc
-Version: 0.8.1
+Version: 0.8.1+git20241008.b539421
Release: 0
Summary: A VNC server library
License: ISC
Group: System/GUI/Other
URL: https://github.com/any1/neatvnc
-Source0: %url/archive/v%{version}.tar.gz
+Source0: %{name}-%{version}.tar.xz
+Patch0: fix-build-in-15.6.patch
BuildRequires: meson
BuildRequires: pkgconfig
diff --git a/v0.8.1.tar.gz b/v0.8.1.tar.gz
deleted file mode 100644
index 6bf67bb..0000000
--- a/v0.8.1.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:51ef4d02f1621c947d58f2454e8fd4582a66439f09d409c103424c9d34839757
-size 661911