Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] (PR#9982) Freeciv .spec file
Home

[Freeciv-Dev] (PR#9982) Freeciv .spec file

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mstefek@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#9982) Freeciv .spec file
From: "Egor Vyscrebentsov via RT" <evyscr@xxxxxxxxx>
Date: Thu, 9 Sep 2004 02:18:56 -0700
Reply-to: RT_CorrespondAddressNotSet@xxxxxxxxxxxxxx

<URL: http://RT::WebBaseURL.not.configured:80/Ticket/Display.html?id=9982 >

> [mstefek - Sep 08 09:16:33 2004]: 
>  
> This is the first version of Freeciv .spec file (RPM configuration 
> file). I think we need some semi-official RPM policy, because for 
> example Mandrake did it bad. 
> 
> I divided Freeciv into three packages: 
> freeciv-server (civserver, rulesetdirs, *.serv, civserver man) 
> freeciv-client (civclient, tilesets, *.rc, civclient man) 
> freeciv-l10n (*.mo files) 
> 
> This package works only for GTK-2 client 
> 
> Most documentation is included in freeciv-server, but README.graphics 
> and README.attributes are included in freeciv-client. 
> 
Maybe, freeciv-docs? (Manuals could be included in it) 
 
> I didn't include menu files. 
>  
> What do you think about that? 
> -- 
> mateusz 
>  
Maybe, you will want to look at attached specfile, which was made from ALT 
Linux specfile at dec 2003. 
Name: freeciv
Version: 1.14.1
#%%define beta_ver 4
Release: ev1%{?beta_ver:.b%beta_ver}

Summary: The Freeciv multi-player strategy game
License: GPL
Group: Games/Strategy
Url: http://www.freeciv.org/

%define srcname %name-%version%{?beta_ver:-beta%beta_ver}
Source0: 
ftp://ftp.freeciv.org/pub/freeciv/%{?beta_ver:beta}%{!?beta_ver:stable}/%srcname.tar.bz2
Source1: 
ftp://ftp.freeciv.org/pub/freeciv/contrib/sounds/sets/stdsounds2.tar.bz2
Source2: http://www.freeciv.org/manual/manual-1.13.0-1.tar.bz2
Source3: manual-skel.tar.bz2
Source4: %name-wrapper
Source5: %name-client.menu
Source6: %name-server.menu
Source11: %name-client.16.png
Source12: %name-client.32.png
Source13: %name-client.48.png
Source21: %name-server.16.png
Source22: %name-server.32.png
Source23: %name-server.48.png

Patch1: %name-1.14.0-alt-tinfo.patch
Patch2: %name-1.14.0-alt-aifill.patch
Patch3: %name-1.14.0-alt-revolt.patch
Patch4: %name-1.14.1-alt-po-ru.patch
Patch5: %name-1.14.1-alt-debug.patch

Requires: %name-client = %version-%release
Requires: %name-server = %version-%release

%def_with gtk2
%def_with gtk
%def_with xaw3d
%define clients_list %{?_with_gtk2:gtk2} %{?_with_gtk:gtk} %{?_with_xaw3d:xaw3d}

BuildRequires: XFree86-devel XFree86-libs aalib esound-devel fontconfig 
freetype2 glib2-devel gtk+-devel imlib-devel libSDL-devel libSDL_mixer-devel 
libXaw3d-devel libXft libalsa2 libarts libatk-devel libaudiofile-devel libexpat 
libgtk+2-devel libogg libpango-devel libreadline-devel libslang libsmpeg 
libtinfo-devel libvorbis pkgconfig xpm-devel zlib-devel

%package common
Summary: The Freeciv multi-player strategy game common files
Group: Games/Strategy

%package manual
Summary: The Freeciv multi-player strategy game manual
Group: Games/Strategy
Conflicts: %name-common < %version-%release
Conflicts: %name-common > %version-%release

%package server
Summary: The Freeciv multi-player strategy game server
Group: Games/Strategy
Requires: %name-common = %version-%release

%package client
Summary: The Freeciv multi-player strategy game client common files
Group: Games/Strategy
Requires: %name-client-gui = %version-%release

%package client-gtk2
Summary: The Freeciv multi-player strategy game Gtk2 client
Group: Games/Strategy
Provides: %name-client-gui = %version-%release
Requires: %name-common = %version-%release
Requires: libgtk+2 >= 2.0.0

%package client-gtk
Summary: The Freeciv multi-player strategy game Gtk+ client
Group: Games/Strategy
Provides: %name-client-gui = %version-%release
Requires: %name-common = %version-%release
Requires: gtk+ >= 1.2.5
Requires: imlib >= 1.9.2

%package client-xaw3d
Summary: The Freeciv multi-player strategy game Xaw3d client
Group: Games/Strategy
Provides: %name-client-gui = %version-%release
Requires: %name-common = %version-%release
Requires: libXaw3d
Requires: xpm

%description
Freeciv is a turn-based, multi-player, X based strategy game.  Freeciv
is generally comparable to, and has compatible rules with, the
Civilization II(R) game by Microprose(R).  In Freeciv, each player is
the leader of a civilization, and is competing with the other players
in order to become the leader of the greatest civilization.

%description common
Freeciv is a turn-based, multi-player, X based strategy game.  Freeciv
is generally comparable to, and has compatible rules with, the
Civilization II(R) game by Microprose(R).  In Freeciv, each player is
the leader of a civilization, and is competing with the other players
in order to become the leader of the greatest civilization.

This package contains files common for client ans server.

%description manual
Freeciv is a turn-based, multi-player, X based strategy game.  Freeciv
is generally comparable to, and has compatible rules with, the
Civilization II(R) game by Microprose(R).  In Freeciv, each player is
the leader of a civilization, and is competing with the other players
in order to become the leader of the greatest civilization.

This package contains the Freeciv manual.

%description server
Freeciv is a turn-based, multi-player, X based strategy game.  Freeciv
is generally comparable to, and has compatible rules with, the
Civilization II(R) game by Microprose(R).  In Freeciv, each player is
the leader of a civilization, and is competing with the other players
in order to become the leader of the greatest civilization.

This package contains Freeciv server.

%description client
Freeciv is a turn-based, multi-player, X based strategy game.  Freeciv
is generally comparable to, and has compatible rules with, the
Civilization II(R) game by Microprose(R).  In Freeciv, each player is
the leader of a civilization, and is competing with the other players
in order to become the leader of the greatest civilization.

This package contains Freeciv client common files.

%description client-gtk2
Freeciv is a turn-based, multi-player, X based strategy game.  Freeciv
is generally comparable to, and has compatible rules with, the
Civilization II(R) game by Microprose(R).  In Freeciv, each player is
the leader of a civilization, and is competing with the other players
in order to become the leader of the greatest civilization.

This package contains Freeciv client with Gtk2 interface (default
Freeciv GUI).

%description client-gtk
Freeciv is a turn-based, multi-player, X based strategy game.  Freeciv
is generally comparable to, and has compatible rules with, the
Civilization II(R) game by Microprose(R).  In Freeciv, each player is
the leader of a civilization, and is competing with the other players
in order to become the leader of the greatest civilization.

This package contains Freeciv client with Gtk+ interface.

%description client-xaw3d
Freeciv is a turn-based, multi-player, X based strategy game.  Freeciv
is generally comparable to, and has compatible rules with, the
Civilization II(R) game by Microprose(R).  In Freeciv, each player is
the leader of a civilization, and is competing with the other players
in order to become the leader of the greatest civilization.

This package contains Freeciv client with Xaw3d interface.

%prep
%setup -q -n %srcname -a1 -a3
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%{?_enable_debug:%patch5 -p1}
pushd manual
        tar xjf %SOURCE2
popd

%build
rm -f configure.in config.cache
cp m4/x.252 m4/x.m4
cat m4/*.m4 >acinclude.m4
aclocal
autoheader -f
automake -a -c
autoconf -f
%define _configure_script ../configure

# First build server.
%__mkdir_p build-server
        pushd build-server
        %configure %{?_enable_debug:--enable-debug=yes} \
                --enable-client=no
        %make_build
popd

# Then clients.
for client in %clients_list; do
        %__mkdir_p build-$client
        pushd build-$client
        %configure %{?_enable_debug:--enable-debug=yes} \
                --disable-server --enable-client=$client
        %make_build
        popd
done

%install

# Install wrapper first.
%__install -pD -m755 %SOURCE4 $RPM_BUILD_ROOT%_libdir/%name/wrapper

# Install clients.
for client in %clients_list; do
        %makeinstall -C build-$client
        %__mv $RPM_BUILD_ROOT%_bindir/civclient \
                $RPM_BUILD_ROOT%_bindir/civclient-$client
done

# Install server.
%makeinstall -C build-server

%__mv $RPM_BUILD_ROOT%_bindir/civserver $RPM_BUILD_ROOT%_libdir/%name/
%__ln_s ../lib/%name/wrapper $RPM_BUILD_ROOT%_bindir/civserver

# X11 resource file for Xaw3d client.
%__install -pD -m644 data/Freeciv 
$RPM_BUILD_ROOT%_sysconfdir/X11/app-defaults/Freeciv

# sounds.
%__cp -a stdsounds* $RPM_BUILD_ROOT%_datadir/%name/

# menus/icons.
%__install -pD -m644 %SOURCE5 $RPM_BUILD_ROOT%_menudir/%name-client
%__install -pD -m644 %SOURCE6 $RPM_BUILD_ROOT%_menudir/%name-server
%__install -pD -m644 %SOURCE11 $RPM_BUILD_ROOT%_miconsdir/%name-client.png
%__install -pD -m644 %SOURCE12 $RPM_BUILD_ROOT%_iconsdir/%name-client.png
%__install -pD -m644 %SOURCE13 $RPM_BUILD_ROOT%_liconsdir/%name-client.png
%__install -pD -m644 %SOURCE21 $RPM_BUILD_ROOT%_miconsdir/%name-server.png
%__install -pD -m644 %SOURCE22 $RPM_BUILD_ROOT%_iconsdir/%name-server.png
%__install -pD -m644 %SOURCE23 $RPM_BUILD_ROOT%_liconsdir/%name-server.png

# docs.
%define docdir %_docdir/%name-%version
%__mkdir_p $RPM_BUILD_ROOT%docdir
install -p -m644 AUTHORS NEWS 
doc/{BUGS,CodingStyle,HACKING,HOWTOPLAY,README*,TODO} \
        $RPM_BUILD_ROOT%docdir/
%__cp -a manual $RPM_BUILD_ROOT%docdir/

%find_lang %name

%post server
%update_menus

%postun server
%clean_menus

%post client
%update_menus

%postun client
%clean_menus

%post client-gtk2
/usr/sbin/update-alternatives --install %_bindir/civclient %name-client 
%_bindir/civclient-gtk2 30

%preun client-gtk2
[ $1 = 0 ] || exit 0
/usr/sbin/update-alternatives --remove %name-client %_bindir/civclient-gtk2

%triggerpostun client-gtk2 -- %name < 1.14.0
/usr/sbin/update-alternatives --install %_bindir/civclient %name-client 
%_bindir/civclient-gtk2 30

%post client-gtk
/usr/sbin/update-alternatives --install %_bindir/civclient %name-client 
%_bindir/civclient-gtk 20

%preun client-gtk
[ $1 = 0 ] || exit 0
/usr/sbin/update-alternatives --remove %name-client %_bindir/civclient-gtk

%triggerpostun client-gtk -- %name < 1.14.0
/usr/sbin/update-alternatives --install %_bindir/civclient %name-client 
%_bindir/civclient-gtk 20

%post client-xaw3d
/usr/sbin/update-alternatives --install %_bindir/civclient %name-client 
%_bindir/civclient-xaw3d 10

%preun client-xaw3d
[ $1 = 0 ] || exit 0
/usr/sbin/update-alternatives --remove %name-client %_bindir/civclient-xaw3d

%triggerpostun client-xaw3d -- %name < 1.14.0
/usr/sbin/update-alternatives --install %_bindir/civclient %name-client 
%_bindir/civclient-xaw3d 10

%files

%files common -f %name.lang
%dir %_libdir/%name
%_libdir/%name/wrapper
%dir %docdir
%docdir/[A-Z]*

%files manual
%dir %docdir
%docdir/manual

%files server
%_bindir/civserver
%_libdir/%name
%_menudir/%name-server
%_iconsdir/%name-server.png
%_miconsdir/%name-server.png
%_liconsdir/%name-server.png
%dir %_datadir/%name
%_datadir/%name/civ*
%_datadir/%name/default
%_datadir/%name/history
%_datadir/%name/nation
%_datadir/%name/scenario

%files client
%_menudir/%name-client
%_iconsdir/%name-client.png
%_miconsdir/%name-client.png
%_liconsdir/%name-client.png
%dir %_datadir/%name
%_datadir/%name/freeciv.rc*
%_datadir/%name/helpdata.txt
%_datadir/%name/*trident*
%_datadir/%name/*stdsounds*
%_datadir/%name/misc

%if_with gtk2
%files client-gtk2
%_bindir/civclient-gtk2
%endif #gtk2

%if_with gtk
%files client-gtk
%_bindir/civclient-gtk
%endif #gtk

%if_with xaw3d
%files client-xaw3d
%config(noreplace) %_sysconfdir/X11/app-defaults/Freeciv
%_bindir/civclient-xaw3d
%endif #xaw3d

%changelog
* Tue Dec 16 2003 Egor Vyscrebentsov <evyscr@xxxxxxxxx> 1.14.1-ev1
- Updated to 1.14.1 release
- Move back to old alternatives scheme
- Added GTK+ client subpackage

* Sat Nov 01 2003 Dmitry V. Levin <ldv@xxxxxxxxxxxx> 1.14.1-alt0.2.b2
- Updated to 1.14.1-beta2.
- Corrected russian translation a bit.

* Wed Apr 30 2003 Stanislav Ievlev <inger@xxxxxxxxxxx> 1.14.0-alt4
- change alternatives config format

* Fri Mar 14 2003 Stanislav Ievlev <inger@xxxxxxxxxxx> 1.14.0-alt3
- move to new alternatives scheme

* Mon Feb 03 2003 Dmitry V. Levin <ldv@xxxxxxxxxxxx> 1.14.0-alt2
- Enhanced server wrapper a bit (#0002086).

* Sun Jan 19 2003 Dmitry V. Levin <ldv@xxxxxxxxxxxx> 1.14.0-alt1
- Updated to 1.14.0 release.

* Mon Jan 13 2003 Dmitry V. Levin <ldv@xxxxxxxxxxxx> 1.14.0-alt0.2.b3
- Added %%triggerpostun (#0001910).
- Updated buildrequires (#0001916).

* Tue Jan 07 2003 Dmitry V. Levin <ldv@xxxxxxxxxxxx> 1.14.0-alt0.1.b3
- stdsounds2.
- manual-1.13.0-1.
- Fixed tinfo support.
- Added server wrapper to increase chance that cwd is writable.
- Added sound, menu and icons from MDK package.
- Set aifill to 5 on new servers to get some opponents (RH idea).
- Be a bit more verbose about revolution.
- Corrected russian translation a bit.
- Packaged server as separate subpackage.
- Packaged clients as separate subpackages.

* Fri Jan 03 2003 Dmitry V. Levin <ldv@xxxxxxxxxxxx> 1.14.0-alt0.0.1.b3
- freeciv-1.14.0-beta3.

[Prev in Thread] Current Thread [Next in Thread]