## START: Set by rpmautospec ## (rpmautospec version 0.3.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec #%%global gittag 4.1.0 %global commit 0a1b50503bdf202fb6fa7ca62124b0242a004e69 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global date 20230114 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 # Proposed upstream: https://github.com/XEphem/XEphem/pull/58 Patch: xephem_makefile.patch # Patch to use cmake to build and install # Proposed upstream: https://github.com/XEphem/XEphem/pull/60 Patch: xephem_with_cmake.patch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: desktop-file-utils BuildRequires: cmake 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} %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 %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 %cmake %cmake_build # Old manual build method #pushd GUI/xephem #%%make_build #popd %install %cmake_install # Old manual install method # There's no automated install #mkdir -p %%{buildroot}%%{_bindir} #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} #popd # Create file to tell xephem where to find resources mkdir -p %{buildroot}%{_sysconfdir} cat >%{buildroot}%{_sysconfdir}/XEphem < - 4.1.0^202301140a1b505-1 - Uncommitted changes