]> git.pld-linux.org Git - packages/crrcsim.git/blob - crrcsim.spec
- initial, works fine but not on 64bits
[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/%{name}/%{name}-src-%{version}-%{_rel}.tar.gz
29 # Source0-md5:  c89b4458fe0697059d40a2e4636632d0
30 Source1:        %{name}.desktop
31 URL:            http:///crrcsim.sourceforge.net/
32 BuildRequires:  autoconf
33 BuildRequires:  automake
34 %{?with_sound:BuildRequires:    pulseaudio-devel = 18.1}
35 BuildRequires:  gle-devel
36 BuildRequires:  glew-devel
37 BuildRequires:  freeglut-devel 
38 #BuildRequires: glut-devel = 3.7
39 BuildRequires:  sed >= 4.0
40 BuildRequires:  SDL-devel
41 BuildRequires:  OpenGL-devel
42 BuildRequires:  OpenGL-GLU-devel
43 BuildRequires:  xorg-lib-libXi-devel
44 BuildRequires:  xorg-lib-libXt-devel
45 BuildRequires:  xorg-lib-libXmu-devel
46 BuildRequires:  xorg-lib-libXext-devel
47 BuildRequires:  pkg-config
48 BuildRequires:  rpmbuild(macros) >= 1.129
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 CRRCSim is a model-airplane flight simulation program for 
53 Linux with ports to other platforms. Using CRRCSim you can 
54 learn how to fly model aircraft, test new aircraft designs, 
55 and improve your skills by practicing in the relative safety of your pc.
56
57 #%description -l pl.UTF-8
58 #Mikser dżwięku dla KDE 3 i ALSY, posiadający możliwości, w które kmix
59 #jest ubogi.
60
61 %prep
62 %setup -q -n %{name}-%{version}-%{_rel}
63
64 %if %{without sound}
65 %{__sed} -i 's/COMPILE_AUDIO_INTERFACE 1/COMPILE_AUDIO_INTERFACE 0/' crrc_config.h
66 %{__sed} -i 's/CRRC_LINKER_FLAGS += -lportaudio/#CRRC_LINKER_FLAGS += -lportaudio/' Makefile.linux
67 %endif
68
69 %{__sed} -i 's/\/usr\/local\/share\/games/$(DESTDIR)\/usr\/share/' Makefile.linux
70 %{__sed} -i 's/\/usr\/local/$*DESTDIR)\/usr/' Makefile.linux
71 %{__sed} -i 's/\/usr\/local\/share\/games/\/usr\/share/' config.cpp
72
73 %build
74 #cp -f /usr/share/automake/config.* admin
75 %{__make} -f Makefile.linux %{?with_debug:debug} \
76         OPT_FLAGS="%{rpmcflags}" \
77         CC_MODULE="%{__cc}" \
78         CC="%{__cxx}" \
79         CXX="%{__cxx}" \
80         C++="%{__cxx}"
81
82 #%if "%{_lib}" == "lib64"
83 #       --enable-libsuffix=64 \
84 #%endif
85 #       --with-qt-libraries=%{_libdir}
86 #%{__make}
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 %{__make} -f Makefile.linux install \
92         DESTDIR=$RPM_BUILD_ROOT 
93
94 install -d $RPM_BUILD_ROOT%{_desktopdir}
95 install -d $RPM_BUILD_ROOT%{_pixmapsdir}
96 cp ./packages/icons/crrcsim.png $RPM_BUILD_ROOT%{_pixmapsdir}
97 cp %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %files 
103 %defattr(644,root,root,755)
104 %doc README CHANGES_BY_KL  CHANGES_BY_TT
105 %attr(755,root,root) %{_bindir}/%{name}
106 %{_datadir}/%{name}
107 %{_pixmapsdir}/*.png
108 %{_desktopdir}/*.desktop
This page took 0.088933 seconds and 3 git commands to generate.