hasufell-repository/packages/games-fps/warsow/warsow-2.1.exheres-0

95 lines
2.1 KiB
Bash
Raw Permalink Normal View History

# Copyright 2016 Julian Ospald <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2
DATA_PV=${PV//./}
ENGINE_PV=${PV//./}
ENGINE_P=${PN}_${ENGINE_PV}_sdk
2016-05-14 12:49:32 +00:00
WORK=${WORKBASE}/${ENGINE_P}/source/source
require cmake [ api=2 ] gtk-icon-cache desktop-utils
2016-05-14 12:49:32 +00:00
2016-02-28 23:05:15 +00:00
SUMMARY="Multiplayer FPS based on the QFusion engine (evolved from Quake 2)"
HOMEPAGE="http://www.warsow.net/"
DOWNLOADS="http://mirror.null.one/${ENGINE_P}.tar.gz
http://mirror.null.one/warsow_${DATA_PV}_unified.tar.gz
mirror://gentoo/warsow.png"
LICENCES="
GPL-2
ZLIB [[ note = [ bundled angelscript ] ]]
warsow
"
SLOT="0"
PLATFORMS="~amd64 ~x86"
MYOPTIONS="
( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]]
"
DEPENDENCIES="
build+run:
2016-02-28 23:05:15 +00:00
media-libs/SDL:2[X]
media-libs/freetype
media-libs/libogg
media-libs/libpng:=
media-libs/libtheora
media-libs/libvorbis
media-libs/openal
net-misc/curl
sys-libs/zlib
x11-dri/mesa
2016-02-28 23:05:15 +00:00
providers:ijg-jpeg? ( media-libs/jpeg:= )
providers:jpeg-turbo? ( media-libs/libjpeg-turbo )
"
DATA_S=${WORKBASE}/${PN}_${DATA_PV:0:2}
2016-05-14 12:49:32 +00:00
CMAKE_SRC_CONFIGURE_PARAMS=(
-DQFUSION_GAME=Warsow
)
src_install() {
dobin_wrapper() {
local f
for f in $@ ; do
herebin ${f} <<EOF
#!/bin/sh
basepath="/usr/share/${PN}"
cd "\${basepath}"
exec "/usr/libexec/${PN}/${f}" \
+set fs_basepath \${basepath} \
+set fs_usehomedir 1 "\$@"
EOF
done
}
insinto /usr/share/${PN}
doins -r "${DATA_S}"/basewsw
2016-04-23 02:22:08 +00:00
edo cd "${CMAKE_SOURCE}"/build
exeinto /usr/$(exhost --target)/libexec/${PN}/
doexe */*.so
newexe ${PN}.* ${PN}
newexe wsw_server.* ${PN}-ded
newexe wswtv_server.* ${PN}-tv
dobin_wrapper ${PN} ${PN}-ded ${PN}-tv
local so
dodir /usr/share/${PN}/libs
for so in basewsw/*.so libs/*.so ; do
dosym /usr/$(exhost --target)/libexec/${PN}/${so##*/} \
/usr/share/${PN}/${so}
done
insinto /usr/share/icons/hicolor/48x48/apps
doins "${FETCHEDDIR}"/${PN}.png
install_desktop_entry "Name=Warsow"
}