diff --git a/_service b/_service
new file mode 100644
index 0000000..150fabf
--- /dev/null
+++ b/_service
@@ -0,0 +1,19 @@
+
+
+ git
+ https://github.com/fusesource/jansi.git
+ jansi-2.4.0
+ jansi-*
+ @PARENT_TAG@
+ jansi-(.*)
+ src/main/native/inc_mac
+ src/main/native/inc_win
+ src/main/native/inc_linux/*
+ src/main/resources/org/fusesource/jansi/internal
+
+
+ *.tar
+ xz
+
+
+
diff --git a/jansi-2.4.0.tar.gz b/jansi-2.4.0.tar.gz
deleted file mode 100644
index e2cefe7..0000000
--- a/jansi-2.4.0.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ba18c50770eebb0b6f472254ada8608138e70045a564efa43626a09691dcf553
-size 225579
diff --git a/jansi-2.4.0.tar.xz b/jansi-2.4.0.tar.xz
new file mode 100644
index 0000000..ea814f2
--- /dev/null
+++ b/jansi-2.4.0.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a2040f5ed3bf00322d01da2c489a0e9e667c3f0e62517a61e712d9fccf391577
+size 63876
diff --git a/jansi.changes b/jansi.changes
index b923bb7..250ae6a 100644
--- a/jansi.changes
+++ b/jansi.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Wed Apr 26 15:53:32 UTC 2023 - Fridrich Strba
+
+- Fetch sources using source_service and don't distribute legally
+ spurious files.
+
-------------------------------------------------------------------
Mon May 16 11:00:15 UTC 2022 - Fridrich Strba
diff --git a/jansi.spec b/jansi.spec
index 922c5a8..65fb584 100644
--- a/jansi.spec
+++ b/jansi.spec
@@ -1,7 +1,7 @@
#
# spec file for package jansi
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,7 @@ Summary: Java library for generating and interpreting ANSI escape sequenc
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://fusesource.github.io/jansi/
-Source0: https://github.com/fusesource/jansi/archive/jansi-%{version}.tar.gz
+Source0: %{name}-%{version}.tar.xz
Source1: %{name}-build.xml
Patch0: %{name}-jni.patch
BuildRequires: ant
@@ -46,7 +46,7 @@ BuildArch: noarch
This package contains the API documentation for %{name}.
%prep
-%setup -q -n jansi-jansi-%{version}
+%setup -q
cp %{SOURCE1} build.xml
%pom_remove_parent
@@ -66,11 +66,7 @@ cp %{SOURCE1} build.xml
# Build for JDK 1.8 at a minimum
%pom_xpath_set "//pom:properties/pom:jdkTarget" 1.8
-# Remove prebuilt shared objects
-rm -fr src/main/resources/org/fusesource/jansi/internal
-
-# Unbundle the JNI headers
-rm src/main/native/inc_linux/*.h
+# Link the JNI headers
ln -s %{java_home}/include/jni.h src/main/native/inc_linux
ln -s %{java_home}/include/linux/jni_md.h src/main/native/inc_linux