# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: /home/cvsroot/gentoo-x86/app-games/quake3-cpma/quake3-cpma-0.99x-r2.ebuild,v 1.1 2002/06/25 15:54:32 bass Exp $ S=${WORKDIR}/${P} DESCRIPTION="Quake III - CPMA" SRC_URI="http://www.challenge-tv.com/demostorage/files/cpm/cpma99x1-full.zip" HOMEPAGE="www.promode.org" LICENSE="GPL" DEPEND="app-arch/unzip" RDEPEND="virtual/glibc >=app-games/quake3-1.31" SLOT="0" src_unpack() { unzip ${DISTDIR}/cpma99x1-full.zip > /dev/null } src_compile () { chown -R root.games ${WORKDIR}/cpma find ${WORKDIR}/cpma -type d -print0 | xargs --null chmod 755 find ${WORKDIR}/cpma -type f -print0 | xargs --null chmod 744 } src_install() { dodir /opt/quake3 mv ${WORKDIR}/cpma ${D}/opt/quake3 insinto /etc/init.d newins ${FILESDIR}/cpma.rc q3ded-cpma fperms u+x /etc/init.d/q3ded-cpma insinto /opt/quake3 doins ${FILESDIR}/startcpma fowners root.games /opt/quake3/startcpma fperms 754 /opt/quake3/startcpma if [ ! -f /opt/quake3/cpma/server.cfg ]; then insinto /opt/quake3/cpma doins ${FILESDIR}/server.cfg fowners root.games /opt/quake3/cpma/server.cfg fperms 740 /opt/quake3/cpma/server.cfg fi } pkg_postinst() { echo -e "\t#########################################" echo -e "\t# A sample configuration file for has #" echo -e "\t# been placed into the cpma dir. #" echo -e "\t# #" echo -e "\t# The "q3ded-cpma" file in /etc/init.d #" echo -e "\t# can be used to start a cpma server at #" echo -e "\t# bootup. It uses screen so you can get #" echo -e "\t# to the console anytime with: #" echo -e "\t# #" echo -e "\t# screen -r cpma #" echo -e "\t# #" echo -e "\t# Have a look at "startcpma" in the #" echo -e "\t# quake3 dir to set other options when #" echo -e "\t# starting the server. #" echo -e "\t# #" echo -e "\t# The server is started as user q3. #" echo -e "\t#########################################" }