1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
# Don't install the CVS cruft of orig tarball
DEB_DH_INSTALL_ARGS_ALL=-XCVS -X.cvsignore
# 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/Makefile
rm -f ${TMPDIR}/bubbob/setup.py
rm -f ${TMPDIR}/bubbob/statesaver.c
rm -f ${TMPDIR}/display/Makefile
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
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_python2 -pbubbros
clean::
# Remove temporary files
rm -rf ${TMPDIR}
# Remove manpage copies
rm -rf ${DEBDIR}/man
# Restore removed execution permissions
chmod +x ${CURDIR}/BubBob.py
|