tremulous/tremulous.spec

125 lines
4.1 KiB
RPMSpec

%define gitver %(echo %version | tr '~' -)
Name: tremulous
Version: 1.2.0~test.3
Release: 1mamba
Summary: First Person Shooter game
Group: Applications/Games
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://tremulous.net/
Source0: https://github.com/wtfbbqhax/tremulous.git/%{gitver}/tremulous-%{version}.tar.bz2
Source1: https://github.com/wtfbbqhax/tremulous-data.git/master/tremulous-data-%{version}.tar.bz2
Patch0: tremulous-1.2.0~test.3-sol-gcc-11.1.0.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libGLU-devel
BuildRequires: libSDL2-devel
BuildRequires: libcurl-devel
BuildRequires: libgcc
BuildRequires: libglvnd-devel
BuildRequires: libopenal-devel
BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END
%description
Tremulous is a free, open source game that blends a team based FPS with elements of an RTS.
%debug_package
%prep
%setup -q -a1
%global __requires_exclude_from ^%{_datadir}/tremolous/.*$
%patch0 -p1
%build
%cmake -d build
%make
:<< __OLD
# the CROSS_COMPILING=1 is a hack to not build q3cc and qvm files
# since we've stripped out q3cc as this is not Free Software.
%make \
OPTIMIZE="%{optflags} -fno-strict-aliasing -ffast-math" \
DEFAULT_BASEDIR=%{buildroo}%{_datadir}/%{name}/base USE_OPENAL_DLOPEN=1 USE_CODEC_VORBIS=1 \
USE_LOCAL_HEADERS=0 BUILD_GAME_SO=0 COPYDIR=%{buildroot}%{_datadir}/%{name} USE_SYSTEM_JPEG=1 \
BUILD_DIR=%{buildroot} COPYDIR=%{builddir}%{_datadir}/games/%{name} \
BUILD_GAME_SO=0 GENERATE_DEPENDENCIES=0 USE_SDL=1 CROSS_COMPILING=1
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
install -d -m0755 %{buildroot}%{_datadir}
cp -a build/release-linux-%{_target_cpu} %{buildroot}%{_datadir}/tremulous
cp build/src/granger/src/nettle/libgranger_nettle.so %{buildroot}%{_datadir}/tremulous/
cp build/src/granger/src/lua/libgranger_lua.so %{buildroot}%{_datadir}/tremulous/
cp build/src/granger/src/premake/libpremake.so %{buildroot}%{_datadir}/tremulous/
cp build/src/restclient/librestclient.so %{buildroot}%{_datadir}/tremulous/
convert misc/tremulous.xpm misc/%{name}.png
install -D -m 644 misc/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -d -m0755 %{buildroot}%{_datadir}/tremulous/base
cp tremulous-data-%{version}/*.pk3 %{buildroot}%{_datadir}/tremulous/base/
# Create the system menu entry
mkdir -p %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
[Desktop Entry]
Name=Tremulous
Comment=First Person Shooter
Comment[it]=Sparatutto in prima persona
Exec=/usr/share/tremulous/tremulous
Icon=/usr/share/pixmaps/tremulous.png
Terminal=0
Type=Application
Categories=Application;Game
EOF
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%files
%defattr(-,root,root)
%dir %{_datadir}/tremulous
%dir %{_datadir}/tremulous/base
%{_datadir}/tremulous/base/*.pk3
%dir %{_datadir}/tremulous/gpp
%{_datadir}/tremulous/gpp/*.so
%{_datadir}/tremulous/granger
%dir %{_datadir}/tremulous/qvm_tools
%{_datadir}/tremulous/qvm_tools/*
%{_datadir}/tremulous/renderer_opengl1.so
%{_datadir}/tremulous/renderer_opengl2.so
%{_datadir}/tremulous/libgranger_lua.so
%{_datadir}/tremulous/libgranger_nettle.so
%{_datadir}/tremulous/libpremake.so
%{_datadir}/tremulous/librestclient.so
%{_datadir}/tremulous/tremded
%{_datadir}/tremulous/tremulous
%{_datadir}/applications/tremulous.desktop
%{_datadir}/pixmaps/tremulous.png
%doc COPYING GPL CC
%changelog
* Sun Jun 06 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.0~test.3-1mamba
- update to 1.2.0~test.3
* Sun Jun 06 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.0~alpha.3-1mamba
- update to 2.0.0~alpha.3
* Sun Jun 06 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2.0-1mamba
- update to 1.2.0
* Thu Aug 22 2013 Automatic Build System <autodist@mambasoft.it> 1.1.0-3mamba
- automatic rebuild by autodist
* Sun Jul 27 2008 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 1.1.0-2mamba
- correct some bug in the spec file, added a patch to correct the Makefile
* Tue May 20 2008 gil <puntogil@libero.it> 1.1.0-1mamba
- first build