1# Spec file to build RPM packages - shamefully ripped from Exult
2# (but since they got our configure summary, that's just fair I guess)
3
4%define ver         0.3.8
5%define rel         1
6%define prefix      /usr
7%define name        adonthell
8%define bindir      %prefix/bin
9%define datadir     %prefix/share
10%define gamedatadir %prefix/share/adonthell
11
12Summary: A 2D graphical RPG game.
13Name: %name
14Version: %ver
15Release: %rel
16License: GPL
17Group: Amusements/Games
18Source: http://freesoftware.fsf.org/download/adonthell/%{name}-%{ver}.tar.gz
19URL: http://adonthell.linuxgames.com
20BuildRoot: /tmp/adonthell
21Prereq: /usr/bin/strip
22Prefix: %prefix
23Docdir: %{prefix}/doc
24
25%description
26A 2D, graphical, single player role playing game inspired by good old
27console RPGs from the SNES like Secret of Mana or Chrono Trigger.
28
29This package contains the Adonthell engine. You will also need a game
30package to play Adonthell. For this release, the official package is
31Waste's Edge.
32
33%prep
34%setup
35
36%build
37if [ ! -f configure ]; then
38  ./autogen.sh
39fi
40CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix --bindir=%bindir --datadir=%datadir
41make
42
43%install
44rm -rf $RPM_BUILD_ROOT
45make prefix=$RPM_BUILD_ROOT%{prefix} bindir=$RPM_BUILD_ROOT%{bindir} gamedatadir=$RPM_BUILD_ROOT%{gamedatadir} install
46strip $RPM_BUILD_ROOT%{bindir}/adonthell
47install -m 644 src/modules/adonthell.py $RPM_BUILD_ROOT%{gamedatadir}/modules/adonthell.py
48install -m 644 src/modules/dialogue.py $RPM_BUILD_ROOT%{gamedatadir}/modules/dialogue.py
49
50
51
52%clean
53rm -rf $RPM_BUILD_ROOT
54
55%files
56%defattr(-,root,root)
57%doc ABOUT-NLS ChangeLog COPYING NEWS FULLSCREEN.howto README
58%{bindir}/adonthell
59%{gamedatadir}/modules/adonthell.py
60%{gamedatadir}/modules/dialogue.py
61