# $Id$ PNAME="flashplayer" PVER="10.3.183.5" PBUILD="r1" PCATEGORIE="media-gfx" STATE="unstable" DESCRIPTION="Macromedia Flash Player for Mozilla based browsers." HOMEPAGE="http://www.adobe.com/de/products/flashplayer/" # x86_64 specific dependencies SDEPENDS_x86_64=">= net-www/nspluginwrapper-0.9" SPECIAL_VARS="SDEPENDS_x86_64" DEPEND=">= x11-libs/gtk2+-2.18 >= net-misc/curl-7 \$(eval echo \\\$SDEPENDS_\${ARCH/i*86/x86} | tr ';' '\n')" SRCFILE="install_flash_player_${PVER%%.*}_linux.tar.gz" SRCDIR="${BUILDDIR}/install_flash_player_${PVER%%.*}_linux" LIBCOMPAT_PVER="0.2" LIBCOMPAT_SRCFILE="flash-libcompat-${LIBCOMPAT_PVER}.tar.bz2" LIBCOMPAT_SRCDIR="${BUILDDIR}/flash-libcompat-${LIBCOMPAT_PVER}" sminclude mtools SRC_URI=( http://fpdownload.macromedia.com/get/${PNAME}/current/${SRCFILE} http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/distfiles/${LIBCOMPAT_SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${LIBCOMPAT_SRCFILE} ) # adobe looks if the useragent contains 'Linux' to decide wether it's a linux box or not UP2USERAGENT="lynx Linux" UP2DATE="updatecmd http://get.adobe.com/de/flashplayer/ | grep 'Player version' | sed 's/.*version\ \(.*\)/\1/'" src_prepare() { munpack ${SRCFILE} ${SRCDIR} || die munpack ${LIBCOMPAT_SRCFILE} || die } src_install() { cd ${SRCDIR} minstalldir /opt/netscape/plugins || die minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die minstallexec libflashplayer.so /usr/$(mlibdir)/nsbrowser/plugins || die mlink /usr/$(mlibdir)/nsbrowser/plugins/libflashplayer.so /opt/netscape/plugins || die if [[ ${ARCH} = x86_64 ]] then minstalldir /etc/env.d || die minstalldir /opt/flash-libcompat || die minstallexec ${LIBCOMPAT_SRCDIR}/\* /opt/flash-libcompat || die echo 'LDPATH="/opt/flash-libcompat"' > ${BINDIR}/etc/env.d/99flash-libcompat || die fi minstalldocs Readme.txt || die } postinstall() { if [[ -x /usr/bin/nspluginwrapper ]] then echo "Auto installing 32bit plugins ..." nspluginwrapper -v -a -i fi } postremove() { if [[ -x /usr/bin/nspluginwrapper ]] then echo "Auto updating 32bit plugins ..." nspluginwrapper -v -a -u fi }