-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathflyhigh.spec
More file actions
130 lines (102 loc) · 4.16 KB
/
flyhigh.spec
File metadata and controls
130 lines (102 loc) · 4.16 KB
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
Name: flyhigh
License: GPL
Group: Productivity/Databases/Clients
Summary: A GPS flight device manager
Version: 0.7.0
Release: 1
URL: http://flyhigh.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %name-%{version}.tar.gz
Provides: flyhigh = %{version}
Obsoletes: flyhigh < %{version}
%if 0%{?suse_version}
BuildRequires: libqt4-devel cmake update-desktop-files
Requires: gnuplot update-desktop-files
%endif
%if 0%{?fedora}
BuildRequires: libqt4-devel cmake gcc-c++ desktop-file-utils
Requires: gnuplot
%endif
%if 0%{?rhel_version} || 0%{?centos_version}
BuildRequires: qt4 qt4-devel cmake gcc-c++ desktop-file-utils
Requires: gnuplot
%endif
%if 0%{?mandriva_version}
BuildRequires: libqt4-devel cmake
Requires: gnuplot
%endif
%description
Configuration of GPS flight devices, r/d tasks, r/w/d waypoints, r/w/d routes,
r/w/d CTRs, flight book. Show flight as graphic using gnuplot.
Supported devices: Flytec 5020, 6015, Competino and IQ Basic from Brauniger.
%prep
# extract the source and go into the flyhigh-0.7.0 directory
%setup -q
%build
# generate makefiles and build
mkdir build
cd build
%if 0%{?mandriva_version}
export PATH=/usr/lib/qt4/bin:$PATH
export QTDIR=%{_prefix}/lib/qt4/
%endif
%if 0%{?rhel_version} || 0%{?centos_version}
cmake -DQT_QMAKE_EXECUTABLE=/usr/lib/qt4/bin/qmake ..
%else
cmake ..
%endif
make %{?_smp_mflags}
%install
# install files into BuildRoot
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
# strip executable
strip -o $RPM_BUILD_ROOT/%{_bindir}/%{name} build/src/%{name}
# copy icon
mkdir -p $RPM_BUILD_ROOT/%_datadir/pixmaps/
cp src/images/flyhigh.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps/%{name}.png
# proper position in the start menu
%if 0%{?suse_version}
%suse_update_desktop_file -c %{name} %{name} "Flight device & flight book manager" %{name} %{name} Graphics Database Archiving Utility Viewer
%endif
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
# create a desktop file
mkdir -p $RPM_BUILD_ROOT/%_datadir/applications/
echo '[Desktop Entry]' > $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Encoding=UTF-8' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Name=flyhigh' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Comment=Flight device and flight book manager' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Exec=flyhigh' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Icon=flyhigh' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Type=Application' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Categories=Graphics;Archiving;Utility;Viewer;' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
desktop-file-install --add-category="Database" --delete-original --dir=$RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
%endif
%if 0%{?mandriva_version}
# create a desktop file
mkdir -p $RPM_BUILD_ROOT/%_datadir/applications/
echo '[Desktop Entry]' > $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Encoding=UTF-8' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Name=flyhigh' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Comment=Flight device and flight book manager' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Exec=flyhigh' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Icon=flyhigh' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Type=Application' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
echo 'Categories=Graphics;Archiving;Utility;Viewer;' >> $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
%{update_menus}
%endif
%clean
# clean up the hard disc after build
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README INSTALL TODO
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog
* Tue Nov 09 2010 - ja_kern@sf.net
- support for mandriva
* Mon Nov 08 2010 - ja_kern@sf.net
- support for fedora, rhel and centos
* Mon Oct 11 2010 - ja_kern@sf.net
- initial package created