Linux:Packaging: Difference between revisions

From Spring
Jump to navigationJump to search
Melkor (talk | contribs)
Hoijui (talk | contribs)
→Binary Distros: replace strip code stub with code
Line 62: Line 62:
We recommend using <code>CMAKE_BUILD_TYPE=RELWITHDEBINFO</code>, and later splitting the debug symbols off into separate files with a command like this:
We recommend using <code>CMAKE_BUILD_TYPE=RELWITHDEBINFO</code>, and later splitting the debug symbols off into separate files with a command like this:


<code>##STUB##</code>
<font color="#77DD00"><code><pre>
#!/bin/sh
 
MINGW_HOST="i586-mingw32msvc-" # depends on your version of MinGW
if [ $(expr match "${TARGET_OS}" 'win') -gt 0 ]; then
# when compiling for windows
HOST_PREFIX="${MINGW_HOST}"
FILE_LIST="spring.exe spring-dedicated.exe spring-multithreaded.exe spring-headless.exe unitsync.dll $(find AI/Skirmish -name SkirmishAI.dll | xargs echo)"
else
# when compiling for linux
HOST_PREFIX=""
FILE_LIST="spring spring-dedicated spring-multithreaded spring-headless libunitsync.so $(find AI/Skirmish -name libSkirmishAI.so | xargs echo)"
fi
 
for toStripFile in ${FILE_LIST}; do
if [ -f "${toStripFile}" ]; then
debugFile=${toStripFile}.dbg
echo "stripping debug-symbols from ${toStripFile} to ${debugFile} ..."
# create debugFile
${HOST_PREFIX}objcopy --only-keep-debug ${toStripFile} ${debugFile}
# strip toStripFile
${HOST_PREFIX}strip --strip-debug --strip-unneeded ${toStripFile}
# connect debugFile to toStripFile
# This should only be done if you want to painlessly use GDB.
# For getting a translated stack-trace in infolog.txt, this is not required.
# It will slow down spring a lot at runtime, if you do this,
# and keep the debug symbols around.
#${HOST_PREFIX}objcopy --add-gnu-debuglink=${debugFile} ${toStripFile}
fi
done
</pre></code></font>


'''main packages (''package'' ~ ''deps''):'''
'''main packages (''package'' ~ ''deps''):'''

Revision as of 19:40, 28 October 2010

Linux < Linux:Packaging

Linux Packaging

Packagers

Nicknames and how to best contact them.


Ubuntu


det - Forum:det, Lobby:*det*??

Tobi - Forum:Tobi, Lobby:[RoX]Tobi

YokoZar - Forum:YokoZar, Lobby:*YokoZar*??

Debian

mammadori - Forum:mammadori, Lobby:*mammadori*??

jandd - Forum:jandd, Lobby:*jandd*??


Slackware


MelKor - Forum:MelKor , Lobby:*MelKor*??

Mandriva

(no one?)


OpenSuSe

Agon - Forum:Agon, Lobby:*Agon|*basket

cghislai - Forum:cghislai

Fedora

(unknown)


Gentoo

Auswaschbar - Forum:Auswaschbar, Lobby:*Auswaschbar

iElectric, #sy@quakenet:iElectric


Guidelines

Note: This section is only of interest for Linux package maintainers.

Here we outline the packaging scheme currently recommended by the engine development team.

Binary Distros

We recommend using CMAKE_BUILD_TYPE=RELWITHDEBINFO, and later splitting the debug symbols off into separate files with a command like this:

#!/bin/sh

MINGW_HOST="i586-mingw32msvc-" # depends on your version of MinGW
if [ $(expr match "${TARGET_OS}" 'win') -gt 0 ]; then
	# when compiling for windows
	HOST_PREFIX="${MINGW_HOST}"
	FILE_LIST="spring.exe spring-dedicated.exe spring-multithreaded.exe spring-headless.exe unitsync.dll $(find AI/Skirmish -name SkirmishAI.dll | xargs echo)"
else
	# when compiling for linux
	HOST_PREFIX=""
	FILE_LIST="spring spring-dedicated spring-multithreaded spring-headless libunitsync.so $(find AI/Skirmish -name libSkirmishAI.so | xargs echo)"
fi

for toStripFile in ${FILE_LIST}; do
	if [ -f "${toStripFile}" ]; then
		debugFile=${toStripFile}.dbg
		echo "stripping debug-symbols from ${toStripFile} to ${debugFile} ..."
		# create debugFile
		${HOST_PREFIX}objcopy --only-keep-debug ${toStripFile} ${debugFile}
		# strip toStripFile
		${HOST_PREFIX}strip --strip-debug --strip-unneeded ${toStripFile}
		# connect debugFile to toStripFile
		# This should only be done if you want to painlessly use GDB.
		# For getting a translated stack-trace in infolog.txt, this is not required.
		# It will slow down spring a lot at runtime, if you do this,
		# and keep the debug symbols around.
		#${HOST_PREFIX}objcopy --add-gnu-debuglink=${debugFile} ${toStripFile}
	fi
done

main packages (package ~ deps):

springrts-gamedata
springrts-engine-default ~ springrts-gamedata
springrts-engine-default-dbg ~ springrts-engine
springrts-engine-dedicated
springrts-engine-dedicated-dbg ~ springrts-engine-dedicated
springrts-engine-multithreaded ~ springrts-gamedata
springrts-engine-multithreaded-dbg ~ springrts-engine-multithreaded
springrts-engine-headless ~ springrts-gamedata
springrts-engine-headless-dbg ~ springrts-engine-headless
springrts-unitsync ~ springrts-gamedata
springrts-unitsync-dbg ~ springrts-unitsync

meta packages:

springrts-engine ~ springrts-engine-default springrts-engine-multithreaded
springrts-engine-dbg ~ springrts-engine springrts-engine-default-dbg springrts-engine-multithreaded-dbg
springrts ~ springrts-engine unitsync
springrts-dbg ~ springrts springrts-engine-dbg unitsync-dbg

Source Distros

springrts [default -dedicated -headless multithreaded unitsync]