The package rpms/xephem.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/xephem.git/commit/?id=19ba8b399d1....
Change:
+ExcludeArch: %{ix86}
Thanks.
Full change:
============
commit 19ba8b399d136955a0808a3178ada1145b48a1cc
Author: Mattia Verga <mattia.verga(a)proton.me>
Date: Fri Oct 7 16:39:18 2022 +0200
Initial import (fedora#2123242)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0281d8d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/XEphem-b7bfc6eb31464287b5d65cb3f1e36d7dbf3dd381.tar.gz
diff --git a/README.md b/README.md
index 244c4b5..473cd33 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,8 @@
# xephem
-The xephem package
+XEphem is a scientific-grade interactive astronomical ephemeris software.
+It can calculate ephemeris for astronomical objects and display the results
+in tabular or graphical output.
+
+XEphem can also be used to control telescopes, generate sky maps, perform
+image analysis and much more.
diff --git a/io.github.xephem.desktop b/io.github.xephem.desktop
new file mode 100644
index 0000000..ead1716
--- /dev/null
+++ b/io.github.xephem.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Version=1.4
+Type=Application
+Name=XEphem
+GenericName=Astronomical ephemeris calculator
+Exec=xephem
+Icon=XEphem
+Terminal=false
+Categories=Science;Astronomy
diff --git a/sources b/sources
new file mode 100644
index 0000000..637ad5c
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (XEphem-b7bfc6eb31464287b5d65cb3f1e36d7dbf3dd381.tar.gz) =
ca1793215c9f8e6070d69b73dabe932de19eeffaa266cf8bd4b1b4dd291cc1114b0093fb9620c5c872f4b59c172b8cfed830f5a8ac395134e643a1a43fee4473
diff --git a/xephem.spec b/xephem.spec
new file mode 100644
index 0000000..9ade55a
--- /dev/null
+++ b/xephem.spec
@@ -0,0 +1,138 @@
+#%%global gittag 4.1.0
+%global commit b7bfc6eb31464287b5d65cb3f1e36d7dbf3dd381
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+%global date 20221006
+
+Name: xephem
+%if "%{?gittag}"
+Version: 4.1.0
+%else
+Version: 4.1.0^%{date}%{shortcommit}
+%endif
+Release: %autorelease
+Summary: Scientific-grade interactive astronomical ephemeris software
+License: MIT-advertising and LGPL-2.1-or-later
+
+URL: https://%{name}.github.io
+%if "%{?gittag}"
+Source0:
https://github.com/XEphem/XEphem/archive/%{gittag}/XEphem-%{version}.tar.gz
+%else
+Source0:
https://github.com/XEphem/XEphem/archive/%{commit}/XEphem-%{commit}.tar.gz
+%endif
+# Desktop file is not provided by upstream
+Source1: io.github.xephem.desktop
+
+# Patch to use system libraries and not override CFLAGS
+Patch: xephem_makefile.patch
+
+ExcludeArch: %{ix86}
+
+BuildRequires: desktop-file-utils
+BuildRequires: gcc
+BuildRequires: groff-base
+BuildRequires: make
+BuildRequires: motif-devel
+BuildRequires: pkgconfig(libjpeg)
+BuildRequires: pkgconfig(libpng)
+BuildRequires: pkgconfig(libssl)
+BuildRequires: pkgconfig(zlib)
+
+Requires: %{name}-data = %{version}-%{release}
+
+%description
+XEphem is a scientific-grade interactive astronomical ephemeris software.
+It can calculate ephemeris for astronomical objects and display the results
+in tabular or graphical output.
+
+XEphem can also be used to control telescopes, generate sky maps, perform
+image analysis and much more.
+
+
+%package data
+Summary: Data files for %{name}
+BuildArch: noarch
+Requires: %{name} = %{version}-%{release}
+
+%description data
+The %{name}-data package contains data files for %{name} functionality.
+
+
+%prep
+%if "%{?gittag}"
+%autosetup -p1 -n XEphem-%{version}
+%else
+%autosetup -p1 -n XEphem-%{commit}
+%endif
+
+# Remove libraries sources for which we want to use system libraries
+rm -rf libpng/
+rm -rf libjpegd/
+rm -rf libz/
+rm -rf libXm/
+
+# Rename liblilxml license files
+cp liblilxml/LICENSE LICENSE.liblilxml
+
+
+%build
+pushd GUI/xephem
+%make_build
+popd
+
+
+%install
+# There's no automated install
+mkdir -p %{buildroot}%{_bindir}
+mkdir -p %{buildroot}%{_sysconfdir}
+mkdir -p %{buildroot}%{_mandir}/man1/
+mkdir -p %{buildroot}%{_datadir}/%{name}
+
+pushd GUI/xephem
+install -p -m0755 %{name} %{buildroot}/%{_bindir}
+install -p -m0644 %{name}.1 %{buildroot}/%{_mandir}/man1/
+cp -pR auxil %{buildroot}%{_datadir}/%{name}
+cp -pR catalogs %{buildroot}%{_datadir}/%{name}
+cp -pR fifos %{buildroot}%{_datadir}/%{name}
+cp -pR fits %{buildroot}%{_datadir}/%{name}
+cp -pR gallery %{buildroot}%{_datadir}/%{name}
+cp -pR help %{buildroot}%{_datadir}/%{name}
+cp -pR lo %{buildroot}%{_datadir}/%{name}
+
+# Create file to tell xephem where to find resources
+cat >%{buildroot}%{_sysconfdir}/XEphem <<EOF
+XEphem.ShareDir: %{_datadir}/%{name}
+EOF
+
+popd
+
+# Provide a desktop entry
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
+mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/
+install -p -m0644 GUI/xephem/XEphem.png
%{buildroot}%{_datadir}/icons/hicolor/128x128/apps/
+
+
+%check
+# Tests currently fail, need to check with upstream
+#pushd tests
+#make run-test
+#popd
+
+
+%files
+%license LICENSE LICENSE.liblilxml
+%doc README.md
+%{_bindir}/%{name}
+%{_mandir}/man1/%{name}.1*
+%{_datadir}/applications/io.github.%{name}.desktop
+%dir %{_datadir}/icons/hicolor
+%dir %{_datadir}/icons/hicolor/128x128
+%dir %{_datadir}/icons/hicolor/128x128/apps
+%{_datadir}/icons/hicolor/128x128/apps/XEphem.png
+
+%files data
+%{_datadir}/%{name}
+%config(noreplace) %{_sysconfdir}/XEphem
+
+
+%changelog
+%autochangelog
diff --git a/xephem_makefile.patch b/xephem_makefile.patch
new file mode 100644
index 0000000..7688e0c
--- /dev/null
+++ b/xephem_makefile.patch
@@ -0,0 +1,94 @@
+diff -udHrN -- a/GUI/xephem/Makefile b/GUI/xephem/Makefile
+--- a/GUI/xephem/Makefile 2022-01-27 20:27:21.000000000 +0100
++++ b/GUI/xephem/Makefile 2022-09-01 09:48:57.743617610 +0200
+@@ -9,9 +9,9 @@
+ # one executable, xephem.
+
+ # These -I and -L flags point to the supporting XEphem libraries
+-LIBINC = -I../../libastro -I../../libip -I../../liblilxml -I../../libjpegd
-I../../libpng -I../../libz
+-LIBLNK = -L../../libastro -L../../libip -L../../liblilxml -L../../libjpegd
-L../../libpng -L../../libz
+-LIBLIB = -lastro -lip -llilxml -ljpegd -lpng -lz
++LIBINC = -I../../libastro -I../../libip -I../../liblilxml
++LIBLNK = -L../../libastro -L../../libip -L../../liblilxml
++LIBLIB = -lastro -lip -llilxml -ljpeg -lpng -lz
+
+ # MOTIFI is the directory containing the Xm directory of include files.
+ # MOTIFL is the directory containing the libXm.a library.
+@@ -31,8 +31,8 @@
+ # for linux and Apple OS X
+ CC = gcc
+ CLDFLAGS = -g
+-CFLAGS = $(LIBINC) $(CLDFLAGS) -O2 -Wall -I$(MOTIFI) -I/opt/X11/include
+-LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -L/opt/X11/lib
++CFLAGS += -I$(MOTIFI) -I/opt/X11/include $(LIBINC)
++LDFLAGS += -L$(MOTIFL) -L/opt/X11/lib $(LIBLNK)
+ XLIBS = -lXm -lXt -lXext -lXmu -lX11
+ LIBS = $(XLIBS) $(LIBLIB) -lm -lssl
+
+@@ -185,21 +185,21 @@
+ xephem.o \
+ xmisc.o
+
+-all: libs xephem xephem.1
++LIBRARIES := libip liblilxml
+
+-xephem: $(INCS) $(OBJS)
++all: $(LIBRARIES) xephem xephem.1
++
++xephem: $(INCS) $(OBJS) $(LIBRARIES)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+
+ xephem.1: xephem.man
+ nroff -man $? > $@
+
+-libs:
+- cd ../../libastro; make
+- cd ../../libip; make
+- cd ../../libjpegd; make
+- cd ../../liblilxml; make
+- cd ../../libpng; make
+- cd ../../libz; make
++$(LIBRARIES): libastro
++ $(MAKE) --directory=../../$@
++
++libastro:
++ $(MAKE) --directory=../../$@
+
+ clean:
+ rm -fr *.o ../../lib*/*.[ao]
+diff -udHrN -- a/libastro/Makefile b/libastro/Makefile
+--- a/libastro/Makefile 2022-01-27 20:27:21.000000000 +0100
++++ b/libastro/Makefile 2022-09-01 09:44:11.958463960 +0200
+@@ -5,7 +5,7 @@
+
+ # gcc
+ CC = gcc
+-CFLAGS= -O2 -Wall
++#CFLAGS= -O2 -Wall
+
+ # macosx universal binary
+ # CFLAGS= -O2 -Wall -arch i386 -arch ppc
+diff -udHrN -- a/libip/Makefile b/libip/Makefile
+--- a/libip/Makefile 2022-01-27 20:27:21.000000000 +0100
++++ b/libip/Makefile 2022-09-01 09:44:11.958463960 +0200
+@@ -3,7 +3,7 @@
+
+ # gcc
+ CC = gcc
+-CFLAGS= -I../libastro -O2 -Wall
++CFLAGS += -I../libastro
+
+ # macosx universal binary
+ # CFLAGS= -I../libastro -O2 -Wall -arch i386 -arch ppc
+diff -udHrN -- a/liblilxml/Makefile b/liblilxml/Makefile
+--- a/liblilxml/Makefile 2022-01-27 20:27:21.000000000 +0100
++++ b/liblilxml/Makefile 2022-09-01 09:44:11.959463950 +0200
+@@ -5,7 +5,7 @@
+
+ # gcc
+ CC = gcc
+-CFLAGS= -O2 -Wall
++#CFLAGS= -O2 -Wall
+
+ # macosx universal binary
+ # CFLAGS= -O2 -Wall -arch i386 -arch ppc