Name: pilotlog Version: 10 Release: 1%{?dist} Summary: A pilot logbook for logging flight time License: AGPL-3.0-or-later URL: http://pilotlog.stansoft.org Source0: https://download.stansoft.org/files/%{name}-%{version}.tar.bz2 Source1: https://download.stansoft.org/files/%{name}.1.gz Requires: postgresql-server Requires: libpq BuildRequires: gcc BuildRequires: aubit4gl-devel BuildRequires: postgresql-server BuildRequires: libpq-devel %global aubit4glver %(rpm -q --qf '%%{VERSION}' aubit4gl | cut -d. -f1-3) %description Pilot Log is a pilot logbook for logging flight time and calculating aircraft weight & balance. %prep %setup -q %build %if "%{getenv:AUBITDIR}" == "" export AUBITDIR=%{_libdir}/aubit4gl %endif %configure # The database must exist to compile so create it %make_build createdb # It does not compile with multiple threads %make_build -j1 %install rm -rf %{buildroot}%{_libdir}/%{name} mkdir -p %{buildroot}%{_libdir}/%{name} mkdir -p %{buildroot}%{_mandir}/man1 cp %{SOURCE1} %{buildroot}%{_mandir}/man1 %make_install # Install the binaries mkdir -p %{buildroot}%{_bindir} # Create a link to the startup script since it references the install dir ln -sf ../..%{_libdir}/%{name}/pl %{buildroot}%{_bindir}/%{name} # docs are installed in the system location rm -f %{buildroot}%{_libdir}/%{name}/README rm -f %{buildroot}%{_libdir}/%{name}/changelog rm -f %{buildroot}%{_libdir}/%{name}/COPYING %check make check %files %license COPYING %doc README %doc changelog %dir %{_libdir}/%{name} %dir %{_libdir}/%{name}/etc %dir %{_libdir}/%{name}/bin %dir %{_libdir}/%{name}/newdb %{_libdir}/%{name}/etc/* %{_libdir}/%{name}/bin/* %{_libdir}/%{name}/newdb/schema.sql %{_libdir}/%{name}/pl %{_libdir}/%{name}/installpl %{_libdir}/%{name}/updatepl %{_bindir}/%{name} %{_mandir}/man1/* %changelog * Fri Sep 22 2023 Chad Lemmen - 10-1 - initial Fedora RPM packaging