mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-11 07:22:22 +00:00
- Add freeminer and freeminer-game: forks of minecraft and
minecraft_game correspondingly Freeminer is a Minecraft-inspired sandbox game. WWW: http://freeminer.org/
This commit is contained in:
parent
335986c64a
commit
2d08067666
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=335803
@ -280,6 +280,8 @@
|
||||
SUBDIR += freedoko
|
||||
SUBDIR += freedroid
|
||||
SUBDIR += freedroidrpg
|
||||
SUBDIR += freeminer
|
||||
SUBDIR += freeminer-default
|
||||
SUBDIR += freera
|
||||
SUBDIR += freesweep
|
||||
SUBDIR += freesynd
|
||||
|
30
games/freeminer-default/Makefile
Normal file
30
games/freeminer-default/Makefile
Normal file
@ -0,0 +1,30 @@
|
||||
# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= default
|
||||
PORTVERSION= 0.4.8.2
|
||||
CATEGORIES= games
|
||||
PKGNAMEPREFIX= freeminer-
|
||||
DIST_SUBDIR= freeminer
|
||||
|
||||
MAINTAINER= amdmi3@FreeBSD.org
|
||||
COMMENT= The main game for the Freeminer game engine
|
||||
|
||||
LICENSE= LGPL21
|
||||
|
||||
RUN_DEPENDS= freeminer:${PORTSDIR}/games/freeminer
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= freeminer
|
||||
GH_PROJECT= ${PORTNAME}
|
||||
GH_COMMIT= 6261db9
|
||||
|
||||
NO_BUILD= yes
|
||||
DATADIR= ${PREFIX}/share/freeminer/games/${PORTNAME}
|
||||
PORTDATA= *
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}
|
||||
cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/
|
||||
|
||||
.include <bsd.port.mk>
|
2
games/freeminer-default/distinfo
Normal file
2
games/freeminer-default/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (freeminer/default-0.4.8.2.tar.gz) = 7372ea4835dd79e9a317ef0b523291afa39edd324dff34208b679ae1fbeaa82b
|
||||
SIZE (freeminer/default-0.4.8.2.tar.gz) = 765200
|
3
games/freeminer-default/pkg-descr
Normal file
3
games/freeminer-default/pkg-descr
Normal file
@ -0,0 +1,3 @@
|
||||
Default game for freeminer
|
||||
|
||||
WWW: http://freeminer.org/
|
86
games/freeminer/Makefile
Normal file
86
games/freeminer/Makefile
Normal file
@ -0,0 +1,86 @@
|
||||
# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= freeminer
|
||||
PORTVERSION= 0.4.8.2
|
||||
CATEGORIES= games
|
||||
|
||||
MAINTAINER= amdmi3@FreeBSD.org
|
||||
COMMENT= Open source sandbox game inspired by Minecraft
|
||||
|
||||
LICENSE= LGPL21
|
||||
|
||||
LIB_DEPENDS= libIrrlicht.so:${PORTSDIR}/x11-toolkits/irrlicht \
|
||||
sqlite3:${PORTSDIR}/databases/sqlite3
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= ${PORTNAME}
|
||||
GH_COMMIT= 79bf405
|
||||
|
||||
USES= cmake
|
||||
CMAKE_ARGS= -DCUSTOM_MANDIR="${PREFIX}/man" \
|
||||
-DCUSTOM_EXAMPLE_CONF_DIR="${PREFIX}/etc"
|
||||
|
||||
PORTDATA= *
|
||||
PORTDOCS= *
|
||||
|
||||
OPTIONS_DEFINE= CLIENT SERVER CURL NLS SOUND DOCS EXAMPLES FREETYPE LEVELDB LUAJIT
|
||||
OPTIONS_DEFAULT=CLIENT SERVER CURL SOUND
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
CLIENT_DESC= Build client
|
||||
SERVER_DESC= Build server
|
||||
CURL_DESC= Enable cURL support for fetching media
|
||||
SOUND_DESC= Enable sound
|
||||
LEVELDB_DESC= Enable LevelDB backend
|
||||
FREETYPE_DESC= Support for TrueType fonts with unicode
|
||||
LUAJIT_DESC= LuaJIT support
|
||||
|
||||
CLIENT_CMAKE_ON= -DBUILD_CLIENT=1
|
||||
CLIENT_CMAKE_OFF= -DBUILD_CLIENT=0
|
||||
CLIENT_LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \
|
||||
libpng.so:${PORTSDIR}/graphics/png
|
||||
CLIENT_USE= GL=gl XORG=x11
|
||||
SERVER_CMAKE_ON= -DBUILD_SERVER=1
|
||||
SERVER_CMAKE_OFF= -DBUILD_SERVER=0
|
||||
CURL_CMAKE_ON= -DENABLE_CURL=1
|
||||
CURL_CMAKE_OFF= -DENABLE_CURL=0
|
||||
CURL_LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl
|
||||
NLS_CMAKE_ON= -DENABLE_GETTEXT=1
|
||||
NLS_CMAKE_OFF= -DENABLE_GETTEXT=0
|
||||
NLS_USES= gettext
|
||||
NLS_LDFLAGS= -L${LOCALBASE}/lib
|
||||
SOUND_CMAKE_ON= -DENABLE_SOUND=1
|
||||
SOUND_CMAKE_OFF= -DENABLE_SOUND=0
|
||||
LEVELDB_CMAKE_ON= -DENABLE_LEVELDB=1
|
||||
LEVELDB_CMAKE_OFF= -DENABLE_LEVELDB=0
|
||||
LEVELDB_LIB_DEPENDS= libleveldb.so:${PORTSDIR}/databases/leveldb
|
||||
FREETYPE_CMAKE_ON= -DENABLE_FREETYPE=1
|
||||
FREETYPE_CMAKE_OFF= -DENABLE_FREETYPE=0
|
||||
FREETYPE_LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2
|
||||
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:${PORTSDIR}/lang/luajit
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MSOUND}
|
||||
USE_OPENAL+= yes
|
||||
LIB_DEPENDS+= libvorbis.so:${PORTSDIR}/audio/libvorbis
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MSERVER}
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
USERS= minetest # reuse, as freeminer is a fork of
|
||||
GROUPS= minetest
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \
|
||||
${WRKSRC}/cmake/Modules/*.cmake
|
||||
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|' \
|
||||
${WRKSRC}/src/CMakeLists.txt
|
||||
.if ! ${PORT_OPTIONS:MLUAJIT}
|
||||
@${REINPLACE_CMD} -e '/find_/ s|LUA_|NO&|g' \
|
||||
${WRKSRC}/src/CMakeLists.txt
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
2
games/freeminer/distinfo
Normal file
2
games/freeminer/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (freeminer-0.4.8.2.tar.gz) = 38606ece229b82332765b7777a6ed97f0062eeb1ded4a3b5e1a1211720047f14
|
||||
SIZE (freeminer-0.4.8.2.tar.gz) = 5313173
|
76
games/freeminer/files/freeminer.in
Normal file
76
games/freeminer/files/freeminer.in
Normal file
@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: freeminer
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following line to /etc/rc.conf[.local] to enable freeminer server
|
||||
#
|
||||
# freeminer_enable (bool): Set to "NO" by default
|
||||
# Set it to "YES" to enable freeminer server
|
||||
# freeminer_conffile (str): Path to config file (required).
|
||||
# (default: /usr/local/etc/freeminer.conf)
|
||||
# freeminer_rundir (str): Path to directory holding a pidfile.
|
||||
# (default: /var/run/freeminer)
|
||||
# freeminer_user (str): User to run as
|
||||
# (default: freeminer)
|
||||
# freeminer_group (str): Group to run as
|
||||
# (default: freeminer)
|
||||
# freeminer_logdir (str): Path to log directory
|
||||
# (default: /var/log/freeminer)
|
||||
# freeminer_dbdir (str): Path to world database directory
|
||||
# (default: /var/db/freeminer)
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=freeminer
|
||||
rcvar=freeminer_enable
|
||||
|
||||
load_rc_config ${name}
|
||||
|
||||
: ${freeminer_enable="NO"}
|
||||
: ${freeminer_config="/usr/local/etc/freeminer.conf"}
|
||||
: ${freeminer_rundir="/var/run/freeminer"}
|
||||
: ${freeminer_user="freeminer"}
|
||||
: ${freeminer_group="freeminer"}
|
||||
: ${freeminer_logdir="/var/log/freeminer"}
|
||||
: ${freeminer_dbdir="/var/db/freeminer"}
|
||||
: ${freeminer_args:="--logfile ${freeminer_logdir}/debug.log --world ${freeminer_dbdir}/world ${freeminer_flags}"}
|
||||
|
||||
pidfile=
|
||||
|
||||
case "${freeminer_args}" in
|
||||
*--config\ *)
|
||||
echo "Warning \$freeminer_args includes --config option." \
|
||||
"Please use \$freeminer_conffile instead."
|
||||
;;
|
||||
*)
|
||||
freeminer_args="--config ${freeminer_config} ${freeminer_args}"
|
||||
;;
|
||||
esac
|
||||
|
||||
command=/usr/sbin/daemon
|
||||
procname=/usr/local/bin/freeminerserver
|
||||
pidfile=${freeminer_rundir}/freeminer.pid
|
||||
command_args="-c -f -p ${pidfile} ${procname} ${freeminer_args}"
|
||||
required_files=${freeminer_config}
|
||||
start_precmd=freeminer_prestart
|
||||
|
||||
freeminer_prestart () {
|
||||
if [ ! -d ${freeminer_rundir} ]; then
|
||||
mkdir -m 755 -p ${freeminer_rundir}
|
||||
chown -R ${freeminer_user}:${freeminer_group} ${freeminer_rundir}
|
||||
fi
|
||||
if [ ! -d ${freeminer_logdir} ]; then
|
||||
mkdir -m 755 -p ${freeminer_logdir}
|
||||
chown -R ${freeminer_user}:${freeminer_group} ${freeminer_logdir}
|
||||
fi
|
||||
if [ ! -d ${freeminer_dbdir} ]; then
|
||||
mkdir -m 755 -p ${freeminer_dbdir}/data
|
||||
chown -R ${freeminer_user}:${freeminer_group} ${freeminer_dbdir}
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
3
games/freeminer/pkg-descr
Normal file
3
games/freeminer/pkg-descr
Normal file
@ -0,0 +1,3 @@
|
||||
Freeminer is a Minecraft-inspired sandbox game.
|
||||
|
||||
WWW: http://freeminer.org/
|
9
games/freeminer/pkg-message
Normal file
9
games/freeminer/pkg-message
Normal file
@ -0,0 +1,9 @@
|
||||
Freeminer engine has been installed.
|
||||
|
||||
Note that for offline play or for server hosting you also need
|
||||
to install game data. For now, only one game is available for
|
||||
freeminer and you can install it with games/freeminer-default
|
||||
port.
|
||||
|
||||
For online play engine is sufficient as it will downloaded all
|
||||
required data automatically.
|
7
games/freeminer/pkg-plist
Normal file
7
games/freeminer/pkg-plist
Normal file
@ -0,0 +1,7 @@
|
||||
%%CLIENT%%bin/freeminer
|
||||
%%SERVER%%bin/freeminerserver
|
||||
@unexec if cmp -s %D/etc/freeminer.conf.example %D/etc/freeminer.conf; then rm -f %D/etc/freeminer.conf; fi
|
||||
etc/freeminer.conf.example
|
||||
@exec if [ ! -f %B/freeminer.conf ]; then cp -p %D/%F %B/freeminer.conf; fi
|
||||
man/man6/freeminer.6.gz
|
||||
man/man6/freeminerserver.6.gz
|
Loading…
Reference in New Issue
Block a user