debian swirl logo

Back to the packages list bubbros

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk

# Define some repeatedly used paths
DEBDIR= ${CURDIR}/debian
BINDIR= ${DEBDIR}/bin
BUBDIR= ${DEBDIR}/bubbros
TMPDIR= ${DEBDIR}/tmp

build/bubbros::
	# Copy bubbob/ and display/ directories
		mkdir ${TMPDIR}
		cp -r ${CURDIR}/bubbob ${TMPDIR}/
		cp -r ${CURDIR}/display ${TMPDIR}/

	# Build images
		(cd ${TMPDIR}/bubbob/images && python buildcolors.py) || exit 1

	# Remove unnecessary stuff
		rm -f ${TMPDIR}/bubbob/setup.py
		rm -f ${TMPDIR}/bubbob/statesaver.c
		rm -f ${TMPDIR}/display/setup.py
		rm -f ${TMPDIR}/display/xshm.c
		rm -rf ${TMPDIR}/bubbob/doc
		rm -rf ${TMPDIR}/display/windows

	# Remove unnecessary execution permissions
		chmod -x ${CURDIR}/BubBob.py
		chmod -x ${TMPDIR}/bubbob/bb.py
		chmod -x ${TMPDIR}/display/dpy_windows.py

	# Regenerate PNG icon from uuencoded file
		uudecode ${CURDIR}/debian/bubbros.png.uu

install/bubbros::
	# Install the executable files
		mkdir -p ${DEBDIR}/bubbros/usr/games
		cp ${BINDIR}/bubbros.sh ${BUBDIR}/usr/games/bubbros
		cp ${BINDIR}/bubbros-client.sh ${BUBDIR}/usr/games/bubbros-client
		cp ${BINDIR}/bubbros-server.sh ${BUBDIR}/usr/games/bubbros-server

	# Rename manpages
		mkdir ${DEBDIR}/man
		cp ${CURDIR}/doc/BubBob.py.1 ${DEBDIR}/man/bubbros.6
		cp ${CURDIR}/doc/bb.py.1 ${DEBDIR}/man/bubbros-server.6
		cp ${CURDIR}/doc/Client.py.1 ${DEBDIR}/man/bubbros-client.6

binary-install/bubbros::
		dh_pysupport -pbubbros

clean::
	# Remove temporary files
		rm -rf ${TMPDIR}

	# Remove manpage copies
		rm -rf ${DEBDIR}/man

	# Restore removed execution permissions
		chmod +x ${CURDIR}/BubBob.py

	# Remove previously generated PNG icon
		rm -f ${DEBDIR}/bubbros.png

Builds:

bubbros
multiplayer clone of the famous bubble bobble game