Index: head/emulators/pipelight/Makefile =================================================================== --- head/emulators/pipelight/Makefile (revision 367383) +++ head/emulators/pipelight/Makefile (revision 367384) @@ -1,61 +1,66 @@ # Created by: Kris Moore # $FreeBSD$ PORTNAME= pipelight DISTVERSION= 0.2.7.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= emulators MASTER_SITES= https://bitbucket.org/mmueller2012/pipelight/get/ \ http://repos.fds-team.de/pluginloader/v${DISTVERSION}/:plg DISTNAME= v${DISTVERSION} DISTFILES= ${DISTNAME}${EXTRACT_SUFX} pluginloader.tar.gz:plg pluginloader.tar.gz.sig:plg DIST_SUBDIR= pipelight EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= kmoore@FreeBSD.org COMMENT= Wrapper for using windows plugins in web browsers LICENSE= LGPL21 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${LOCALBASE}/bin/gpg2:${PORTSDIR}/security/gnupg \ ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash LIB_DEPENDS= libxml2.so:${PORTSDIR}/textproc/libxml2 RUN_DEPENDS= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash \ ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget \ ${LOCALBASE}/bin/zenity:${PORTSDIR}/x11/zenity \ ${LOCALBASE}/bin/cabextract:${PORTSDIR}/archivers/cabextract \ ${LOCALBASE}/bin/flock:${PORTSDIR}/sysutils/flock \ ${LOCALBASE}/bin/gpg2:${PORTSDIR}/security/gnupg WRKSRC= ${WRKDIR}/mmueller2012-pipelight-79b1b7ba0032 USE_GCC= yes USE_LDCONFIG= yes CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib GNU_CONFIGURE= yes CONFIGURE_ARGS+=--verbose --wine-path=${LOCALBASE}/bin/wine --win32-prebuilt \ --win64-prebuilt --moz-plugin-path=${LOCALBASE}/lib/browser_plugins \ --cxx=${CXX} --bash-interp=${LOCALBASE}/bin/bash USE_XORG= x11 USES= compiler:gcc-c++11-lib gmake shebangfix MAKE_JOBS_UNSAFE=yes bash_OLD_CMD= /usr/bin/env bash SHEBANG_FILES= configure \ share/install-dependency +SUB_FILES= pipelight-mkufs + .include .if ${ARCH} == "i386" BUILD_DEPENDS+= ${LOCALBASE}/bin/wine:${PORTSDIR}/emulators/wine-compholio RUN_DEPENDS+= ${LOCALBASE}/bin/wine:${PORTSDIR}/emulators/wine-compholio .elif ${ARCH} == "amd64" BUILD_DEPENDS+= ${LOCALBASE}/bin/wine:${PORTSDIR}/emulators/i386-wine-compholio RUN_DEPENDS+= ${LOCALBASE}/bin/wine:${PORTSDIR}/emulators/i386-wine-compholio .endif pre-configure: ${LN} -s ${DISTDIR}/${DIST_SUBDIR}/pluginloader.tar.gz ${WRKSRC}/pluginloader-v${DISTVERSION}.tar.gz ${LN} -s ${DISTDIR}/${DIST_SUBDIR}/pluginloader.tar.gz.sig ${WRKSRC}/pluginloader-v${DISTVERSION}.tar.gz.sig + +post-install: + @${INSTALL_SCRIPT} ${WRKDIR}/pipelight-mkufs ${STAGEDIR}${PREFIX}/bin/ .include Index: head/emulators/pipelight/files/pipelight-mkufs.in =================================================================== --- head/emulators/pipelight/files/pipelight-mkufs.in (nonexistent) +++ head/emulators/pipelight/files/pipelight-mkufs.in (revision 367384) @@ -0,0 +1,94 @@ +#!/bin/sh +# Helper script for ZFS users that want to view DRM protected content +# with pipelight +# Author: Kris Moore +# License: BSD + +destroy_old() +{ + umount ${userhome}/.wine-pipelight + zfs destroy ${zpool}/$username-pipelight + cat /etc/fstab | grep -v "$zpool/$username-pipelight " > /etc/fstab.new + mv /etc/fstab.new /etc/fstab +} + +if [ -z "$1" ] ; then + echo "Create UFS formatted ZVOL: +${0} + +Remove UFS formatted ZVOL: +${0} --remove " + exit 1 +fi + +doDestroy=0 +if [ "$1" = '--remove' ] ; then + doDestroy=1 + username="$2" +else + username="$1" +fi + +# Get users HOME +userhome=`cat /etc/passwd | grep "^$username:" | cut -d ':' -f 6` +if [ -z "$userhome" ] ; then + echo "No such user: $userhome" + exit 1 +fi +if [ ! -d "$userhome" ] ; then + echo "No such home directory: $userhome" + exit 1 +fi + +zpool=`mount | grep 'on / ' | awk '{print $1}' | cut -d '/' -f 1` +if [ -z "$zpool" ] ; then + echo "Unable to detect zpool!" + exit 1 +fi + +# If the user wants to remove the zvol +if [ $doDestroy -eq 1 ] ; then + destroy_old + exit 0 +fi + +# Running this on a user which already has the file-system, lets remove it first +zfs list ${zpool}/$username-pipelight >/dev/null 2>/dev/null +if [ $? -eq 0 ] ; then + echo "Removing old UFS ZVOL" + destroy_old +fi + +# Create the ZVOL +zfs create -V 200M $zpool/$username-pipelight +if [ $? -ne 0 ] ; then + echo "Failed creating ZVOL" + exit 1 +fi + +# Format it with UFS +newfs -U /dev/zvol/$zpool/$username-pipelight +if [ $? -ne 0 ] ; then + echo "Failed formatting ZVOL" + exit 1 +fi + +# Create the directory +if [ ! -d "${userhome}/.wine-pipelight" ] ; then + mkdir ${userhome}/.wine-pipelight +fi + +# Mount the directory +mount /dev/zvol/$zpool/$username-pipelight ${userhome}/.wine-pipelight +if [ $? -ne 0 ] ; then + echo "Failed mounting ZVOL" + exit 1 +fi + +# Chown the directory +chown $username:$username ${userhome}/.wine-pipelight + +# Save to fstab +echo "/dev/zvol/$zpool/$username-pipelight ${userhome}/.wine-pipelight ufs rw 0 0" >> /etc/fstab + +echo "ZVOL created and mounted to: ${userhome}/.wine-pipelight" Property changes on: head/emulators/pipelight/files/pipelight-mkufs.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/emulators/pipelight/pkg-message =================================================================== --- head/emulators/pipelight/pkg-message (nonexistent) +++ head/emulators/pipelight/pkg-message (revision 367384) @@ -0,0 +1,18 @@ +This port installs the Pipelight plugin wrapper for running Silverlight, +Flash and others. Before enabling Pipelight for your users, run the +following as root: + +# pipelight-plugins --create-mozilla-plugins + +NOTE: + +For users running with ZFS on root, watching DRM protected content +requires extensive xattr support. If you run into issues with DRM failing, +you can use the "pipelight-mkufs" command to create a UFS formatted ZVOL +mounted on your users ~/.wine-pipelight directory. + +To create the UFS filesystem +# pipelight-mkufs + +To remove the UFS filesystem +# pipelight-mkufs --delete Property changes on: head/emulators/pipelight/pkg-message ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/emulators/pipelight/pkg-plist =================================================================== --- head/emulators/pipelight/pkg-plist (revision 367383) +++ head/emulators/pipelight/pkg-plist (revision 367384) @@ -1,49 +1,50 @@ bin/pipelight-plugin +bin/pipelight-mkufs lib/pipelight/libpipelight.so man/man1/pipelight-plugin.1.gz %%DATADIR%%/configs/pipelight-adobereader %%DATADIR%%/configs/pipelight-flash %%DATADIR%%/configs/pipelight-foxitpdf %%DATADIR%%/configs/pipelight-grandstream %%DATADIR%%/configs/pipelight-hikvision %%DATADIR%%/configs/pipelight-npactivex %%DATADIR%%/configs/pipelight-roblox %%DATADIR%%/configs/pipelight-shockwave %%DATADIR%%/configs/pipelight-silverlight4 %%DATADIR%%/configs/pipelight-silverlight5.0 %%DATADIR%%/configs/pipelight-silverlight5.1 %%DATADIR%%/configs/pipelight-unity3d %%DATADIR%%/configs/pipelight-viewright-caiway %%DATADIR%%/configs/pipelight-vizzedrgr %%DATADIR%%/configs/pipelight-widevine %%DATADIR%%/configs/pipelight-x64-flash %%DATADIR%%/configs/pipelight-x64-unity3d %%DATADIR%%/install-dependency %%DATADIR%%/licenses/license-adobereader.txt %%DATADIR%%/licenses/license-flash.txt %%DATADIR%%/licenses/license-foxitpdf.txt %%DATADIR%%/licenses/license-grandstream.txt %%DATADIR%%/licenses/license-hikvision.txt %%DATADIR%%/licenses/license-mpg2splt.txt %%DATADIR%%/licenses/license-mspatcha.txt %%DATADIR%%/licenses/license-roblox.txt %%DATADIR%%/licenses/license-shockwave.txt %%DATADIR%%/licenses/license-silverlight4.txt %%DATADIR%%/licenses/license-silverlight5.0.txt %%DATADIR%%/licenses/license-silverlight5.1.txt %%DATADIR%%/licenses/license-unity3d.txt %%DATADIR%%/licenses/license-viewright-caiway.txt %%DATADIR%%/licenses/license-widevine.txt %%DATADIR%%/licenses/license-wininet.txt %%DATADIR%%/pluginloader.exe %%DATADIR%%/scripts/configure-flash %%DATADIR%%/scripts/configure-silverlight %%DATADIR%%/sig-install-dependency.gpg %%DATADIR%%/wine %%DATADIR%%/winecheck.exe @dirrmtry lib/browser_plugins @dirrmtry lib/pipelight @dirrmtry %%DATADIR%%/configs @dirrmtry %%DATADIR%%/licenses @dirrmtry %%DATADIR%%/scripts @dirrmtry %%DATADIR%%