3 # - lib64 support (Makefile.linux64 or patch for Makefile.linux)
4 # - addons - crrcsim-addon-models-0.2.0.zip
6 # Does not compile with glut:
7 # http://lists.pld-linux.org/mailman/pipermail/pld-devel-pl/2006-November/137392.html
9 # pulseaudio-devel > 18.1
10 # In file included from audio_interface/tx_audio.cpp:9:
11 # audio_interface/audio_rc.c: In function 'int audio_rc_open(T_TX_InterfaceAudio*)':
12 # audio_interface/audio_rc.c:251: error: 'Pa_GetCountDevices' was not declared in this scope
13 # audio_interface/audio_rc.c:265: error: 'Pa_GetDefaultInputDevice' was not declared in this scope
16 %bcond_with debug # build with debug
17 %bcond_with sound # build with sound
21 Summary: model-airplane flight simulator
27 Group: X11/Applications/Games
28 Source0: http://dl.sourceforge.net/crrcsim/%{name}-src-%{version}-%{_rel}.tar.gz
29 # Source0-md5: c89b4458fe0697059d40a2e4636632d0
30 Source1: %{name}.desktop
31 URL: http:///crrcsim.sourceforge.net/
32 BuildRequires: OpenGL-GLU-devel
33 BuildRequires: OpenGL-devel
34 BuildRequires: SDL-devel
35 BuildRequires: autoconf
36 BuildRequires: automake
37 BuildRequires: freeglut-devel
38 BuildRequires: gle-devel
39 BuildRequires: glew-devel
40 #BuildRequires: glut-devel = 3.7
41 BuildRequires: pkgconfig
42 %{?with_sound:BuildRequires: pulseaudio-devel = 18.1}
43 BuildRequires: rpmbuild(macros) >= 1.129
44 BuildRequires: sed >= 4.0
45 BuildRequires: xorg-lib-libXext-devel
46 BuildRequires: xorg-lib-libXi-devel
47 BuildRequires: xorg-lib-libXmu-devel
48 BuildRequires: xorg-lib-libXt-devel
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 CRRCSim is a model-airplane flight simulation program for Linux with
53 ports to other platforms. Using CRRCSim you can learn how to fly model
54 aircraft, test new aircraft designs, and improve your skills by
55 practicing in the relative safety of your pc.
57 #%description -l pl.UTF-8
61 %setup -q -n %{name}-%{version}-%{_rel}
64 %{__sed} -i 's/COMPILE_AUDIO_INTERFACE 1/COMPILE_AUDIO_INTERFACE 0/' crrc_config.h
65 %{__sed} -i 's/CRRC_LINKER_FLAGS += -lportaudio/#CRRC_LINKER_FLAGS += -lportaudio/' Makefile.linux
68 %{__sed} -i 's/\%{_prefix}\/local\/share\/games/$(DESTDIR)\%{_prefix}\/share/' Makefile.linux
69 %{__sed} -i 's/\%{_prefix}\/local/$(DESTDIR)\%{_prefix}/' Makefile.linux
70 %{__sed} -i 's/\%{_prefix}\/local\/share\/games/\%{_prefix}\/share/' config.cpp
73 #cp -f /usr/share/automake/config.* admin
74 %{__make} -f Makefile.linux %{?with_debug:debug} \
75 OPT_FLAGS="%{rpmcflags}" \
81 #%if "%{_lib}" == "lib64"
82 # --enable-libsuffix=64 \
84 # --with-qt-libraries=%{_libdir}
88 rm -rf $RPM_BUILD_ROOT
90 %{__make} -f Makefile.linux install \
91 DESTDIR=$RPM_BUILD_ROOT
93 install -d $RPM_BUILD_ROOT%{_desktopdir}
94 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
95 cp ./packages/icons/crrcsim.png $RPM_BUILD_ROOT%{_pixmapsdir}
96 cp %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
99 rm -rf $RPM_BUILD_ROOT
102 %defattr(644,root,root,755)
103 %doc README CHANGES_BY_KL CHANGES_BY_TT
104 %attr(755,root,root) %{_bindir}/%{name}
107 %{_desktopdir}/*.desktop