#Author Alexander Gretencord S=${WORKDIR}/${P} DESCRIPTION="Quake III - CPMA" SRC_URI="http://www.challenge-tv.com/demostorage/files/cpm/cpma99w1-full.zip" HOMEPAGE="www.promode.org" DEPEND="app-arch/unzip" RDEPEND="virtual/glibc >=app-games/quake3-1.31" src_unpack() { unzip ${DISTDIR}/cpma99w1-full.zip } src_compile () { chown -R q3.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 chmod u+x ${D}/etc/init.d/q3ded-cpma insinto /opt/quake3 doins ${FILESDIR}/startcpma chown q3.games ${D}/opt/quake3/startcpma chmod u+x ${D}/opt/quake3/startcpma if [ ! -f /opt/quake3/cpma/server.cfg ]; then insinto /opt/quake3/cpma doins ${FILESDIR}/server.cfg chown q3.games ${D}/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#########################################" }