# $Id$ PNAME="acrobat-reader" PVER="9.4.2" PBUILD="r1" PCATEGORIE="app-text" STATE="unstable" DESCRIPTION="Adobe Acrobat Reader, the famous PDF reader." HOMEPAGE="http://www.adobe.com/products/acrobat/readermain.html" # x86_64 specific dependencies SDEPENDS_x86_64=">= net-www/nspluginwrapper-0.9" SPECIAL_VARS="SDEPENDS_x86_64" DEPEND=">= x11-libs/gtk2+-2.12 \$(eval echo \\\$SDEPENDS_\${ARCH/i*86/x86} | tr ';' '\n')" SDEPEND=">= dev-util/desktop-file-utils-0.10 >= sys-apps/sed-4" SRCFILE="AdbeRdr${PVER}-1_i486linux_enu.tar.bz2" SRCDIR="${BUILDDIR}/AdobeReader" sminclude mtools SRC_URI=( http://ardownload.adobe.com/pub/adobe/reader/unix/${PVER:0:2}x/${PVER}/enu/${SRCFILE} ftp://ftp.adobe.com/pub/adobe/reader/ mirror://${PNAME}/${SRCFILE} ) # binary package, no stripping allowed NOSTRIP=true src_prepare() { munpack ${SRCFILE} || die # unpack the real installer files tar --no-same-owner -xvf ${SRCDIR}/COMMON.TAR -C ${SRCDIR} || die tar --no-same-owner -xvf ${SRCDIR}/ILINXR.TAR -C ${SRCDIR} || die # fix the broken desktop icon: # /var/tmp/magebuild/builded/usr/share/applications/adobe-AdobeReader.desktop: warning: value "AdobeReader8.png" for key "Icon" in group "Desktop Entry" is an icon name with an extension, but there should be no extension as described in the Icon Theme Specification if the value is not an absolute path # /var/tmp/magebuild/builded/usr/share/applications/adobe-AdobeReader.desktop: error: file contains key "Caption" in group "Desktop Entry", but keys extending the format should start with "X-" # /var/tmp/magebuild/builded/usr/share/applications/adobe-AdobeReader.desktop: error: file contains multiple keys named "Name[de]" in group "Desktop Entry" # Error on file "AdobeReader.desktop": Failed to validate the created desktop file cat ${SRCDIR}/Adobe/Reader${PVER:0:1}/Resource/Support/AdobeReader.desktop \ | uniq \ | sed -e '/Caption=/d' -e '/Icon=.*/s/.png//' \ > ${SRCDIR}/Adobe/Reader${PVER:0:1}/Resource/Support/AdobeReader.desktop || die } src_install() { cd ${SRCDIR}/Adobe/Reader${PVER:0:1} # needed directories minstalldir /usr/bin || die minstalldir /usr/lib/nsbrowser/plugins || die minstalldir /usr/share/applications || die minstalldir /opt/${PNAME}-${PVER}/bin || die # install deskop icon cp Resource/Support/AdobeReader.desktop AdobeReader.desktop || die minstallpixmap Resource/Icons/64x64/AdobeReader8.png AdobeReader.png || die desktop-file-install \ --vendor adobe \ --delete-original \ --dir ${BINDIR}/usr/share/applications \ --add-category X-Magellan-Extra \ --add-category Graphics \ --add-category Viewer \ --add-category Application \ AdobeReader.desktop \ || die # fix permissions chown --dereference -R -L root:root Reader || die chown --dereference -R -L root:root Resource || die find Reader -type d | xargs chmod 755 || die find Resource -type d | xargs chmod 755 || die # install data-files mv Reader ${BINDIR}/opt/${PNAME}-${PVER} || die mv Resource ${BINDIR}/opt/${PNAME}-${PVER} || die # install bins minstallexec bin/acroread /opt/${PNAME}-${PVER}/bin || die mlink /opt/${PNAME}-${PVER}/bin/acroread /usr/bin/acroread || die # install browser-plugin minstallexec Browser/intellinux/nppdf.so /usr/lib/nsbrowser/plugins || die # FIX ME: the PPKLite.api needs ldap, but we don't support this local plugin_path plugin_path="/opt/${PNAME}-${PVER}/Reader/intellinux/plug_ins" [ -f ${BINDIR}/${plugin_path}/PPKLite.api ] && \ rm ${BINDIR}/${plugin_path}/PPKLite.api || die cd ${SRCDIR} minstallhtml ReadMe.htm || die minstalldocs Adobe/Reader${PVER:0:1}/LICREAD.TXT || die minstalldocs Adobe/Reader${PVER:0:1}/Browser/HowTo/ENU/Browser_Plugin_HowTo.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 }