| 
									
										
										
										
											2016-02-24 01:45:48 +00:00
										 |  |  | # Copyright 2016 Julian Ospald <hasufell@posteo.de> | 
					
						
							|  |  |  | # Distributed under the terms of the GNU General Public License v2 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-26 12:53:36 +00:00
										 |  |  | require desktop-utils | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-02-24 01:45:48 +00:00
										 |  |  | SUMMARY="Faster Than Light: A spaceship simulation real-time roguelike-like game" | 
					
						
							|  |  |  | HOMEPAGE="http://www.ftlgame.com/" | 
					
						
							|  |  |  | DOWNLOADS="manual: FTL.${PV}.tar.gz" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | LICENCES="all-rights-reserved Boost-1.0 free-noncomm MIT FTL LGPL-2.1 ZLIB libpng" | 
					
						
							|  |  |  | SLOT="0" | 
					
						
							|  |  |  | PLATFORMS="-* ~amd64 ~x86" | 
					
						
							|  |  |  | MYOPTIONS="
 | 
					
						
							|  |  |  |     ( platform: amd64 x86 ) | 
					
						
							|  |  |  | "
 | 
					
						
							| 
									
										
										
										
											2016-05-13 20:41:29 +00:00
										 |  |  | RESTRICT="fetch" | 
					
						
							| 
									
										
										
										
											2016-02-24 01:45:48 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | DEPENDENCIES="
 | 
					
						
							|  |  |  |     run: | 
					
						
							|  |  |  |         media-libs/DevIL | 
					
						
							|  |  |  |         media-libs/SDL:0[X] | 
					
						
							|  |  |  |         media-libs/freetype:2 | 
					
						
							|  |  |  |         sys-libs/zlib | 
					
						
							|  |  |  |         x11-dri/mesa | 
					
						
							|  |  |  | "
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | WORK=${WORKBASE}/${PN} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | pkg_nofetch() { | 
					
						
							|  |  |  |     einfo "Please buy & download ${DOWNLOADS} from:" | 
					
						
							|  |  |  |     einfo "  ${HOMEPAGE}" | 
					
						
							|  |  |  |     einfo "and move it to ${FETCHEDDIR}" | 
					
						
							|  |  |  |     einfo | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | pkg_setup() { | 
					
						
							|  |  |  |     exdirectory --allow /opt | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | src_install() { | 
					
						
							|  |  |  |     local dir=/opt/${PN} | 
					
						
							|  |  |  |     local arch=$(option platform:amd64 "amd64" "x86") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     insinto "${dir}" | 
					
						
							|  |  |  |     doins -r data/resources | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     exeinto "${dir}"/bin | 
					
						
							|  |  |  |     doexe data/${arch}/bin/${PN} | 
					
						
							|  |  |  |     exeinto "${dir}"/lib | 
					
						
							|  |  |  |     doexe data/${arch}/lib/*.so* | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     herebin ${PN} << EOF | 
					
						
							|  |  |  | #!/bin/sh
 | 
					
						
							|  |  |  | cd "/opt/FTL" | 
					
						
							|  |  |  | if [ "\${LD_LIBRARY_PATH+set}" = "set" ] ; then | 
					
						
							|  |  |  | export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:/opt/FTL/lib" | 
					
						
							|  |  |  | else | 
					
						
							|  |  |  | export LD_LIBRARY_PATH="/opt/FTL/lib" | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | exec /opt/FTL/bin/FTL "$@" | 
					
						
							|  |  |  | EOF | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-26 12:53:36 +00:00
										 |  |  |     install_desktop_entry "Name=Faster Than Light" \
 | 
					
						
							|  |  |  |         "Icon=/usr/share/pixmaps/FTL.bmp" | 
					
						
							| 
									
										
										
										
											2016-02-24 01:45:48 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     insinto /usr/share/pixmaps | 
					
						
							|  |  |  |     newins data/resources/exe_icon.bmp FTL.bmp | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     insinto /usr/share/doc/${PNVR}/html | 
					
						
							|  |  |  |     doins ${PN}_README.html | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 |