#Author Alexander Gretencord S=${WORKDIR}/${P} DESCRIPTION="Quake III - OSP" SRC_URI="http://www.orangesmoothie.org/downloads/osp-Quake3-1.01_full.zip" HOMEPAGE="www.orangesmoothie.org" DEPEND="app-arch/unzip" RDEPEND="virtual/glibc >=app-games/quake3-1.31 opengl? ( virtual/opengl )" src_unpack() { unzip -q ${DISTDIR}/osp-Quake3-1.01_full.zip || die } src_compile () { chown -R root.games ${WORKDIR}/osp find ${WORKDIR}/osp -type d -print0 | xargs --null chmod 755 find ${WORKDIR}/osp -type f -print0 | xargs --null chmod 744 } src_install() { dodir /opt/quake3 mv ${WORKDIR}/osp ${D}/opt/quake3 insinto /opt/quake3 doins ${FILESDIR}/startosp chmod 754 ${D}/opt/quake3/startosp chown root.games ${D}/opt/quake3/startosp if [ ! -f /opt/quake3/osp/server.cfg ]; then insinto /opt/quake3/osp doins ${FILESDIR}/server.cfg chown root.games ${D}/opt/quake3/osp/server.cfg fi insinto /etc/init.d newins ${FILESDIR}/osp.rc q3ded-osp chmod u+x ${D}/etc/init.d/q3ded-osp } pkg_postinst() { echo -e "\t#########################################" echo -e "\t# A sample configuration file for 1v1 #" echo -e "\t# combat has been placed into the osp #" echo -e "\t# dir. #" echo -e "\t# #" echo -e "\t# The "q3ded-osp" file in /etc/init.d #" echo -e "\t# can be used to start an osp 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 osp #" echo -e "\t# #" echo -e "\t# Have a look at "startosp" 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#########################################" }