pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/games/assaultcube
Module Name: pkgsrc
Committed By: nia
Date: Wed May 8 16:10:30 UTC 2024
Modified Files:
pkgsrc/games/assaultcube: Makefile Makefile.common
Added Files:
pkgsrc/games/assaultcube/files: ac_client.sh.in ac_server.sh.in
Removed Files:
pkgsrc/games/assaultcube/files: assaultcube.sh.in
Log Message:
assaultcube: Make it easy to run ac_server as non-root
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 pkgsrc/games/assaultcube/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/games/assaultcube/Makefile.common
cvs rdiff -u -r0 -r1.1 pkgsrc/games/assaultcube/files/ac_client.sh.in \
pkgsrc/games/assaultcube/files/ac_server.sh.in
cvs rdiff -u -r1.1 -r0 pkgsrc/games/assaultcube/files/assaultcube.sh.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/games/assaultcube/Makefile
diff -u pkgsrc/games/assaultcube/Makefile:1.23 pkgsrc/games/assaultcube/Makefile:1.24
--- pkgsrc/games/assaultcube/Makefile:1.23 Mon May 6 17:30:50 2024
+++ pkgsrc/games/assaultcube/Makefile Wed May 8 16:10:30 2024
@@ -1,4 +1,6 @@
-# $NetBSD: Makefile,v 1.23 2024/05/06 17:30:50 nia Exp $
+# $NetBSD: Makefile,v 1.24 2024/05/08 16:10:30 nia Exp $
+
+PKGREVISION= 1
COMMENT= Cube-based FPS with realistic environments
Index: pkgsrc/games/assaultcube/Makefile.common
diff -u pkgsrc/games/assaultcube/Makefile.common:1.3 pkgsrc/games/assaultcube/Makefile.common:1.4
--- pkgsrc/games/assaultcube/Makefile.common:1.3 Mon May 6 17:30:50 2024
+++ pkgsrc/games/assaultcube/Makefile.common Wed May 8 16:10:30 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.3 2024/05/06 17:30:50 nia Exp $
+# $NetBSD: Makefile.common,v 1.4 2024/05/08 16:10:30 nia Exp $
# used by games/assaultcube/Makefile
# used by games/assaultcube-server/Makefile
@@ -50,11 +50,14 @@ CHECK_WRKREF_SKIP+= share/*
pre-configure:
${RM} -f ${WRKSRC}/source/include/libintl.h
-.for prog in ${BUILD_TARGET}
${SED} -e 's,@PREFIX@,${PREFIX},g' \
- < ${FILESDIR}/assaultcube.sh.in > \
- ${WRKDIR}/ac_${prog}
-.endfor
+ < ${FILESDIR}/ac_server.sh.in > \
+ ${WRKDIR}/ac_server
+.if ${BUILD_TARGET:M*client*}
+ ${SED} -e 's,@PREFIX@,${PREFIX},g' \
+ < ${FILESDIR}/ac_client.sh.in > \
+ ${WRKDIR}/ac_client
+.endif
do-install:
.for prog in ${BUILD_TARGET}
Added files:
Index: pkgsrc/games/assaultcube/files/ac_client.sh.in
diff -u /dev/null pkgsrc/games/assaultcube/files/ac_client.sh.in:1.1
--- /dev/null Wed May 8 16:10:30 2024
+++ pkgsrc/games/assaultcube/files/ac_client.sh.in Wed May 8 16:10:30 2024
@@ -0,0 +1,9 @@
+#!/bin/sh
+if [ -n "${XDG_CONFIG_HOME}" ]; then
+ DIR="${XDG_CONFIG_HOME}/assaultcube"
+else
+ DIR="${HOME}/.config/assaultcube"
+fi
+mkdir -p "${DIR}" && \
+ cd "@PREFIX@/share/assaultcube" && \
+ exec "@PREFIX@/libexec/${0##*/}" "--home=${DIR}" --init $@
Index: pkgsrc/games/assaultcube/files/ac_server.sh.in
diff -u /dev/null pkgsrc/games/assaultcube/files/ac_server.sh.in:1.1
--- /dev/null Wed May 8 16:10:30 2024
+++ pkgsrc/games/assaultcube/files/ac_server.sh.in Wed May 8 16:10:30 2024
@@ -0,0 +1,19 @@
+#!/bin/sh
+if [ -z "${XDG_DATA_HOME}" ]; then
+ XDG_DATA_HOME="$HOME/.local/share"
+fi
+printf "using directory %s\n" "${XDG_DATA_HOME}/ac_server"
+mkdir -p "${XDG_DATA_HOME}/ac_server"
+mkdir -p "${XDG_DATA_HOME}/ac_server/logs"
+if ! [ -e "${XDG_DATA_HOME}/ac_server/packages" ]; then
+ printf "copying data files...\n"
+ cp -R @PREFIX@/share/assaultcube/packages \
+ "${XDG_DATA_HOME}/ac_server/packages"
+fi
+if ! [ -e "${XDG_DATA_HOME}/ac_server/config" ]; then
+ printf "copying default config files...\n"
+ cp -R @PREFIX@/share/assaultcube/config \
+ "${XDG_DATA_HOME}/ac_server/config"
+fi
+cd "${XDG_DATA_HOME}/ac_server" && \
+ exec "@PREFIX@/libexec/${0##*/}" $@
Home |
Main Index |
Thread Index |
Old Index