File: critter.spec

package info (click to toggle)
criticalmass 1%3A1.0.0-1.2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 18,444 kB
  • ctags: 16,319
  • sloc: ansic: 47,628; cpp: 25,167; sh: 11,811; xml: 3,532; perl: 3,271; makefile: 659; python: 66; awk: 40; lisp: 33
file content (68 lines) | stat: -rw-r--r-- 1,647 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
%define distrib %(if [ -f /etc/fedora-release ]; then echo -n "_FC"; cat /etc/fedora-release | awk '{print $4}'; fi)

%define ver      1.0.0
%define rel      1%{distrib}
%define prefix   /usr

Summary: SDL/OpenGL space shoot'em up game
Name:		CriticalMass
Version:	%ver
Release:	%rel
Copyright:	GPL
Group:		Amusements/Games
URL:		http://criticalmass.sourceforge.net
BuildRoot:	/var/tmp/%{name}-%{version}-root
Prefix:         %{prefix}
Source:		http://prdownloads.sourceforge.net/criticalmass/CriticalMass-%{ver}.tar.bz2

Requires: libpng >= 1.0.8
Requires: zlib >= 1.1.3

%description
Critical Mass (aka Critter) is an SDL/OpenGL space shoot'em up game.

%prep
%setup

%build
if [ ! -f configure ]; then
  CFLAGS="$MYCFLAGS" ./autogen.sh $MYARCH_FLAGS --prefix=%prefix
fi
CFLAGS="$MYCFLAGS" ./configure $MYARCH_FLAGS --prefix=%prefix

make

%install
rm -rf $RPM_BUILD_ROOT

make prefix=$RPM_BUILD_ROOT%{prefix} install

mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/applications
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/icons

install -m 744 critter.png $RPM_BUILD_ROOT/%{prefix}/share/icons/critter.png

cat > $RPM_BUILD_ROOT/%{prefix}/share/applications/critter.desktop << EOF
[Desktop Entry]
Encoding=UTF-8
Name=Critical Mass
Exec=%{prefix}/bin/critter
Icon=%{prefix}/share/icons/critter.png
Type=Application
Terminal=False
Categories=Application;Game;ArcadeGame;
EOF

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)

%doc Readme.html COPYING TODO
%{prefix}/bin/critter
%{prefix}/bin/Packer
%{prefix}/share/Critical_Mass/*
%{prefix}/man/man6/critter.6.gz
%{prefix}/share/applications/critter.desktop
%{prefix}/share/icons/critter.png