Verified Commit f379c82b authored by flussence's avatar flussence

Add ut2004-bonuspack-ece, refactor ut2004 stuff

The src_install symlink juggling lives in an eclass now.
Also added missing metadata.xml files to these
parent a0116c25
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: ut2004-mod.eclass
# @MAINTAINER:
# Anthony Parsons <ant+gentoo.bugs@flussence.eu>
# @AUTHOR:
# Anthony Parsons <ant+gentoo.bugs@flussence.eu>
# @BLURB: Common installer stuff for UT2004 mod files
# @DESCRIPTION: This provides a default src_install that takes care of putting files in the correct
# FHS folder, and also linking them to the /opt/ game folders so the game or server will find them.
EXPORT_FUNCTIONS src_install
SLOT="0"
RESTRICT="mirror strip"
DEPEND="app-arch/unzip"
GAME_DATADIR="/usr/share/games/ut2004"
GAME_SUBDIRS=(Animations Help Maps Music Sounds StaticMeshes System Textures)
GAME_DESTDIRS=(/opt/ut2004 /opt/ut2004-ded)
ut2004-mod_src_install() {
insinto "${GAME_DATADIR}"
for subdir in "${GAME_SUBDIRS[@]}"; do
[[ -d ./"${subdir}" ]] || continue
doins -r ./"${subdir}"
ut2004-mod_link_files "${subdir}"
done
}
ut2004-mod_link_files() {
local subdir=$1
local linkdirs=(/opt/ut2004 /opt/ut2004-ded)
for srcfile in "${D}/${GAME_DATADIR}/${subdir}"/*; do
for optdir in "${GAME_DESTDIRS[@]}"; do
dosym "${srcfile}" "${optdir}/${subdir}/${srcfile##*/}"
done
done
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>ant+gentoo.bugs@flussence.eu</email>
<name>Anthony Parsons</name>
</maintainer>
</pkgmetadata>
......@@ -3,39 +3,14 @@
EAPI=7
inherit ut2004-mod
DESCRIPTION="UT2004 Community Bonus Pack 1"
HOMEPAGE="https://liandri.beyondunreal.com/Unreal_Tournament_2004"
SRC_URI="mirror://ipfs/ipfs/QmX2WjFtWdhf87GR5g6UrkQhE8qKtVnhpeDkrW7Z3NpFDv -> cbp1.zip"
LICENSE="freedist"
SLOT="0"
KEYWORDS="amd64 x86"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND="app-arch/unzip"
MY_DATADIR="/usr/share/games/ut2004"
S="${WORKDIR}"
src_install() {
local gamedirs=(Help Maps Music StaticMeshes Textures)
insinto ${MY_DATADIR}
for destdir in "${gamedirs[@]}"; do
doins -r ./"${destdir}"
ut2004_mod_link_files "${destdir}"
done
}
# Files need to be symlinked to game dirs for the game to find them
ut2004_mod_link_files() {
local destdir=$1
local linkdirs=(/opt/ut2004 /opt/ut2004-ded)
for srcfile in "${D}/${MY_DATADIR}/${destdir}"/*; do
for linkdest in "${linkdirs[@]}"; do
dosym "${srcfile}" "${linkdest}/${destdir}/${srcfile##*/}"
done
done
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>ant+gentoo.bugs@flussence.eu</email>
<name>Anthony Parsons</name>
</maintainer>
</pkgmetadata>
......@@ -3,24 +3,25 @@
EAPI=7
inherit ut2004-mod
DESCRIPTION="UT2004 Community Bonus Pack 2"
HOMEPAGE="https://liandri.beyondunreal.com/Unreal_Tournament_2004"
SRC_URI="mirror://ipfs/ipfs/QmdphFqmxmA4AVbfYXkX41e9Ad2VDEvR1WgHy57F5cbP3X -> cbp2-volume1_zip.zip
mirror://ipfs/ipfs/QmV8H3Kf6LQDwfUB4EKfMAoW1bhmE6b3m3XNCcnpaMGGeD -> cbp2-volume2_zip.zip"
LICENSE="freedist"
SLOT="0"
KEYWORDS="amd64 x86"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND="app-arch/unzip"
RDEPEND="games-fps/ut2004-bonuspack-cbp1
games-fps/ut2004-bonuspack-mega"
MY_DATADIR="/usr/share/games/ut2004"
S="${WORKDIR}"
src_prepare() {
default
# Provided by ut2004-bonuspack-cbp1
rm Music/Soeren.ogg
# Provided by ut2004-bonuspack-mega
......@@ -31,29 +32,4 @@ src_prepare() {
rm Note.txt
mv GERROIDREADME.txt DOM-CBP2-Gerroid.txt
mv Readme.txt CBP2-Readme.txt
default
}
src_install() {
local gamedirs=(Animations Help Maps Music StaticMeshes System Textures)
insinto ${MY_DATADIR}
for destdir in "${gamedirs[@]}"; do
doins -r ./"${destdir}"
ut2004_mod_link_files "${destdir}"
done
}
# Files need to be symlinked to game dirs for the game to find them
ut2004_mod_link_files() {
local destdir=$1
local linkdirs=(/opt/ut2004 /opt/ut2004-ded)
for srcfile in "${D}/${MY_DATADIR}/${destdir}"/*; do
for linkdest in "${linkdirs[@]}"; do
dosym "${srcfile}" "${linkdest}/${destdir}/${srcfile##*/}"
done
done
}
DIST UT2004-ONSBonusMapPack.zip 11018471 BLAKE2B bc915d6942c321df4031b02eaa25f83793b3fa1f2bb916c5d413c5569a3f887b6517fc4dceb8cb914e22be62f58512e727a41d5efbc6066113be12a9da9621d0 SHA1 8289029501eca2764e75ea49a2423de2fbc13794 SHA512 8193375b89cd6fbc8b00de195797099c128fcf5cb73757bbc57d3c5350c497a878eaf0200f2e0711bf062e25c5d170e05b055c63f85b908b18dcc89572d71fd2
DIST ut2004megapack-linux.tar.bz2 203124107 BLAKE2B 1459e2638181411446ec5679bceb44023382b3533951478ee06c274199688f3bbe341d7f7806299a332373791b6d0a9e1b57efdc6a13a5983220e0adbc413118 SHA1 97f7865bc1b5c70ec82498b79ce7d85a4a26e40b SHA512 4ae5eec0622c2bd96dfc162541bc0771399b012fb00f022282bc8c34600cb8e9bb7c18a52dd55fbef6f16fedaf225e301c46077a6accd001f4c77ddad89ed17b
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>ant+gentoo.bugs@flussence.eu</email>
<name>Anthony Parsons</name>
</maintainer>
</pkgmetadata>
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit ut2004-mod
DESCRIPTION="UT2004 Editor's Choice Edition bonus pack"
HOMEPAGE="http://www.unrealtournament2004.com/"
MY_P=(ut2004megapack-linux.tar.bz2 UT2004-ONSBonusMapPack.zip)
SRC_URI="mirror://ipfs/ipfs/QmXcU3L3yhq4aVBdP9Lx7Ego9vH63D5Kx1PouvTuh8orz4 -> ${MY_P[0]}
mirror://ipfs/ipfs/QmQCpjBGdMYof2yNF5cQHrQNSzjvGkXh15uZN2RbS1HJjz -> ${MY_P[1]}"
LICENSE="ut2003"
KEYWORDS="~amd64 ~x86"
IUSE=""
S="${WORKDIR}"
src_unpack() {
unpack "${MY_P[0]}"
cd UT2004MegaPack/Maps || die
unpack "${MY_P[1]}" # bug #278002
}
src_prepare() {
mv -f UT2004MegaPack/* . || die
rmdir UT2004MegaPack || die
rm -r Music Speech || die
# Remove megapack files which are not in ece
rm Animations/ONSNewTank-A.ukx || die
rm Help/ReadMePatch.int.txt || die
# Help/{DebuggerLogo.bmp,InstallerLogo.bmp,Unreal.ico,UnrealEd.ico}
# are not in megapack.
# Keep new Help/UT2004Logo.bmp
# Manual dir does not exist in megapack
rm Maps/{AS*,CTF*,DM*} || die
rm Sounds/A_Announcer_BP2.uax || die
rm StaticMeshes/{JumpShipObjects.usx,Ty_RocketSMeshes.usx} || die
rm System/{A*,b*,B*,CacheRecords.ucl} || die
rm System/{*.det,*.est,*.frt,*.itt,*.kot} || die
rm System/{CTF*,D*,Editor*,G*,I*,L*,Onslaught.*,*.md5} || die
rm System/{u*,U*,V*,X*,Core.u,Engine.u,F*,*.ucl,Sk*} || die
rm Textures/{J*,j*,T*} || die
rm -r Web || die
# The file lists of ut2004-3369-r1 and -r2 are identical
# Remove files owned by ut2004-3369-r2
rm Help/UT2004Logo.bmp || die
# The 2 Manifest files have not changed
rm System/{Manifest.in{i,t},OnslaughtFull.int} || die
rm System/{Core.int,Engine.int,Setup.int,Window.int} || die
rm System/{OnslaughtFull.u,OnslaughtBP.u} || die
default
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment