mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-04-07 03:10:15 -04:00
games-fps/assaultcube: improve ebuild, add missing die etc.
Signed-off-by: Florian Schmaus <flow@gentoo.org>
This commit is contained in:
@@ -9,55 +9,64 @@ DESCRIPTION="Free multiplayer FPS based on the Cube engine"
|
||||
HOMEPAGE="https://assault.cubers.net/"
|
||||
SRC_URI="https://github.com/assaultcube/AC/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/AC-${PV}"
|
||||
|
||||
LICENSE="ZLIB assaultcube"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
RDEPEND="sys-libs/zlib
|
||||
media-libs/libsdl2[opengl]
|
||||
media-libs/sdl2-image[jpeg,png]
|
||||
x11-libs/libX11
|
||||
media-libs/libogg
|
||||
media-libs/libvorbis
|
||||
media-libs/openal"
|
||||
IUSE="debug"
|
||||
|
||||
RDEPEND="
|
||||
sys-libs/zlib
|
||||
media-libs/libsdl2[opengl]
|
||||
media-libs/sdl2-image[jpeg,png]
|
||||
x11-libs/libX11
|
||||
media-libs/libogg
|
||||
media-libs/libvorbis
|
||||
media-libs/openal
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="sys-devel/clang"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.3.0.2-respect-ldflags.patch"
|
||||
"${FILESDIR}/${PN}-1.3.0.2-fix-checkinstall.patch" # a script which checks for required libs and certain parts of the game
|
||||
# a script which checks for required libs and certain parts of the game
|
||||
"${FILESDIR}/${PN}-1.3.0.2-fix-checkinstall.patch"
|
||||
)
|
||||
IUSE="debug"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i 's|//#define PRODUCTION|#define PRODUCTION|' "${S}/source/src/cube.h"
|
||||
sed -i 's|//#define PRODUCTION|#define PRODUCTION|' source/src/cube.h || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
filter-lto
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd "${S}/source/src"
|
||||
if use debug; then
|
||||
DEBUGBUILD=1 emake
|
||||
else
|
||||
emake
|
||||
local -x DEBUGBUILD=1
|
||||
fi
|
||||
emake -C source/src
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}/source/src"
|
||||
emake install
|
||||
emake -C source/src install
|
||||
|
||||
install -dm755 "${D}/usr/share/assaultcube"
|
||||
install -Dm755 "${S}"/{assaultcube.sh,check_install.sh,server.sh,server_wizard.sh} -t "${D}/usr/share/assaultcube"
|
||||
install -Dm755 "${S}"/bin_unix/native_{client,server} -t "${D}/usr/share/assaultcube/bin_unix"
|
||||
cp -r "${S}"/{bot,config,demos,docs,mods,packages} "${D}/usr/share/assaultcube/"
|
||||
install -Dm644 "${S}"/{CONTRIBUTING.md,GOVERNANCE.md,README.{html,md},SECURITY.md} -t "${D}/usr/share/assaultcube"
|
||||
install -dm755 "${ED}/usr/share/assaultcube" || die
|
||||
install -Dm755 "${S}"/{assaultcube.sh,check_install.sh,server.sh,server_wizard.sh} \
|
||||
-t "${ED}/usr/share/assaultcube" || die
|
||||
install -Dm755 "${S}"/bin_unix/native_{client,server} -t "${ED}/usr/share/assaultcube/bin_unix" || die
|
||||
cp -r {bot,config,demos,docs,mods,packages} "${ED}/usr/share/assaultcube/" || die
|
||||
|
||||
dodoc CONTRIBUTING.md GOVERNANCE.md README.{html,md} SECURITY.md
|
||||
|
||||
make_desktop_entry \
|
||||
"/usr/share/assaultcube/assaultcube.sh %u" \
|
||||
"${EPREFIX}/usr/share/assaultcube/assaultcube.sh %u" \
|
||||
AssaultCube \
|
||||
/usr/share/assaultcube/packages/misc/icon.png \
|
||||
Game \
|
||||
"Keywords=assaultcube;game;fps;\nMimeType=x-scheme-handler/assaultcube"
|
||||
|
||||
dosym "${EPREFIX}/usr/share/assaultcube/assaultcube.sh" usr/bin/assaultcube
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
||||
@@ -5,4 +5,7 @@
|
||||
<email>duje.mihanovic@skole.hr</email>
|
||||
<name>Duje Mihanović</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">assaultcube/AC</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
||||
Reference in New Issue
Block a user