]> git.pld-linux.org Git - packages/FlightGear.git/blob - FlightGear.spec
- unconditional noarch subpackages
[packages/FlightGear.git] / FlightGear.spec
1 # TODO:
2 # - Make FlightGear-extra-planes for subset of planes from
3 #   http://www.flightgear.org/Downloads/aircraft/index.shtml
4
5 #
6 # Conditional build:
7 %bcond_without  data            # don't build data package (for quick test build)
8 #
9 Summary:        Free Flight Simulator
10 Summary(pl.UTF-8):      darmowy symulator lotu
11 Name:           FlightGear
12 Version:        2016.2.1
13 Release:        1
14 License:        GPL
15 Group:          X11/Applications/Games
16 Source0:        http://downloads.sourceforge.net/project/flightgear/release-2016.2/flightgear-%{version}.tar.bz2
17 # Source0-md5:  04b4817ba9d8953013c43f5f201b495f
18 Source1:        http://downloads.sourceforge.net/project/flightgear/release-2016.2//%{name}-%{version}-data.tar.bz2
19 # Source1-md5:  f118026487513e16d0aad185d3818f7b
20 Patch0:         flightgear-cmake.patch
21 URL:            http://www.flightgear.org/
22 BuildRequires:  OpenAL-devel
23 BuildRequires:  OpenGL-devel
24 BuildRequires:  OpenSceneGraph-devel
25 BuildRequires:  SimGear-devel = %{version}
26 BuildRequires:  cmake
27 BuildRequires:  flite-devel
28 BuildRequires:  fltk-gl-devel
29 BuildRequires:  freeglut-devel
30 BuildRequires:  libgsm-devel
31 BuildRequires:  libstdc++-devel
32 BuildRequires:  speex-devel
33 BuildRequires:  sqlite3-devel
34 BuildRequires:  plib-devel >= 1.8.5-3
35 BuildRequires:  zlib-devel
36 Requires:       %{name}-data = %{version}
37 Requires:       OpenGL
38 Requires:       OpenSceneGraph-plugins
39 Requires:       plib >= 1.8.4
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %define         _noautoreqdep   libGL.so.1 libGLU.so.1 libGLcore.so.1
43 %define         filterout       -flto
44
45 %description
46 The Flight Gear project is working to create a sophisticated flight
47 simulator framework for the development and pursuit of interesting
48 flight simulator ideas. We are developing a solid basic sim that can
49 be expanded and improved upon by anyone interested in contributing.
50
51 %description -l pl.UTF-8
52 Projekt Flight Gear to wyrafinowany symulator lotów pozwalający
53 rozpowszechniać idee tego typu symulacji.
54
55 %package data
56 Summary:        FlightGear base scenery and data files
57 License:        GPL v2+
58 Group:          Applications/Games
59 %if "%{_rpmversion}" >= "5"
60 BuildArch:      noarch
61 %endif
62
63 %description data
64 This package contains the base scenery for FlightGear and must be
65 installed
66
67 %prep
68 %setup -q -n flightgear-%{version} %{?with_data:-a 1}
69 %patch0 -p1
70
71 cat > runfgfs <<'EOF'
72 #!/bin/sh
73 exec %{_bindir}/fgfs --fg-root=%{_datadir}/games/%{name}/fgdata "$@"
74 EOF
75
76 %build
77 install -d build
78 cd build
79 %cmake .. \
80         -DSYSTEM_SQLITE:BOOL=ON
81
82 %{__make}
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT%{_datadir}/games/%{name}
87
88 %{__make} -C build install \
89         DESTDIR=$RPM_BUILD_ROOT
90
91 install -p runfgfs $RPM_BUILD_ROOT%{_bindir}
92 %if %{with data}
93 cp -a fgdata $RPM_BUILD_ROOT%{_datadir}/games/%{name}
94 %endif
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %files
100 %defattr(644,root,root,755)
101 %doc AUTHORS NEWS docs-mini/*
102 %attr(755,root,root) %{_bindir}/*
103 %{_mandir}/*/*
104
105 %if %{with data}
106 %files data
107 %defattr(644,root,root,755)
108 %{_datadir}/games/%{name}
109 %endif
This page took 0.065364 seconds and 3 git commands to generate.