]> git.pld-linux.org Git - SPECS.git/blob - gpsbabel.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / gpsbabel.spec
1 #
2 # Conditional build:
3 %bcond_without  qt5             # build Qt5 GUI
4 #
5 %define         qtver           5.11.1
6 %define         fver    %(echo %{version} | tr . _)
7
8 # disable qt5 on x32 until qt5-qtwebengine builds
9 # (python segfaults as of 20181212)
10 %ifarch x32
11 %undefine with_qt5
12 %endif
13
14 Summary:        GPSBabel - convert GPS waypoint, route and track data
15 Summary(pl.UTF-8):      GPSBabel - konwertowanie danych GPS: waypointów, tras i śladów
16 Name:           gpsbabel
17 Version:        1.6.0
18 Release:        1
19 License:        GPL v2+
20 Group:          Applications/Engineering
21 # Source0Download via POST form at https://www.gpsbabel.org/download.html#downloading
22 # version=1.5.4
23 # token=$(curl -s http://www.gpsbabel.org/download.html | sed -rne 's/.*gpsbabel-'$version'\.tar\.gz.*token.*value="([^"]+)".*/\1/p' | head -n1)
24 # curl -F "token=$token" -F "dl=gpsbabel-$version.tar.gz" http://www.gpsbabel.org/plan9.php -o gpsbabel-$version.tar.gz
25 Source0:        https://github.com/gpsbabel/gpsbabel/archive/%{name}_%{fver}.tar.gz
26 # Source0-md5:  accb9f923ebe1b2d2a00c67d0e1dc430
27 Source1:        %{name}.desktop
28 Source2:        %{name}.png
29 Patch0:         %{name}-auto.patch
30 Patch1:         use-system-shapelib.patch
31 Patch2:         gmapbase.patch
32 Patch3:         %{name}-link.patch
33 Patch4:         privacy.patch
34 Patch5:         %{name}-system-minizip.patch
35 URL:            http://www.gpsbabel.org/
36 BuildRequires:  autoconf >= 2.59
37 BuildRequires:  automake
38 BuildRequires:  docbook-style-xsl
39 BuildRequires:  expat-devel >= 1.95
40 #BuildRequires: libusb-compat-devel >= 0.1
41 BuildRequires:  libxslt-progs
42 BuildRequires:  minizip-devel
43 BuildRequires:  rpmbuild(macros) >= 1.600
44 BuildRequires:  shapelib-devel
45 BuildRequires:  zlib-devel
46 BuildRequires:  Qt5Core-devel >= %{qtver}
47 %if %{with qt5}
48 BuildRequires:  Qt5Gui-devel >= %{qtver}
49 BuildRequires:  Qt5Network-devel >= %{qtver}
50 BuildRequires:  Qt5WebEngine-devel >= %{qtver}
51 BuildRequires:  Qt5Xml-devel >= %{qtver}
52 BuildRequires:  desktop-file-utils
53 BuildRequires:  qt5-build >= %{qtver}
54 BuildRequires:  qt5-linguist >= %{qtver}
55 BuildRequires:  qt5-qmake >= %{qtver}
56 %endif
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59 %define         translationdir  %{_datadir}/qt5/translations
60
61 %description
62 Converts GPS waypoint, route and track data from one format type to
63 another.
64
65 %description -l pl.UTF-8
66 GPSBabel konwertuje dane GPS: waypointy, trasy i ślady z jednego
67 formatu na drugi.
68
69 %package gui
70 Summary:        Qt GUI interface for GPSBabel
71 Summary(pl.UTF-8):      Graficzny interfejs Qt do programu GPSBabel
72 Group:          Applications/Engineering
73 Requires:       %{name} = %{version}-%{release}
74
75 %description gui
76 Qt GUI interface for GPSBabel.
77
78 %description gui -l pl.UTF-8
79 Graficzny interfejs Qt do programu GPSBabel.
80
81 %prep
82 %setup -q -n %{name}-%{name}_%{fver}
83 %patch0 -p1
84 %patch1 -p1
85 %patch2 -p1
86 %patch3 -p1
87 %patch4 -p1
88 %patch5 -p1
89
90 # Use system shapelib instead of bundled partial shapelib
91 mv shapelib{,.bundled}
92
93 %build
94 %{__aclocal}
95 %{__autoconf}
96 %configure \
97         --with-zlib=system \
98         --with-libminizip=system \
99         --with-doc=./manual
100 %{__make}
101
102 %{__perl} xmldoc/makedoc
103 %{__make} gpsbabel.html
104
105 %if %{with qt5}
106 cd gui
107 qmake-qt5
108 lrelease-qt5 *.ts
109 %{__make}
110 %endif
111
112 %install
113 rm -rf $RPM_BUILD_ROOT
114 install -d $RPM_BUILD_ROOT%{_bindir}
115 %{__make} install \
116         DESTDIR=$RPM_BUILD_ROOT
117
118 %if %{with qt5}
119 install -d $RPM_BUILD_ROOT
120 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{name},%{translationdir}}
121 install -p gui/gpsbabel*_*.qm $RPM_BUILD_ROOT%{translationdir}
122 cp -p gui/gmapbase.html $RPM_BUILD_ROOT%{_datadir}/%{name}
123
124 desktop-file-install \
125         --dir $RPM_BUILD_ROOT%{_desktopdir} \
126         %{SOURCE1}
127
128 install -d $RPM_BUILD_ROOT%{_iconsdir}/hicolor/256x256/apps
129 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/256x256/apps
130
131 #%find_lang %{name} --with-qt --all-name
132 # TODO: patch find lang
133 cat <<EOF > %{name}.lang
134 %lang(de) %{translationdir}/gpsbabelfe_de.qm
135 %lang(es) %{translationdir}/gpsbabelfe_es.qm
136 %lang(fr) %{translationdir}/gpsbabelfe_fr.qm
137 %lang(hu) %{translationdir}/gpsbabelfe_hu.qm
138 %lang(it) %{translationdir}/gpsbabelfe_it.qm
139 %lang(ru) %{translationdir}/gpsbabelfe_ru.qm
140 EOF
141
142 %endif
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %files
148 %defattr(644,root,root,755)
149 %doc AUTHORS README* gpsbabel.html
150 %attr(755,root,root) %{_bindir}/gpsbabel
151
152 %if %{with qt5}
153 %files gui -f %{name}.lang
154 %defattr(644,root,root,755)
155 %doc gui/{AUTHORS,README*,TODO}
156 %{_desktopdir}/gpsbabel.desktop
157 %{_iconsdir}/hicolor/*/apps/gpsbabel.png
158 %dir %{_datadir}/%{name}
159 %{_datadir}/%{name}/gmapbase.html
160 %endif
This page took 0.037109 seconds and 3 git commands to generate.