]> git.pld-linux.org Git - packages/crrcsim.git/blob - crrcsim.spec
- BR: s/pkg-config/pkgconfig/
[packages/crrcsim.git] / crrcsim.spec
1 #
2 # TODO:
3 # - lib64 support (Makefile.linux64 or patch for Makefile.linux)
4 # - addons - crrcsim-addon-models-0.2.0.zip
5 #
6 # Does not compile with glut:
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
22 #Summary(pl.UTF-8):
23 Name:           crrcsim
24 Version:        0.9.8
25 Release:        0.2
26 License:        GPL
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)
50
51 %description
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.
56
57 #%description -l pl.UTF-8
58
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
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
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 \
91         DESTDIR=$RPM_BUILD_ROOT
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
101 %files
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
This page took 0.086486 seconds and 3 git commands to generate.