summaryrefslogtreecommitdiffstats
path: root/pokegen.spec
blob: 5e23d6539b584e8dd0036e42e8995e768f6e090d (plain)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
Name:           pokegen
Version:        0.0.1
Release:        1%{?dist}
Summary:        PokéGen is a game engine aiming to emulate the original Pokémon games

Group:          Amusements/Games
License:        GPLv3+
URL:            http://www.sourceforge.net/projects/pokegen
Source:         pokegen-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  kdelibs4-devel tetex-latex desktop-file-utils

%description
PokéGen is a game engine aiming to emulate the original Pokémon games.
It includes a network play and other tools to help create custom games.

%prep
%setup -q


%build
qmake-qt4 PREFIX="%{_prefix}" CXXFLAGS="$RPM_OPT_FLAGS"
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
mkdir %{buildroot}
make INSTALL_ROOT=%{buildroot} install
# Following is based off of KTIGCC's .spec file
# PokeModr menu entry
mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/pokemodr.desktop << EOF1
[Desktop Entry]
Name=PokéModr
Comment=Program to edit PokéMods
GenericName=Program to edit PokéMods
Encoding=UTF-8
Type=Application
Exec=%{_bindir}/pokemodr %U
Icon=pokemodr
Terminal=false
Categories=Qt;KDE;Game;
MimeType=application/x-pokemod+xml;
EOF1
desktop-file-install --delete-original --vendor pokegen \
  --dir=%{buildroot}%{_datadir}/applications            \
  %{buildroot}%{_datadir}/applications/pokemodr.desktop
# GNOME (shared-mime-info) MIME type registration
mkdir -p %{buildroot}%{_datadir}/mime/packages
cat > %{buildroot}%{_datadir}/mime/packages/pokemodr.xml << EOF2
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="application/x-pokemod+xml">
    <sub-class-of type="application/xml" />
    <comment>PokéMod</comment>
    <glob pattern="*.[pP][mM][oO][dD]" />
  </mime-type>
</mime-info>
EOF2
# KDE (legacy) MIME type registration
mkdir -p %{buildroot}%{_datadir}/mimelnk/application
cat > %{buildroot}%{_datadir}/mimelnk/application/x-pokemod+xml.desktop << EOF3
[Desktop Entry]
Encoding=UTF-8
Type=MimeType
MimeType=application/x-pokemod+xml
Icon=application-x-pokemod+xml
Patterns=*.pmod;*.PMOD;
Comment=PokéMod
[Property::X-KDE-text]
Type=bool
Value=true
EOF3


%clean
rm -rf ${buildroot}


%files
%defattr(-,root,root,-)
%doc /usr/share/doc/%{name}-%{version}/DISCLAIMER
%doc /usr/share/doc/%{name}-%{version}/LICENSE
%doc /usr/share/doc/%{name}-%{version}/pokemodr.pdf
%{_bindir}/pokemodr
%{_libdir}/libpokemod.so
%{_libdir}/libpokemod.so.0
%{_libdir}/libpokemod.so.0.0
%{_libdir}/libpokemod.so.0.0.1
%{_datadir}/%{name}/overlays/effect.png
%{_datadir}/%{name}/overlays/no-walk.png
%{_datadir}/%{name}/overlays/overlays.qrc
%{_datadir}/%{name}/overlays/trainer.png
%{_datadir}/%{name}/overlays/walk.png
%{_datadir}/%{name}/overlays/warp.png
%{_datadir}/%{name}/overlays/water.png
%{_datadir}/%{name}/overlays/wilds.png
%{_datadir}/applications/pokegen-pokemodr.desktop
%{_datadir}/mime/packages/pokemodr.xml
%{_datadir}/mimelnk/application/x-pokemod+xml.desktop


%changelog
* Mon Mar 04 2008 Ben Boeckel <MathStuf@gmail.com> 0.0.1-1
- Created