Index: head/emulators/pipelight/Makefile =================================================================== --- head/emulators/pipelight/Makefile (revision 374754) +++ head/emulators/pipelight/Makefile (revision 374755) @@ -1,66 +1,66 @@ # Created by: Kris Moore # $FreeBSD$ PORTNAME= pipelight DISTVERSION= 0.2.7.3 -PORTREVISION= 5 +PORTREVISION= 6 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 (revision 374754) +++ head/emulators/pipelight/files/pipelight-mkufs.in (revision 374755) @@ -1,94 +1,97 @@ #!/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 400M $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 +# Get user group +usergroup=`groups $username | cut -d " " -f 1` + # Chown the directory -chown $username:$username ${userhome}/.wine-pipelight +chown $username:$usergroup ${userhome}/.wine-pipelight # Save to fstab echo "/dev/zvol/$zpool/$username-pipelight ${userhome}/.wine-pipelight ufs rw,late 0 0" >> /etc/fstab echo "ZVOL created and mounted to: ${userhome}/.wine-pipelight"