summaryrefslogtreecommitdiff
path: root/marble.spec
blob: 8d9e49fffdd22b1e385e362d48c91df8ffa6adb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
%global __provides_exclude_from ^(%{_libdir}/marble/plugins/.*\\.so)$

Name:          marble
Summary:       Virtual globe and world atlas 
Epoch:         1
Version:       22.08.0
Release:       1

License:       LGPLv2+
URL:           http://edu.kde.org/marble/

%global revision %(echo %{version} | cut -d. -f3)
%if %{revision} >= 50
%global stable unstable
%else
%global stable stable
%endif

Source0:       http://download.kde.org/%{stable}/release-service/%{version}/src/%{name}-%{version}.tar.xz


BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib

BuildRequires: extra-cmake-modules
BuildRequires: kf5-kconfig-devel
BuildRequires: kf5-kcoreaddons-devel
BuildRequires: kf5-kcrash-devel
BuildRequires: kf5-kdoctools-devel
BuildRequires: kf5-ki18n-devel
BuildRequires: kf5-kio-devel
BuildRequires: kf5-knewstuff-devel
BuildRequires: kf5-kparts-devel
BuildRequires: kf5-krunner-devel
BuildRequires: kf5-kservice-devel
BuildRequires: kf5-kwallet-devel
BuildRequires: kf5-rpm-macros
%if 0%{?fedora}
BuildRequires: pkgconfig(libgps)
%endif
BuildRequires: pkgconfig(phonon4qt5)
BuildRequires: pkgconfig(protobuf)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5Script)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Quick)
%ifarch %{?qt5_qtwebengine_arches}
BuildRequires: cmake(Qt5WebEngine)
BuildRequires: cmake(Qt5WebEngineWidgets)
%endif
BuildRequires: pkgconfig(Qt5SerialPort)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Location) pkgconfig(Qt5Positioning)
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: pkgconfig(shapelib)
BuildRequires: pkgconfig(shared-mime-info)
BuildRequires: zlib-devel

Obsoletes:     kdeedu-marble < 4.7.0-10
Provides:      kdeedu-marble = %{version}-%{release}
Provides:      kdeedu-marble%{?_isa} = %{version}-%{release}

Requires:      %{name}-widget-qt5%{?_isa} = %{epoch}:%{version}-%{release}

%description
Marble is a Virtual Globe and World Atlas that you can use to learn more
about Earth: You can pan and zoom around and you can look up places and
roads. A mouse click on a place label will provide the respective Wikipedia
article.

Of course it's also possible to measure distances between locations or watch
the current cloud cover. Marble offers different thematic maps: A classroom-
style topographic map, a satellite view, street map, earth at night and
temperature and precipitation maps. All maps include a custom map key, so it
can also be used as an educational tool for use in class-rooms. For
educational purposes you can also change date and time and watch how the
starry sky and the twilight zone on the map change.

In opposite to other virtual globes Marble also features multiple
projections: Choose between a Flat Map ("Plate carré"), Mercator or the Globe.

%package       qt
Summary:       Marble qt-only interface
Requires:      %{name}-widget-qt5%{?_isa} = %{epoch}:%{version}-%{release}
Requires:      %{name}-common = %{epoch}:%{version}-%{release}

%description   qt
%{summary}.

%package       common
Summary:       Common files of %{name}
BuildArch:     noarch
%if ! 0%{?mobile}
Obsoletes:     marble-mobile < %{epoch}:%{version}-%{release}
%endif
%if ! 0%{?touch}
Obsoletes:     marble-touch < %{epoch}:%{version}-%{release}
%endif

%description   common
{summary}.

%package       astro
Summary:       Marble Astro Library
Requires:      %{name}-common = %{epoch}:%{version}-%{release}

%description   astro
%{summary}.

%package       astro-devel
Summary:       Development files for Marble Astro Library
Requires:      %{name}-astro%{?_isa} = %{epoch}:%{version}-%{release}

%description   astro-devel
%{summary}.

%package       widget-data
Summary:       Marble Widget data
Requires:      %{name}-common = %{epoch}:%{version}-%{release}
BuildArch:     noarch

%description   widget-data
%{summary}.

%package       widget-qt5
Summary:       Marble Widget Library
Requires:      %{name}-astro%{?_isa} = %{epoch}:%{version}-%{release}
Requires:      %{name}-widget-data = %{epoch}:%{version}-%{release}

%description   widget-qt5
%{summary}.

%package       widget-qt5-devel
Summary:       Development files for Qt5 Marble Widget
Requires:      %{name}-widget-qt5%{?_isa} = %{epoch}:%{version}-%{release}
Requires:      cmake(Qt5Xml)
Requires:      cmake(Qt5Widgets)
%ifarch %{?qt5_qtwebengine_arches}
Requires:      cmake(Qt5WebEngine)
Requires:      cmake(Qt5WebEngineWidgets)
%endif

%description   widget-qt5-devel
%{summary}.


%prep
%autosetup -p1

mv src/3rdparty/zlib src/3rdparty/zlib.UNUSED ||:


%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake_kf5} .. \
  -Wno-dev \
  -DBUILD_MARBLE_TESTS:BOOL=OFF \
  -DMARBLE_DATA_PATH:PATH="%{_datadir}/marble/data" \
  -DMARBLE_PRI_INSTALL_USE_QT_SYS_PATHS:BOOL=TRUE \
  -DWITH_DESIGNER_PLUGIN:BOOL=OFF
popd
%make_build -C %{_target_platform}


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}

%find_lang %{name} --all-name --with-html

%find_lang_kf5 marble_qt
cat marble_qt.lang >> %{name}.lang


%check
appstream-util validate-relax --nonet %{buildroot}%{_kf5_metainfodir}/org.kde.marble.appdata.xml
appstream-util validate-relax --nonet %{buildroot}%{_kf5_metainfodir}/org.kde.plasma.worldclock.appdata.xml ||:
appstream-util validate-relax --nonet %{buildroot}%{_kf5_metainfodir}/org.kde.plasma.worldmap.appdata.xml ||:
desktop-file-validate %{buildroot}%{_datadir}/applications/org.kde.marble.desktop
desktop-file-validate %{buildroot}%{_datadir}/applications/org.kde.marble-qt.desktop


%files
%{_bindir}/marble
%{_datadir}/kxmlgui5/marble/
%{_kf5_metainfodir}/org.kde.marble.appdata.xml
%{_kf5_metainfodir}/org.kde.plasma.worldclock.appdata.xml
%{_kf5_metainfodir}/org.kde.plasma.worldmap.appdata.xml
%{_datadir}/plasma/plasmoids/org.kde.plasma.worldclock/
%{_datadir}/plasma/wallpapers/org.kde.plasma.worldmap/
%{_kf5_datadir}/kservices5/plasma-applet-org.kde.plasma.worldclock.desktop
%{_kf5_datadir}/kservices5/plasma-wallpaper-org.kde.plasma.worldmap.desktop
%{_datadir}/applications/org.kde.marble.desktop
%{_datadir}/applications/marble_geo.desktop
%{_datadir}/applications/marble_geojson.desktop
%{_datadir}/applications/marble_gpx.desktop
%{_datadir}/applications/marble_kml.desktop
%{_datadir}/applications/marble_kmz.desktop
%{_datadir}/applications/marble_shp.desktop
%{_datadir}/applications/marble_worldwind.desktop
%{_datadir}/config.kcfg/marble.kcfg
%{_datadir}/kservices5/marble_thumbnail_geojson.desktop
%{_datadir}/kservices5/marble_thumbnail_gpx.desktop
%{_datadir}/kservices5/marble_thumbnail_kml.desktop
%{_datadir}/kservices5/marble_thumbnail_kmz.desktop
%{_datadir}/kservices5/marble_thumbnail_osm.desktop
%{_datadir}/kservices5/marble_thumbnail_shp.desktop
%{_kf5_datadir}/knsrcfiles/%{name}.knsrc

%files common -f %{name}.lang
%license LICENSE.txt
%doc CREDITS MANIFESTO.txt USECASES
%{_datadir}/icons/hicolor/*/apps/marble.*
%{_datadir}/mime/packages/geo.xml
%dir %{_datadir}/marble/

%files qt
%{_bindir}/marble-qt
%{_datadir}/applications/org.kde.marble-qt.desktop

%ldconfig_scriptlets astro

%files astro
%{_libdir}/libastro.so.*

%files astro-devel
%{_includedir}/astro/
%{_kde4_libdir}/libastro.so
%dir %{_libdir}/cmake/
%{_libdir}/cmake/Astro/

%files widget-data
%{_datadir}/marble/data/

%ldconfig_scriptlets widget-qt5

%files widget-qt5
%{_libdir}/libmarblewidget-qt5.so.*
%{_libdir}/marble/plugins/
%{_qt5_plugindir}/marblethumbnail.so
%{_kf5_plugindir}/krunner/plasma_runner_marble.so
%{_datadir}/kservices5/marble_part.desktop
%{_qt5_plugindir}/libmarble_part.so
%{_libdir}/libmarbledeclarative.so
%{_kf5_qmldir}/org/kde/marble/

%files widget-qt5-devel
%{_includedir}/marble/
%{_libdir}/libmarblewidget-qt5.so
%dir %{_libdir}/cmake/
%{_libdir}/cmake/Marble/
%{_qt5_archdatadir}/mkspecs/modules/qt_Marble.pri


%changelog
* Sat Dec 17 2022 misaka00251 <liuxin@iscas.ac.cn> - 1:22.08.0-1
- Init package