From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- games-action/supermariowar/Manifest | 5 + games-action/supermariowar/files/smwd.initd | 39 ++++++++ .../supermariowar-2.0_beta1-yaml-cpp-config.cmake | 21 ++++ games-action/supermariowar/metadata.xml | 14 +++ .../supermariowar-2.0_beta1-r1.ebuild | 110 +++++++++++++++++++++ 5 files changed, 189 insertions(+) create mode 100644 games-action/supermariowar/Manifest create mode 100644 games-action/supermariowar/files/smwd.initd create mode 100644 games-action/supermariowar/files/supermariowar-2.0_beta1-yaml-cpp-config.cmake create mode 100644 games-action/supermariowar/metadata.xml create mode 100644 games-action/supermariowar/supermariowar-2.0_beta1-r1.ebuild (limited to 'games-action/supermariowar') diff --git a/games-action/supermariowar/Manifest b/games-action/supermariowar/Manifest new file mode 100644 index 000000000000..25ee1c4229cb --- /dev/null +++ b/games-action/supermariowar/Manifest @@ -0,0 +1,5 @@ +AUX smwd.initd 902 SHA256 c8d861aee90bf90101ebd6184d161215310f0432fe5f7bc74d56ab6c26fa3cd5 SHA512 0c3c9efaa9d239899abf754dee6af71b59f4706e057484502e76abbc0b8ae3a620581c0b3eb7a7ef2f2d050676de46854b033c34d87596b18f195fb7d19495a0 WHIRLPOOL bbf0f01a27d02e9f338cb8d3873e4def9436d08c39fcd9001bcff40be99de8c2c6e99f81b83b6b9735df4d97b7575decb0321ff93b7c3a00f8795f1b67b65744 +AUX supermariowar-2.0_beta1-yaml-cpp-config.cmake 655 SHA256 16dbf6a62973b5e798ac6f6bead51771d3a261895a8f357372745c9d71cad162 SHA512 a43d28d12962f23a0689533315415597e046bcb09c28a1457d2320da00e376e39939b89839b60e73f368c044ced42b5ccdb909dcdc40a1a345b70fa313ba0bfa WHIRLPOOL f8c7490d9895f03f4cfff21ddc43dfc2f4be1ba4e8a038bf98e3752f53ce99741edebde027d5bb23575d30c3a079e41cfa4a4d123daad838bc54ed4ecc40688b +DIST supermariowar-2.0_beta1.tar.gz 13545366 SHA256 7b1197cd9dd99f1470c9118f7fe78489cd6ade3ecbb444e336e86fc87c0c8a08 SHA512 0849d23ea613d69f32c184dd5f470815a4c68b15836e46e40c30c5a3a6ea2216d4d3305f356e8fdd5b42f4008d9b07f0b9fac84b9f801a4b9f888ba188c56e0b WHIRLPOOL eadca1a65bca8280a8b10f8a5da3c47217fe67c375a3aca3730b7e81e8f6b4fc2fe1d8530ad30912263febea89eb517a6f59018c0e68273b94a6b3dcf261a308 +EBUILD supermariowar-2.0_beta1-r1.ebuild 2492 SHA256 81209210fc5a8a905123ab9b22ecb368041d917084b5f00f2498ad79ca64d386 SHA512 b8f6668e0a345f0f16cec24ed3c9a8baa81720920532c410024d8bc6384a7623f0f9d44cd0c7647fdb1e74fa6a5f1095fa05f2ba582f4edf78a6d42f95e74b9c WHIRLPOOL 130e649b5b0c1653013658c35286132885577b86825eb1cc6577f1c15849b9c7eaa3b5e55ab3d1566ae50221c3ecdfda76a0d3457de6ba0bff6781deed2a6c94 +MISC metadata.xml 430 SHA256 4fb037aaaa53a418e8cf4d72660baa376b8bb0df8799358a3e41ef25cceb28ca SHA512 7f7e6599a60ee829ecc2a7db5d956c6ac23b8e213d2e56d8c414a30e1dc7ea5577c080bb79430287ae6df8cae863c99a268fabc0ca2cc06c7d301cc7d9668df1 WHIRLPOOL 7d0e3d008f8e8b12d2eed9a99da980b09ec877af9dc95f8e1f3c8d3c09cc29a3306130256a80a8843e128a3f059af812813a7cbb22af64df293c40e5cc658aa1 diff --git a/games-action/supermariowar/files/smwd.initd b/games-action/supermariowar/files/smwd.initd new file mode 100644 index 000000000000..da4fa9a87ee4 --- /dev/null +++ b/games-action/supermariowar/files/smwd.initd @@ -0,0 +1,39 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/smw-server" +command_background="true" +pidfile="/var/run/${RC_SVCNAME}.pid" +name="Super Mario War server" +description="The Super Mario War server process is in charge of hosting Super Mario War games" +smw_serverdir="@SMW_SERVERDIR@" + +depend() { + use net + before logger +} + +start() { + if [[ ! -d "${smw_serverdir}" ]]; then + eerror "Cannot cd into ${smw_serverdir}" + return 1 + fi + cd "${smw_serverdir}" || return 1 + ebegin "Starting ${name}" + start-stop-daemon \ + --start \ + --background \ + --pidfile ${pidfile} \ + --make-pidfile \ + --exec ${command} + eend $? +} + +stop() { + ebegin "Stopping ${name}" + start-stop-daemon \ + --stop \ + --pidfile ${pidfile} + eend $? +} diff --git a/games-action/supermariowar/files/supermariowar-2.0_beta1-yaml-cpp-config.cmake b/games-action/supermariowar/files/supermariowar-2.0_beta1-yaml-cpp-config.cmake new file mode 100644 index 000000000000..03fb190aad65 --- /dev/null +++ b/games-action/supermariowar/files/supermariowar-2.0_beta1-yaml-cpp-config.cmake @@ -0,0 +1,21 @@ +find_package(PkgConfig REQUIRED) +pkg_check_modules(YAML-CPP REQUIRED yaml-cpp) +find_path(YAML-CPP_INCLUDE_DIRECTORY + NAMES yaml.h + PATHS ${YAML-CPP_INCLUDE_DIRS} /usr/include/yaml-cpp +) +find_library(YAML-CPP_LIBRARY + NAMES yaml-cpp + PATHS ${YAML-CPP_LIBRARY_DIRS}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(yaml-cpp + FOUND_VAR yaml-cpp_FOUND + REQUIRED_VARS YAML-CPP_LIBRARY YAML-CPP_INCLUDE_DIRECTORY +) + +if (yaml-cpp_FOUND) + set(yaml-cpp_INCLUDE_DIRS ${YAML-CPP_INCLUDE_DIRECTORY}) + set(yaml-cpp_LIBRARIES ${YAML-CPP_LIBRARY}) +endif () +mark_as_advanced(YAML-CPP_INCLUDE_DIRECTORY YAML-CPP_LIBRARY) diff --git a/games-action/supermariowar/metadata.xml b/games-action/supermariowar/metadata.xml new file mode 100644 index 000000000000..bd948f685035 --- /dev/null +++ b/games-action/supermariowar/metadata.xml @@ -0,0 +1,14 @@ + + + + + monsieurp@gentoo.org + Patrice Clement + + + Compile and install Super Mario War server files + + + mmatyas/supermariowar + + diff --git a/games-action/supermariowar/supermariowar-2.0_beta1-r1.ebuild b/games-action/supermariowar/supermariowar-2.0_beta1-r1.ebuild new file mode 100644 index 000000000000..3df6782843cc --- /dev/null +++ b/games-action/supermariowar/supermariowar-2.0_beta1-r1.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils cmake-utils versionator + +MY_PV=$(replace_version_separator 2 '-') +MY_PV="${MY_PV/beta1/beta.1}" +MY_PN="smw" + +DESCRIPTION="Fan-made multiplayer Super Mario Bros. style deathmatch game" +HOMEPAGE="https://github.com/mmatyas/supermariowar" +SRC_URI="https://github.com/mmatyas/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="server" + +RDEPEND=" + sys-libs/zlib:= + dev-cpp/yaml-cpp + net-libs/enet:1.3= + media-libs/sdl-mixer[vorbis] + media-libs/sdl-image[png,jpeg]" + +DEPEND=" + ${RDEPEND} + app-arch/unzip + virtual/pkgconfig" + +S="${WORKDIR}/${PN}-${MY_PV}" + +src_unpack() { + unpack ${A} + cd "${S}" || die + unpack ./data.zip +} + +src_prepare() { + cmake-utils_src_prepare + + einfo "Copying Findyaml-cpp.cmake" + cp "${FILESDIR}/${P}-yaml-cpp-config.cmake" cmake/Findyaml-cpp.cmake || die + eend $? +} + +src_configure() { + local mycmakeargs=( + -DBUILD_STATIC_LIBS=OFF + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" + -DSMW_BINDIR="${EPREFIX}/usr/bin" + -DSMW_DATADIR="${EPREFIX}/usr/share/${PF}" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + local bin + for bin in "${ED}/usr/bin"/*; do + chmod 0755 "${bin}" || die + done + + local smw_datadir="usr/share/${PF}" + local smw_bindir="${smw_datadir}/bin" + mkdir -p "${ED}/${smw_bindir}" || die + + einfo "Moving ${PN} binary files to /${smw_bindir}" + mv "${ED}/usr/bin"/* "${ED}/${smw_bindir}" || die + eend $? + + local base_bin + for bin in "${ED}/${smw_bindir}"/*; do + base_bin=$(basename "${bin}") + einfo "Creating ${base_bin} launcher in /usr/bin" + cat << EOF > "${base_bin}" || die +#!/usr/bin/env bash +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# ${PF} launcher: ${base_bin} +exec /${smw_bindir}/${base_bin} /${smw_datadir} +EOF + dobin "${base_bin}" + eend $? + done + + if use server; then + local smw_server="${BUILD_DIR}/Binaries/Release/${MY_PN}-server" + local smw_serverdir="/${smw_datadir}/server" + + einfo "Installing ${MY_PN}-server files" + dosbin "${smw_server}" + + dodir "${smw_serverdir}" + insinto "${smw_serverdir}" + doins "${S}/src/server/serverconfig" + + dosym "${smw_serverdir}/serverconfig" "/etc/${MY_PN}d.conf" + + newinitd "${FILESDIR}/smwd.initd" "${MY_PN}d" + sed -i -e \ + "s#@SMW_SERVERDIR@#${smw_serverdir}#g;" \ + "${ED}/etc/init.d/${MY_PN}d" || die + eend $? + fi +} -- cgit v1.2.3