# $Id$ PNAME="flashplayer" PVER="26.0.0.151" PBUILD="r1" PCAT="media-gfx" DESCRIPTION="Macromedia Flash Player for Mozilla based browsers." HOMEPAGE="http://www.adobe.com/de/products/flashplayer/" DEPEND=">= x11-libs/gtk2+-2.24 >= net-misc/curl-7 >= dev-libs/nss-3.13 >= x11-themes/hicolor-icon-theme-0.12" SRCFILE_PPAPI_x86="flash_player_ppapi_linux.i386.tar.gz" SRCFILE_PPAPI_x86_64="flash_player_ppapi_linux.x86_64.tar.gz" SRCFILE_NPAPI_x86="flash_player_npapi_linux.i386.tar.gz" SRCFILE_NPAPI_x86_64="flash_player_npapi_linux.x86_64.tar.gz" SRCFILE_PPAPI="$(marchsrcfile SRCFILE_PPAPI)" SRCDIR_PPAPI="${BUILDDIR}/flash_player_ppapi_${PVER%%.*}_linux" SRCFILE_NPAPI="$(marchsrcfile SRCFILE_NPAPI)" SRCDIR_NPAPI="${BUILDDIR}/flash_player_npapi_${PVER%%.*}_linux" LICENSE_PVER="20110809_1357" LICENSE_SRCFILE="PlatformClients_PC_WWEULA_MULTI_${LICENSE_PVER}.pdf" sminclude mtools gnome2 # see: http://www.adobe.com/products/flashplayer/distribution3.html SRC_URI=( "http://fpdownload.macromedia.com/get/${PNAME}/pdc/${PVER}/${SRCFILE_PPAPI_x86} ${PVER}" "http://fpdownload.macromedia.com/get/${PNAME}/pdc/${PVER}/${SRCFILE_PPAPI_x86_64} ${PVER}" "http://fpdownload.macromedia.com/get/${PNAME}/pdc/${PVER}/${SRCFILE_NPAPI_x86} ${PVER}" "http://fpdownload.macromedia.com/get/${PNAME}/pdc/${PVER}/${SRCFILE_NPAPI_x86_64} ${PVER}" "http://www.adobe.com/products/eulas/pdfs/${LICENSE_SRCFILE} ${PVER}" "mirror://${PNAME}/${PVER}/${SRCFILE_PPAPI_x86} ${PVER}" "mirror://${PNAME}/${PVER}/${SRCFILE_PPAPI_x86_64} ${PVER}" "mirror://${PNAME}/${PVER}/${SRCFILE_NPAPI_x86} ${PVER}" "mirror://${PNAME}/${PVER}/${SRCFILE_NPAPI_x86_64} ${PVER}" mirror://${PNAME}/mms.cfg ) # 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 'Version [0-9]' | sed 's/.*Version\ \(.*\)/\1/'" src_prepare() { munpack ${PVER}/${SRCFILE_PPAPI} ${SRCDIR_PPAPI} # do not die here, upstream tarballs have trailing garbage munpack ${PVER}/${SRCFILE_NPAPI} ${SRCDIR_NPAPI} # do not die here, upstream tarballs have trailing garbage } # override gnome sminc src_compile() { true ; } src_install() { # install npapi cd ${SRCDIR_NPAPI} 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 # properties binary minstallexec usr/bin/flash-player-properties || die # hicolor icon scheme minstalldir /usr/share/icons/hicolor || die local i for i in 16 22 24 32 48 do minstalldir /usr/share/icons/hicolor/${i}x${i}/apps || die minstallfile usr/share/icons/hicolor/${i}x${i}/apps/flash-player-properties.png \ /usr/share/icons/hicolor/${i}x${i}/apps || die done # create config minstalldir /etc/adobe || die minstallfile -s mms.cfg /etc/adobe || die # install ppapi cd ${SRCDIR_PPAPI} minstalldir /usr/$(mlibdir)/chromium/PepperFlash || die minstallexec libpepflashplayer.so /usr/$(mlibdir)/chromium/PepperFlash || die minstallfile manifest.json /usr/$(mlibdir)/chromium/PepperFlash || die } postinstall() { gn2_update_icon_cache } postremove() { gn2_update_icon_cache }