File merkaartor.spec of Package merkaartor

#
# spec file for package merkaartor
#
# Copyright © 2008–2013 Dirk Stöcker <opensuse@dstoecker.de>
# Copyright © 2015 Angelos Tzotsos <tzotsos@opensuse.org>
# Copyright © 2017 Luigi Baldoni <aloisio@gmx.com>
# Copyright © 2018–2021 Markus S. <kamikazow@opensuse.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

Name:           merkaartor
Version:        0.19.0
Release:        0
Summary:        OpenStreetMap editor focused on good desktop integration
License:        GPL-3.0-or-later
Group:          Productivity/Graphics/Other
Url:            http://merkaartor.be/
Source:         %{name}-%{version}.tar.gz
Source2:        %{name}.desktop
Source9:        merkaartor.xml
BuildRequires:  binutils gcc gcc-c++
BuildRequires:  fdupes
BuildRequires:  gpsd-devel
BuildRequires:  hicolor-icon-theme
BuildRequires:  libboost_serialization-devel
BuildRequires:  libboost_program_options-devel
BuildRequires:  netcdf-devel
BuildRequires:  proj5-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5WebKit)
BuildRequires:  pkgconfig(Qt5WebKitWidgets)
BuildRequires:  pkgconfig(Qt5Xml)
BuildRequires:  pkgconfig(exiv2)
BuildRequires:  pkgconfig(gdal)
BuildRequires:  pkgconfig(libproxy-1.0)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(libxslt)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(zbar)
BuildRequires:  pkgconfig(zbar-qt)
%if 0%{?suse_version}
BuildRequires:  libqt5-linguist
%endif

%description
Merkaartor is a editor for OpenStreetMap, focusing on good desktop integration.

It has some unique features like anti-aliased displaying,
transparent display of map features like roads and true curved roads.

%prep
%setup -q
# Remove executable bit from all files
chmod -R -x+X .

%build
lrelease-qt5 src/src.pro
%qmake5 Merkaartor.pro QMAKE_STRIP=true PREFIX=%{_prefix} LIBDIR=%{_libdir} \
        NODEBUG=1 GDAL=1 GPSDLIB=1 PROJ=1 ZBAR=1 SPATIALITE=0 GEOIMAGE=0 \
        LIBPROXY=1
make %{?_smp_mflags}

%install
make INSTALL_ROOT=%{buildroot} install
install -d 755 %{buildroot}/%{_datadir}/applications
install -m 644 %{SOURCE2} %{buildroot}/%{_datadir}/applications/%{name}.desktop
install -d 755 %{buildroot}%{_datadir}/mime/packages/
install -m 644 %{SOURCE9} %{buildroot}%{_datadir}/mime/packages/
pushd %{buildroot}%{_datadir}/icons/hicolor
rm -rf 40x40 42x42 80x80 8x8
%if 0%{?sle_version} <= 120100
rm -rf 512x512
%endif
popd
%fdupes -s %{buildroot}

%files
%defattr(-,root,root,-)
%doc AUTHORS CHANGELOG HACKING.md
%license LICENSE
%{_bindir}/*
%{_datadir}/applications/*
%{_datadir}/%{name}
%{_libdir}/%{name}
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/metainfo/org.merkaartor.merkaartor.appdata.xml
%{_datadir}/mime/packages/merkaartor.xml

%changelog
openSUSE Build Service is sponsored by