# $Header: /magellan-cvs/smage/nspluginwrapper/nspluginwrapper-1.0.0-r1.smage2,v 1.1 2008/08/10 09:19:21 niro Exp $ PNAME="nspluginwrapper" PVER="1.2.2" PBUILD="r1" PCATEGORIE="net-www" STATE="unstable" DESCRIPTION="nspluginwrapper is an Open Source compatibility plugin for Netscape 4 (NPAPI) plugins. " HOMEPAGE="http://gwenole.beauchesne.info/projects/nspluginwrapper/" DEPEND=">= x11-libs/libXt-1 >= x11-libs/gtk2+-2.16 >= dev-util/linux32-1" SDEPEND=">= dev-util/pkgconfig-0.23" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools SRC_URI=( http://gwenole.beauchesne.info/projects/${PNAME}/files/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-0.9.91.5-magellan.patch ) UP2DATE="updatecmd ${HOMEPAGE} | lasttarball" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # add support for magellan linux mpatch ${PNAME}-0.9.91.5-magellan.patch || die } src_compile() { cd ${SRCDIR} mconfigure \ --with-biarch \ --with-lib32=lib \ --with-lib64=$(mlibdir) \ --pkglibdir=/usr/$(mlibdir)/${PNAME} \ || die mmake || die } src_install() { local myarch [[ ${ARCH} = i?86 ]] && myarch="i386" [[ ${ARCH} = x86_64 ]] && myarch="${ARCH}" cd ${SRCDIR} make DESTDIR=${BINDIR} DONT_STRIP=yes install || die minstalldir /usr/bin mlink /usr/$(mlibdir)/nspluginwrapper/${myarch}/linux/npconfig /usr/bin/nspluginwrapper || die # setup the plugin minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die minstalldir /opt/netscape/plugins || die mlink /usr/$(mlibdir)/nspluginwrapper/${myarch}/linux/npwrapper.so /usr/$(mlibdir)/nsbrowser/plugins || die mlink /usr/$(mlibdir)/nspluginwrapper/${myarch}/linux/npwrapper.so /opt/netscape/plugins || die } postinstall() { echo "Auto installing 32bit plugins ..." nspluginwrapper -v -a -i echo echo "Any 32bit plugins you currently have installed have now been" echo "configured to work in a 64bit browser. Any plugins you install in" echo "the future will first need to be setup with:" echo " \"nspluginwrapper -i \"" echo "before they will function in a 64bit browser" echo } preremove() { echo "Removing wrapper plugins ..." nspluginwrapper -v -a -r } postremove() { if [[ -x /usr/bin/nspluginwrapper ]] then echo "Auto installing 32bit plugins ..." nspluginwrapper -v -a -i fi }