## START: Set by rpmautospec ## (rpmautospec version 0.2.6) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec #%%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(libxml-2.0) BuildRequires: pkgconfig(zlib) Requires: %{name}-data = %{version}-%{release} Requires: curl Requires: gzip %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 %if 0%{?epel} %set_build_flags %endif 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 < 4.1.0^20221006b7bfc6e-3 - Add libxml2 to BR and fix patch - Add gzip and curl to runtime dependencies * Fri Oct 07 2022 Mattia Verga 4.1.0^20221006b7bfc6e-2 - Set build flags for EPEL * Fri Oct 07 2022 Mattia Verga 4.1.0^20221006b7bfc6e-1 - Initial import (fedora#2123242)