summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2017-09-17 23:56:44 +0200
committerPatrice Clement <monsieurp@gentoo.org>2017-09-17 23:59:10 +0200
commit464d7d2c9ff5ba9e81a2b9cf5ba0b256c93e84ca (patch)
treef11a54fb9e385c369a6059a85affdf69047f7893 /games-action/supermariowar/files
parentdev-python/pydns-3.1.1: x86 stable, bug 625042 (diff)
downloadgentoo-464d7d2c9ff5ba9e81a2b9cf5ba0b256c93e84ca.tar.gz
gentoo-464d7d2c9ff5ba9e81a2b9cf5ba0b256c93e84ca.tar.bz2
gentoo-464d7d2c9ff5ba9e81a2b9cf5ba0b256c93e84ca.zip
games-action/supermariowar: new package.
Super Mario War is a fan-made multiplayer Super Mario Bros. style deathmatch game. See: http://supermariowar.supersanctuary.net See: https://github.com/mmatyas/supermariowar Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'games-action/supermariowar/files')
-rw-r--r--games-action/supermariowar/files/smwd.initd39
-rw-r--r--games-action/supermariowar/files/supermariowar-2.0_beta1-yaml-cpp-config.cmake21
2 files changed, 60 insertions, 0 deletions
diff --git a/games-action/supermariowar/files/smwd.initd b/games-action/supermariowar/files/smwd.initd
new file mode 100644
index 000000000000..6aa83cc3e1b2
--- /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_server_dir="/usr/share/supermariowar-2.0_beta1/server"
+
+depend() {
+ use net
+ before logger
+}
+
+start() {
+ if [[ ! -d "${smw_server_dir}" ]]; then
+ eerror "Cannot cd into ${smw_server_dir}"
+ return 1
+ fi
+ cd "${smw_server_dir}" || 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)