%global commit e9de5a767fbae312e495bcaf578fbcef945195d8 %global forgeurl https://github.com/rtklibexplorer/RTKLIB Name: rtklib Version: 2.4.3.b34i %forgemeta Release: 15%{?dist} Summary: Program Package for GNSS Positioning License: BSD URL: http://www.rtklib.com Source0: %{forgesource} # Full readme from master branch Source1: https://raw.githubusercontent.com/tomojitakasu/RTKLIB/master/readme.txt Patch: %{name}-Correct-headed-in-gpt.f-for-the-test-case-output.patch BuildRequires: /usr/bin/git BuildRequires: make BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gcc-gfortran BuildRequires: qt6-qtbase-devel BuildRequires: qt6-qtmultimedia-devel BuildRequires: qt6-qtserialport-devel BuildRequires: qt6-qtwebengine-devel BuildRequires: chrpath BuildRequires: /usr/bin/desktop-file-validate %if 0%{?_with_asan:1} BuildRequires: libasan BuildRequires: libtsan %endif %description RTKLIB is an open source program package for standard and precise positioning with GNSS (global navigation satellite system). RTKLIB consists of a portable program library and several APs (application programs) utilizing the library. %package devel Summary: Include files and mandatory libraries for development Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description devel Include files and mandatory libraries for development. %package doc Summary: RTKLIB manual BuildArch: noarch Requires: %{name} = %{version}-%{release} %description doc Manual for RTKLIB tools. %package libs Summary: RTKLIB shared library %description libs RTKLIB Shared library. %package qt Summary: RTKLIB GUI tools Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description qt GUI part of RTKLIB tools. %prep %forgeautosetup -S git cp %{SOURCE1} readme_orig.txt sed -e "s|target.path = /usr/lib|target.path = %{buildroot}%{_libdir}|" \ -e "s|staticlib|sharedlib|" -i src/src.pro # sed -i "s|LDLIBS = ../../../../lib/iers/gcc/iers.a|LDLIBS = ../../../../lib/iers/gcc/libiers.a|" app/consapp/rnx2rtkp/gcc/makefile # Correct CLI tools build flags for m in $(find -name makefile); do %if 0%{?_with_asan:1} sed -i -e "s|-O3|%{optflags} -fsanitize=address -fno-omit-frame-pointer -fPIC -ggdb3|" \ -e 's|LDLIBS.*=\(.*\)|LDLIBS = $(CFLAGS) \1 -Wl,-z,relro,-z,now |g' $m %else sed -i -e "s|-O3|%{optflags} -fPIC|" \ -e 's|LDLIBS.*=\(.*\)|LDLIBS = $(CFLAGS) \1 -Wl,-z,relro,-z,now |g' $m %endif done %build %set_build_flags %if 0%{?_with_asan:1} export CFLAGS="${CFLAGS} -fsanitize=address -fno-omit-frame-pointer -fPIC -ggdb3" export CXXFLAGS="${CXXFLAGS} -fsanitize=address -fno-omit-frame-pointer -fPIC -ggdb3" export LDFLAGS="${LDFLAGS} -fsanitize=address -fno-omit-frame-pointer -fPIC -ggdb3 -Wl,-z,relro,-z,now" %else export CFLAGS="${CFLAGS} -fno-omit-frame-pointer -fPIC -ggdb3" export CXXFLAGS="${CXXFLAGS} -fno-omit-frame-pointer -fPIC -ggdb3" export LDFLAGS="${LDFLAGS} -fno-omit-frame-pointer -fPIC -ggdb3 -Wl,-z,relro,-z,now" %endif # Build iers.a library %make_build -C lib/iers/gcc # Build console applications %make_build -C app/consapp # Build RTKLib pushd src %{qmake_qt6} %make_build popd # Build QT applications pushd app/qtapp %{qmake_qt6} %make_build popd %install install -d \ %{buildroot}%{_bindir}/ \ %{buildroot}%{_libdir}/ \ %{buildroot}%{_datadir}/applications/ \ %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/ for app in rtkconv rtkget rtklaunch rtknavi rtkplot rtkpost srctblbrows strsvr; do app_name=${app}_qt install -pm 755 app/qtapp/${app_name}/${app_name} %{buildroot}%{_bindir}/ install -pm 644 app/qtapp/${app_name}/${app_name}.desktop %{buildroot}%{_datadir}/applications/ install -pm 644 app/qtapp/icon/${app}.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/ \ || install -pm 644 app/qtapp/icon/${app}.png %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/ desktop-file-validate %{buildroot}%{_datadir}/applications/${app_name}.desktop done cp -a lib/libRTKLib.so* %{buildroot}%{_libdir}/ install -pm 755 app/consapp/convbin/gcc/convbin %{buildroot}%{_bindir} install -pm 755 app/consapp/pos2kml/gcc/pos2kml %{buildroot}%{_bindir} install -pm 755 app/consapp/str2str/gcc/str2str %{buildroot}%{_bindir} install -pm 755 app/consapp/rnx2rtkp/gcc/rnx2rtkp %{buildroot}%{_bindir} install -pm 755 app/consapp/rtkrcv/gcc/rtkrcv %{buildroot}%{_bindir} install -pm 755 app/consapp/rtkrcv/gcc/rtk*.sh %{buildroot}%{_bindir} #mkdir -p %{buildroot}%{_datadir}%{name} # install -pm 644 data/P1P2_ALL.DCB %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/P2C2.DCB %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/STA_GSI.txt %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/STA_IGS.txt %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/STA_IGS08.txt %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/STA_IGS_H.txt %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/STA_IGS_HR.txt %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/STA_IGS_MGEX.txt %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/TLE_GNSS_SATNO.txt %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/TLE_GNSS_SIM.txt %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/URL_LIST.txt %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/elmask_sample.txt %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/gnssdatasrc.txt %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/igs10P1565_wocov.snx %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/ngs_abs.pcv %{buildroot}%{_datadir}%{name}/ # install -pm 644 data/stations.pos %{buildroot}%{_datadir}%{name}/ chrpath --delete %{buildroot}%{_bindir}/*_qt %files %license license.txt %doc readme.txt readme_orig.txt %{_bindir}/convbin %{_bindir}/pos2kml %{_bindir}/str2str %{_bindir}/rnx2rtkp %{_bindir}/rtkrcv %{_bindir}/rtkstart.sh %{_bindir}/rtkshut.sh %files devel %{_libdir}/libRTKLib.so %files doc %license license.txt %doc doc %files libs # %license add-license-file-here %doc readme.txt readme_orig.txt %{_libdir}/libRTKLib.so.1* %files qt %license license.txt %{_bindir}/rtknavi_qt %{_bindir}/rtkget_qt %{_bindir}/rtkplot_qt %{_bindir}/rtkpost_qt %{_bindir}/rtklaunch_qt %{_bindir}/srctblbrows_qt %{_bindir}/strsvr_qt %{_bindir}/rtkconv_qt %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/scalable/apps/*.* %changelog * Fri May 31 2024 Damian Wrobel - 2.4.3.b34i-15 - Update to the latest available version - Drop patch upstream merged * Wed May 15 2024 Damian Wrobel - 2.4.3.b34i-14 - Update to the latest available version * Fri Jan 26 2024 Fedora Release Engineering - 2.4.3.b33-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 2.4.3.b33-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 2.4.3.b33-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri Jan 20 2023 Fedora Release Engineering - 2.4.3.b33-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Sat Jul 23 2022 Fedora Release Engineering - 2.4.3.b33-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jan 21 2022 Fedora Release Engineering - 2.4.3.b33-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 2.4.3.b33-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed Jan 27 2021 Fedora Release Engineering - 2.4.3.b33-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Thu Aug 27 2020 Iñaki Úcar - 2.4.3.b33-5 - Drop unneeded dependencies * Sat Aug 01 2020 Fedora Release Engineering - 2.4.3.b33-4 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 2.4.3.b33-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Sun Jul 5 2020 Vasiliy Glazov - 2.4.3.b33-2 - Split to subpackages - Clean spec * Wed Jul 1 2020 Vasiliy Glazov - 2.4.3.b33-1 - Initial packaging