]>
Commit | Line | Data |
---|---|---|
700c6fe1 | 1 | # |
3c8a2d18 | 2 | # TODO: |
700c6fe1 BZ |
3 | # - lib64 support (Makefile.linux64 or patch for Makefile.linux) |
4 | # - addons - crrcsim-addon-models-0.2.0.zip | |
5 | # | |
3c8a2d18 | 6 | # Does not compile with glut: |
700c6fe1 BZ |
7 | # http://lists.pld-linux.org/mailman/pipermail/pld-devel-pl/2006-November/137392.html |
8 | # | |
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 | |
14 | # | |
15 | # Conditional build: | |
16 | %bcond_with debug # build with debug | |
17 | %bcond_with sound # build with sound | |
18 | ||
19 | %define _rel 2 | |
20 | ||
21 | Summary: model-airplane flight simulator | |
3c8a2d18 | 22 | #Summary(pl.UTF-8): |
700c6fe1 BZ |
23 | Name: crrcsim |
24 | Version: 0.9.8 | |
25 | Release: 0.2 | |
26 | License: GPL | |
27 | Group: X11/Applications/Games | |
3c8a2d18 | 28 | Source0: http://dl.sourceforge.net/crrcsim/%{name}-src-%{version}-%{_rel}.tar.gz |
700c6fe1 BZ |
29 | # Source0-md5: c89b4458fe0697059d40a2e4636632d0 |
30 | Source1: %{name}.desktop | |
31 | URL: http:///crrcsim.sourceforge.net/ | |
3c8a2d18 BZ |
32 | BuildRequires: OpenGL-GLU-devel |
33 | BuildRequires: OpenGL-devel | |
34 | BuildRequires: SDL-devel | |
700c6fe1 BZ |
35 | BuildRequires: autoconf |
36 | BuildRequires: automake | |
3c8a2d18 | 37 | BuildRequires: freeglut-devel |
700c6fe1 BZ |
38 | BuildRequires: gle-devel |
39 | BuildRequires: glew-devel | |
700c6fe1 | 40 | #BuildRequires: glut-devel = 3.7 |
a38fbee2 | 41 | BuildRequires: pkgconfig |
3c8a2d18 BZ |
42 | %{?with_sound:BuildRequires: pulseaudio-devel = 18.1} |
43 | BuildRequires: rpmbuild(macros) >= 1.129 | |
700c6fe1 | 44 | BuildRequires: sed >= 4.0 |
3c8a2d18 | 45 | BuildRequires: xorg-lib-libXext-devel |
700c6fe1 | 46 | BuildRequires: xorg-lib-libXi-devel |
700c6fe1 | 47 | BuildRequires: xorg-lib-libXmu-devel |
3c8a2d18 | 48 | BuildRequires: xorg-lib-libXt-devel |
700c6fe1 BZ |
49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
50 | ||
51 | %description | |
3c8a2d18 BZ |
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. | |
700c6fe1 BZ |
56 | |
57 | #%description -l pl.UTF-8 | |
3c8a2d18 | 58 | |
700c6fe1 BZ |
59 | |
60 | %prep | |
61 | %setup -q -n %{name}-%{version}-%{_rel} | |
62 | ||
63 | %if %{without sound} | |
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 | |
66 | %endif | |
67 | ||
3c8a2d18 | 68 | %{__sed} -i 's/\%{_prefix}\/local\/share\/games/$(DESTDIR)\%{_prefix}\/share/' Makefile.linux |
b135fc32 | 69 | %{__sed} -i 's/\%{_prefix}\/local/$(DESTDIR)\%{_prefix}/' Makefile.linux |
3c8a2d18 | 70 | %{__sed} -i 's/\%{_prefix}\/local\/share\/games/\%{_prefix}\/share/' config.cpp |
700c6fe1 BZ |
71 | |
72 | %build | |
73 | #cp -f /usr/share/automake/config.* admin | |
74 | %{__make} -f Makefile.linux %{?with_debug:debug} \ | |
75 | OPT_FLAGS="%{rpmcflags}" \ | |
76 | CC_MODULE="%{__cc}" \ | |
77 | CC="%{__cxx}" \ | |
78 | CXX="%{__cxx}" \ | |
79 | C++="%{__cxx}" | |
80 | ||
81 | #%if "%{_lib}" == "lib64" | |
82 | # --enable-libsuffix=64 \ | |
83 | #%endif | |
84 | # --with-qt-libraries=%{_libdir} | |
85 | #%{__make} | |
86 | ||
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %{__make} -f Makefile.linux install \ | |
3c8a2d18 | 91 | DESTDIR=$RPM_BUILD_ROOT |
700c6fe1 BZ |
92 | |
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} | |
97 | ||
98 | %clean | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
3c8a2d18 | 101 | %files |
700c6fe1 BZ |
102 | %defattr(644,root,root,755) |
103 | %doc README CHANGES_BY_KL CHANGES_BY_TT | |
104 | %attr(755,root,root) %{_bindir}/%{name} | |
105 | %{_datadir}/%{name} | |
106 | %{_pixmapsdir}/*.png | |
107 | %{_desktopdir}/*.desktop |