/[packages]/updates/2/freeciv/current/SPECS/freeciv.spec
ViewVC logotype

Contents of /updates/2/freeciv/current/SPECS/freeciv.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 344778 - (show annotations) (download)
Thu Jan 10 18:46:34 2013 UTC (11 years, 9 months ago) by luigiwalser
File size: 5150 byte(s)
add upstream patch to fix CVE-2012-5645
1 Name: freeciv
2 Version: 2.3.1
3 %define subrel 1
4 Release: %mkrel 1
5 Summary: CIVilization clone
6 License: GPLv2+
7 Group: Games/Strategy
8 URL: http://www.freeciv.org/
9 Source0: http://downloads.sourceforge.net/freeciv/Freeciv%202.3/%{version}/%{name}-%{version}.tar.bz2
10 Source1: %{name}.server.wrapper
11 Source2: stdsounds2.tar.bz2
12 Patch0: freeciv-2.3.2-CVE-2012-5645.patch
13 BuildRequires: SDL_mixer-devel
14 BuildRequires: gtk+2-devel
15 BuildRequires: ncurses-devel
16 BuildRequires: readline-devel
17 BuildRequires: desktop-file-utils
18 BuildRequires: ggz-gtk-client-devel
19 Requires(post): ggz-client-libs
20 Requires(preun): ggz-client-libs
21
22 %description
23 Freeciv is a multiplayer strategy game, released under the GNU General
24 Public License. It is generally comparable with Civilization II(r),
25 published by Microprose(r).
26
27 Default configuration uses the Civilization II(r) style Isometric view. If
28 you prefer classic Civilization(r) 2-d view, invoke the client with
29 "civclient --tiles trident".
30
31 %package data
32 Group: Games/Strategy
33 Summary: FREE CIVilization clone - data files
34 Requires: %{name}-server = %{version}
35 BuildArch: noarch
36
37 %description data
38 Freeciv is a multiplayer strategy game, released under the GNU General
39 Public License. It is generally comparable with Civilization II(r),
40 published by Microprose(r).
41
42 Default configuration uses the Civilization II(r) style Isometric view. If
43 you prefer classic Civilization(r) 2-d view, invoke the client with
44 "civclient --tiles trident".
45
46 %package client
47 Group: Games/Strategy
48 Summary: FREE CIVilization clone - client
49 Provides: %{name}
50 Obsoletes: %{name}
51 Requires: %{name}-data = %{version} %{name}-server = %{version}
52 Obsoletes: %{name}-client < %{version}-%{release}
53 Requires(post): ggz-client-libs
54 Requires(preun): ggz-client-libs
55
56 %description client
57 This is the graphical client for freeciv
58
59 %package server
60 Group: Games/Strategy
61 Summary: FREE CIVilization clone - server
62 Provides: %{name}
63 Obsoletes: %{name}
64 Requires: %{name}-data = %{version}
65 Requires(post): ggz-client-libs
66 Requires(preun): ggz-client-libs
67
68 %description server
69 This is the server for freeciv.
70
71 %prep
72 %setup -q
73 %patch0 -p1 -b .CVE-2012-5645
74
75 %build
76 #locales are not in %{_gamesdatadir}
77 export localedir=%{_datadir}/locale
78
79 %configure2_5x \
80 --bindir=%{_gamesbindir} \
81 --datadir=%{_gamesdatadir} \
82 --enable-client=gtk-2.0 \
83 --enable-ipv6=yes
84
85 %make
86
87 %install
88 rm -rf %{buildroot}
89 %makeinstall_std localedir=%{_datadir}/locale
90
91 tar -jxf %{SOURCE2} -C %{buildroot}%{_gamesdatadir}/%{name}
92
93 # wrapper
94 mv %{buildroot}%{_gamesbindir}/freeciv-server %{buildroot}%{_gamesbindir}/civserver.real
95 install -m 755 %{SOURCE1} %{buildroot}%{_gamesbindir}/freeciv-server
96
97 # fix icons locations
98 mv %{buildroot}%{_gamesdatadir}/icons %{buildroot}%{_datadir}/icons
99
100 # menu entry
101 desktop-file-install --vendor="" \
102 --remove-category="Application" \
103 --remove-category="GNOME" \
104 --remove-category="Strategy" \
105 --add-category="GTK" \
106 --add-category="StrategyGame" \
107 --dir %{buildroot}%{_datadir}/applications \
108 %{buildroot}%{_datadir}/applications/*.desktop
109
110 %find_lang %{name}
111
112 # omit ggz.modules, to register at install, not build, time.
113 rm %{buildroot}%{_sysconfdir}/ggz.modules
114 # include .dsc files
115 mkdir -p %{buildroot}%{_datadir}/ggz
116 install -p -D -m644 data/civclient.dsc %{buildroot}%{_datadir}/ggz/civclient.dsc
117 install -p -D -m644 data/civclient.dsc %{buildroot}%{_datadir}/ggz/civserver.dsc
118
119 #remove unneeded
120 rm -f %{buildroot}%{_libdir}/*a
121 rm -f %{buildroot}%{_mandir}/man6/*ftwl*
122 rm -f %{buildroot}%{_mandir}/man6/*sdl*
123 rm -f %{buildroot}%{_mandir}/man6/*win32*
124 rm -f %{buildroot}%{_mandir}/man6/*xaw*
125
126 %clean
127 rm -rf %{buildroot}
128
129 %post client
130 %{_bindir}/ggz-config --install --force --modfile=%{_datadir}/ggz/civclient.dsc || :
131
132 %preun client
133 if [ $1 -eq 0 ]; then
134 %{_bindir}/ggz-config --remove --modfile=%{_datadir}/ggz/civclient.dsc || :
135 fi
136
137 %post server
138 %{_bindir}/ggz-config --install --force --modfile=%{_datadir}/ggz/civserver.dsc || :
139
140 %preun server
141 if [ $1 -eq 0 ]; then
142 %{_bindir}/ggz-config --remove --modfile=%{_datadir}/ggz/civserver.dsc || :
143 fi
144
145 %files -f %{name}.lang data
146 %defattr(-,root,root)
147 %doc AUTHORS doc/BUGS doc/HOWTOPLAY NEWS doc/README doc/README.AI doc/README.graphics doc/README.rulesets doc/README.sound doc/HACKING
148 %{_gamesdatadir}/%{name}
149
150 %files client
151 %defattr(-,root,root)
152 %{_gamesbindir}/freeciv-gtk2
153 %{_gamesbindir}/freeciv-manual
154 %{_gamesbindir}/freeciv-modpack
155 %{_mandir}/man6/freeciv-client.6*
156 %{_mandir}/man6/freeciv-gtk2.6*
157 %{_mandir}/man6/freeciv-modpack.6*
158 %{_datadir}/applications/freeciv.desktop
159 %{_datadir}/applications/freeciv-modpack.desktop
160 %{_datadir}/pixmaps/freeciv-client.png
161 %{_iconsdir}/hicolor/*/apps/freeciv-client.png
162 %{_iconsdir}/hicolor/*/apps/freeciv-modpack.png
163 %{_datadir}/ggz/civclient.dsc
164
165 %files server
166 %defattr(-,root,root)
167 %{_gamesbindir}/civserver.real
168 %{_gamesbindir}/freeciv-server
169 %{_mandir}/man6/freeciv-server.6*
170 %{_datadir}/applications/freeciv-server.desktop
171 %{_iconsdir}/hicolor/*/apps/freeciv-server.png
172 %{_datadir}/ggz/civserver.dsc
173
174

  ViewVC Help
Powered by ViewVC 1.1.30