Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37902247
en ru br
Репозитории ALT
4.1: 20070827-alt2.qa1
www.altlinux.org/Changes

Группа :: Игры/Аркады
Пакет: TnL

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

# Copyright (c) 2007 oc2pus
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.

%define _ver2 070827
%define _io_ver 2007-07-10
%def_without tools

Name: TnL
Version: 20070827
Release: alt2.qa1

Summary: Thunder & Lightning - A futuristic action flight simulator game
License: GPL
Group: Games/Arcade

Url: http://tnlgame.net
Source: http://tnlgame.net/downloads/tnl/070827/TnL-source-%_ver2.tar.bz2
Source1: %name-data.tar.bz2
Source2: http://tnlgame.net/downloads/tnl/070827/Io-%_io_ver.tar.gz
Source3: %name-tools.tar.bz2
Patch: TnL-source-070827-alt-makefile.kludge
Packager: Michael Shigorin <mike at altlinux.org>

# Automatically added by buildreq on Sun Sep 02 2007 (-bi)

BuildRequires: freeglut-devel gcc-c++ glibc-devel-static libavformat-devel libedit-devel libfreetype-devel libglew-devel libgmp-devel libjpeg-devel libncurses-devel libopenal-devel libpcre-devel libpng-devel libportaudio2-devel libsamplerate-devel libSDL-devel libsigc++1.2-devel libsndfile-devel libsoundtouch-devel libsqlite3-devel libtag-devel libtiff-devel libuuid-devel libxml2-devel nvidia_glx_common python-dev sqlite-devel
# removed TnL by hand

%description
Thunder&Lightning is a futuristic action flight simulator game
that takes place in a large 3D environment. Jump into the pilot
seat of your Lightning aircraft and fight against Thunder tanks
in a fierce battle for control of the island!

In the long run, Thunder&Lightning will incorporate features from
the 80's classics Carrier Command and Midwinter. There will be
multiple Islands to conquer, each with its own defense strategy.

Thunder&Lightning will not be mission oriented, but there will be
scripted events for each island.

Author: Jonas Eschenburg <indyjo gmx de>

%if_with tools
%package tools
Summary: Thunder & Lightning - tools
Group: Amusements/Games/3D/Simulation
Requires: %name = %version
Requires: python

%description tools
This package contains the Thunder & Lightning - tools.

* modeltool
Which reads 3d models in Wavefront .obj format plus an
additional .spec file. It then outputs a .bounds file with
geometry for the collision detector and another .obj file in
which every object has been moved so that it's pivot point lies
on the origin. This .obj will be read by Thunder&Lightning for
objects which contain hierarchical transforms
(e.g. Tank->Turret->Cannon).

* spr2png
A small python script to convert legacy .spr files (a homegrown
and impractical format) into standard PNG format.

* fontopus
It currently outputs a .png file containing all glyphs of a
particular font face. It also outputs a descriptive .font file
with all information necessary to extract the glyphs and render
text to the screen.

* texgen2
texgen2 is used to place different texture types on a heightfield.
It can use inputs like slope or perlin noise to decide which
texture type to place.

Author: Jonas Eschenburg <indyjo gmx de>
%endif

%prep
#setup -q -n %name-source -a 1 -a 2 -a3
%setup -q -n %name-source-%_ver2 -a1 -a2 -a3
%patch -p1

%build
pushd Io-%_io_ver
# libstdc++.so is searched and not found ...
sed -i -e 's|dependsOnLib("stdc++")||g' \
addons/SoundTouch/build.io

%make_build
make install \
INSTALL_PREFIX=../TnL-install
popd

autoreconf -fi
%configure \
--with-io-dir=%_builddir/%name-source-%_ver2/Io-%_io_ver \
--enable-release

%make_build

%if_with tools
# Tools
for i in fontopus glf2jft texgen2; do
pushd TnL-tools/$i
make
popd
done
%endif

%install
rm %name-data/upload-to-server.sh
install -dm 755 TnL-install
%makeinstall

# copy needed Io files

install -dm 755 %buildroot%_bindir
install -dm 755 %buildroot%_libdir
install -m 644 TnL-install/lib/libiovmall.so \
%buildroot%_libdir
install -dm 755 %buildroot%_libdir/io/addons/Random
cp -R TnL-install/lib/io/addons/Random/* \
%buildroot%_libdir/io/addons/Random

# data

install -dm 755 %buildroot%_datadir/tnl
cp -R %name-data/share/tnl/* \
%buildroot%_datadir/tnl

install -dm 755 %buildroot%_datadir/icons
cp -R %name-data/share/icons/* \
%buildroot%_datadir/icons

%if_with tools
# tools
pushd TnL-tools
for i in fontopus glf2jft modeltool spr2png texgen2; do
mv $i/README \
$i/README-$i
done

install -dm 755 %buildroot%_bindir
for i in fontopus glf2jft texgen2; do
install -m 755 $i/$i \
%buildroot%_bindir
done

install -m 755 spr2png/spr2png.py \
%buildroot%_bindir

cat > modeltool.sh << EOF
#!/bin/bash
cd %_libdir/%name
./modeltool
EOF
install -m 755 modeltool.sh \
%buildroot%_bindir

install -dm 755 %buildroot%_libdir/%name
install -m 755 modeltool/modeltool \
%buildroot%_libdir/%name
install -m 644 modeltool/skeletopus \
%buildroot%_libdir/%name
install -m 644 modeltool/makebounds \
%buildroot%_libdir/%name
install -m 644 modeltool/*.py \
%buildroot%_libdir/%name
popd
%endif

# icon

install -dm 755 %buildroot%_pixmapsdir
install -m 644 TnL-data/share/icons/hicolor/48x48/apps/tnlgame.png \
%buildroot%_pixmapsdir/%name.png

install -dm 755 %buildroot%_desktopdir
# menu-entry
cat > %buildroot%_desktopdir/%name.desktop << EOF
[Desktop Entry]
Type=Application
Name=Thunder and Lightning
Encoding=UTF-8
Comment=Thunder and Lightning - a futuristic action flight simulator game
Comment[de]=Thunder and Lightning - ein futuristischer Flugsimulator
Exec=tnl
Icon=%name
Terminal=true
Categories=Game;Simulation;3DGame;
EOF
#suse_update_desktop_file -n -i %name Game Simulation 3DGame

%postun -n TnL
%clean_menus


%post -n TnL
%update_menus


%files
%doc AUTHORS COPYING README
%_bindir/tnl
%_bindir/tnl-bin
%_libdir/*.so
%_libdir/io/addons/*
%_datadir/tnl/
%_datadir/icons/*/*/*/*.png
%_pixmapsdir/%name.png
%_desktopdir/%name.desktop

%if_with tools
%files tools
%doc TnL-tools/README
%doc TnL-tools/*/README-*
%doc TnL-tools/modeltool/COPYING
%_bindir/fontopus
%_bindir/glf2jft
%_bindir/spr2png.py
%_bindir/modeltool.sh
%_bindir/texgen2
%_libdir/%name/
%endif

# TODO:

# - tools: -lfreetype missing somewhere in fontopus link line
# - Io: build separately, fix broken libedit test (--as-needed)
# - upstream: hardwired /tmp/std{out,err}.txt are evil!

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin