#Packager: Dimitris Tzemos pkgname=flash-plugin pkgver=${pkgver:-"$(wget -O - http://www.adobe.com/software/flash/about/ 2>/dev/null | sed -n "/Firefox - NPAPI/{N;p}" | tr -d ' '| tail -1 | tr '<>' ' ' | cut -f3 -d ' ')"} _majorver=`echo $pkgver | sed "s/\(.*\)\.\(.*\)\.\(.*\)\.\(.*\)/\1/"` pkgrel=1dj # We need to make sure that $ARCH/$arch are defined now because they # are needed for $_oarch (and hence $source) to work correctly. # Otherwise they would remain undefined until build time and hence the # we could not locate the correct "source" package. # Base $ARCH on uname or what the packager has predefined outside of # this script. If set to i386, i486 or i586 it will be changed to i686 # as Opera will not run on older processors. ARCH=$(echo ${ARCH:-$(uname -m)} | sed "s/i[345]86/i686/") # Have $arch inherit its value directly from $ARCH or what the packager # has predefined outside of this script. Again correcting for i386, # i486 or i586 being predefined. arch=$(echo ${arch:-$ARCH} | sed "s/i[345]86/i686/") # Adobe labels the 32-bit flash packages i386, even though they are i686. # The following ensures the correct package is specified, even when # $ARCH/$arch have been set to i686. _farch=$(echo $arch | sed "s/i686/i386/") #source=("install_flash_player_${_majorver}_linux.${_farch}.tar.gz") source=(http://fpdownload.macromedia.com/get/flashplayer/pdc/$pkgver/flash_player_npapi_linux.${_farch}.tar.gz) docs=("lgpl.txt" "notice.txt") options=('nosrcpack') slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "flash-plugin (Adobe(R) flashplayer plugin for GNU/Linux)" "Adobe(R) Flash Player is the high-performance, lightweight," "highly expressive client runtime that delivers powerful" "and consistent user experiences across major operating" "systems, browsers, mobile phones, and devices." "" "This is not free software." "Make sure you read the Adobe(R) flashplayer license from:" "http://www.adobe.com/products/players/fpsh_distribution1.html" "If you don't agree with it, you must remove the package." ) build() { cd $startdir/src/ mkdir -p $startdir/pkg/usr/lib${LIBDIRSUFFIX}/flashplugin cp libflashplayer.so $startdir/pkg/usr/lib${LIBDIRSUFFIX}/flashplugin/ mkdir -p $startdir/pkg/usr/lib${LIBDIRSUFFIX}/{firefox/plugins,mozilla/plugins} ( cd $startdir/pkg/usr/lib${LIBDIRSUFFIX}/mozilla/plugins ln -s /usr/lib${LIBDIRSUFFIX}/flashplugin/libflashplayer.so libflashplayer.so ) install -d $startdir/pkg/usr/{bin,share} install -m 755 usr/bin/flash-player-properties $startdir/pkg/usr/bin/ cp -a usr/share/{applications,icons} $startdir/pkg/usr/share/ find $startdir/pkg/usr/share -type f -exec chmod 644 {} \; chown -R root:root $startdir/pkg }