ports/145945: [NEW PORT] www/encode-explorer: A PHP script to browse, create folders, upload files etc

Frank Wall fw at moov.de
Thu Apr 22 13:30:02 UTC 2010


>Number:         145945
>Category:       ports
>Synopsis:       [NEW PORT] www/encode-explorer: A PHP script to browse, create folders, upload files etc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 22 13:30:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Frank Wall
>Release:        FreeBSD 7.1-RELEASE-p4 amd64
>Organization:
>Environment:
System: FreeBSD 7.1-RELEASE-p4 FreeBSD 7.1-RELEASE-p4 #0: Sun Mar 22 09:43:46 UTC 2009
>Description:
Encode Explorer is an easy-to-use php script to use as an index file.
It shows files in the server and lets you browse through folders,
upload files etc. It is kept small and neat so that the source can be
used for learning.

WWW:	http://sourceforge.net/projects/encode-explorer/

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- encode-explorer-5.0.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	encode-explorer
#	encode-explorer/files
#	encode-explorer/files/extra-patch-index-php-experimental
#	encode-explorer/pkg-descr
#	encode-explorer/distinfo
#	encode-explorer/Makefile
#	encode-explorer/pkg-plist
#
echo c - encode-explorer
mkdir -p encode-explorer > /dev/null 2>&1
echo c - encode-explorer/files
mkdir -p encode-explorer/files > /dev/null 2>&1
echo x - encode-explorer/files/extra-patch-index-php-experimental
sed 's/^X//' >encode-explorer/files/extra-patch-index-php-experimental << '388c27257a613e93d3488c6ce8e4e700'
X--- index.php.orig	2009-09-27 14:58:56.000000000 +0200
X+++ index.php	2010-04-22 14:48:20.000000000 +0200
X@@ -90,6 +90,11 @@
X $_CONFIG['max_space'] = 25600;
X 
X //
X+// Activate disk space usage? Default: 1
X+// 
X+$_CONFIG['status_enable'] = 1;
X+
X+//
X // Kui sügavalt alamkataloogidest suurust näitav script faile otsib? Vaikimisi: 3
X //
X // How deep in subfilders will the script search for files? Default: 3
X@@ -128,17 +133,46 @@
X //
X $_CONFIG['hidden_files'] = array(".ftpquota", "index.php", "index.php~", ".htaccess", ".htpasswd");
X 
X+// 
X+// Send e-mail on new file uploads. The e-mail contains the path, name
X+// and download URL for the new file. Default: off
X+// 
X+$_CONFIG['notify_enable'] = 0;
X+
X+// 
X+// From: and Reply-To: address for the mail notification.
X+// Default: webmaster at example.com
X+// 
X+$_CONFIG['notify_sender'] = 'webmaster at example.com';
X+
X+//
X+// E-Mail addresses that will be notified on file upload.
X+// Default: nobody at example.com
X+//
X+$_CONFIG['notify_addresses'] = array("nobody at example.com");
X+
X //
X // Parool failide uploadimiseks. Parooli märkimisega aktiviseerub ka uploadi võimalus.
X // NB! Failide upload ei tööta zone.ee tasuta serveris ja hot.ee serveris!
X // NB! Faile saab uploadida ainult kaustadesse, millele on eelnevalt antud vastavad õigused (chmod 777)
X //
X-// Password for uploading files. You need to set the password to activate uploading.
X-// To upload into a directory it has to have proper rights.
X+// Password for uploading files.
X //
X $_CONFIG['upload_password'] = "";
X 
X //
X+// You need to enable this to activate uploading. Default: 0
X+// To upload into a directory it has to have proper rights.
X+//
X+$_CONFIG['upload_enable'] = 1;
X+
X+//
X+// You need to enable this to activate deleting. Default: 0
X+// To delete a file or directory it has to have proper rights.
X+//
X+$_CONFIG['delete_enable'] = 1;
X+
X+//
X // Asukoht serveris. Tavaliselt ei ole vaja siia midagi panna kuna script leiab ise õige asukoha. 
X // Mõnes serveris tuleb piirangute tõttu see aadress ise teistsuguseks määrata.
X // See fail peaks asuma serveris aadressil [AADRESS]/index.php
X@@ -185,16 +219,26 @@
X 	"total_used_space" => "Benutzter Speicher",
X 	"free_space" => "Freier Speicher",
X 	"password" => "Passwort",
X-	"upload" => "Upload",
X-	"failed_upload" => "Upload ist fehlgeschlagen!",
X+	"upload" => "Hochladen",
X+	"delete" => "Löschen",
X+	"failed_upload" => "Hochladen ist fehlgeschlagen!",
X+	"failed_upload_size" => "Datei ist zu groß!",
X 	"failed_move" => "Verschieben der Datei ist fehlgeschlagen!",
X 	"wrong_password" => "Falsches Passwort",
X 	"make_directory" => "Neuer Ordner",
X+	"notify_subject" => "Neue Datei wurde hochgeladen",
X+	"notify_text" => "Die folgende Datei wurde soeben hochgeladen:",
X+	"notify_file" => "Datei:",
X+	"notify_path" => "Pfad:",
X+	"notify_server" => "Server:",
X+	"notify_url" => "URL:",
X 	"new_dir_failed" => "Erstellen des Ordners fehlgeschlagen",
X+	"del_dir_failed" => "Löschen des Ordners fehlgeschlagen",
X+	"del_file_failed" => "Löschen der Datei fehlgeschlagen",
X 	"chmod_dir_failed" => "Veränderung der Zugriffsrechte des Ordners fehlgeschlagen",
X-	"unable_to_read_dir" => "Unable to read directory",
X+	"unable_to_read_dir" => "Verzeichnis kann nicht gelesen werden",
X 	"location" => "Location",
X-	"root" => "Root"
X+	"root" => "Start"
X );
X 
X // Greek
X@@ -226,11 +270,21 @@
X 	"free_space" => "Free space",
X 	"password" => "Password",
X 	"upload" => "Upload",
X+	"delete" => "Delete",
X 	"failed_upload" => "Failed to upload the file!",
X+	"failed_upload_size" => "File size exceeds limits!",
X 	"failed_move" => "Failed to move the file into the right directory!",
X 	"wrong_password" => "Wrong password",
X 	"make_directory" => "New dir",
X+	"notify_subject" => "New file upload",
X+	"notify_text" => "The following new file was uploaded:",
X+	"notify_file" => "File:",
X+	"notify_path" => "Path:",
X+	"notify_server" => "Server:",
X+	"notify_url" => "URL:",
X 	"new_dir_failed" => "Failed to create directory",
X+	"del_dir_failed" => "Failed to delete directory",
X+	"del_file_failed" => "Failed to delete file",
X 	"chmod_dir_failed" => "Failed to change directory rights",
X 	"unable_to_read_dir" => "Unable to read directory",
X 	"location" => "Location",
X@@ -554,10 +608,17 @@
X 
X #upload div.password {
X 	float:left;
X+	margin-top: 4px;
X }
X 
X #upload div.upload {
X 	float:right;
X+	margin-top: 2px;
X+}
X+
X+#upload div.delete {
X+	float:left;
X+	margin-top: 4px;
X }
X 
X #info {
X@@ -567,6 +628,7 @@
X 	width:680px;
X 	position: relative;
X 	margin: 0 auto;
X+	margin-top: 4px;
X 	text-align:center;
X }
X 
X@@ -750,6 +812,86 @@
X 	return ($a->modTime - $b->modTime);
X }
X 
X+function is_empty_dir($dir)
X+{
X+	if (($files = @scandir($dir)) && count($files) <= 2)
X+	{
X+		return true;
X+	}
X+	return false;
X+}
X+
X+// Delete a file or recursively delete a directory
X+// @param string $str Path to file or directory
X+function recursive_delete($str)
X+{
X+	if(is_file($str))
X+	{
X+		return @unlink($str);
X+	}
X+	elseif(is_dir($str))
X+	{
X+		$scan = glob(rtrim($str,'/').'/*');
X+		foreach($scan as $index=>$path)
X+		{
X+			recursive_delete($path);
X+		}
X+		return @rmdir($str);
X+	}
X+}
X+
X+// Send e-mail with the path and download-URL for an uploaded file.
X+function send_mail($path,$file)
X+{
X+	global $_CONFIG;
X+	global $_LANG;
X+
X+	// send a separate mail for every receipient for privacy reasons
X+	foreach($_CONFIG['notify_addresses'] as $receipient)
X+	{
X+		$to = $receipient;
X+		$subject = $_LANG['notify_subject'];
X+
X+		$url = str_replace($_SERVER['DOCUMENT_ROOT'], "", $path);
X+		$protocol = explode("/", $_SERVER['SERVER_PROTOCOL']);
X+		$protocol = $protocol[0];
X+
X+		$message = $_LANG["notify_text"] . "\r\n" . 
X+			"\r\n" .
X+			$_LANG["notify_file"] . ' ' . $file . "\r\n" .
X+			$_LANG["notify_path"] . ' ' . $path . "\r\n" .
X+			$_LANG["notify_server"] . ' ' . $_SERVER['SERVER_NAME'] . "\r\n" .
X+			"\r\n" .
X+			$_LANG["notify_url"] . ' ' . $protocol . "://" . $_SERVER['SERVER_NAME'] . $url . $file . "\r\n" .
X+			"\r\n" .
X+			"\r\n" .
X+			"Encode Explorer" . "\r\n" .
X+			"\r\n";
X+
X+		$headers = 'From: ' . $_CONFIG['notify_sender'] . "\r\n" .
X+			'Reply-To: ' . $_CONFIG['notify_sender'] . "\r\n" .
X+			'Content-type: text/plain; charset=' . $_CONFIG['charset'] . "\r\n" .
X+			'MIME-Version: 1.0' . "\r\n" .
X+			'X-Mailer: Encode Explorer';
X+
X+		mail($to, $subject, $message, $headers);
X+	}
X+
X+}
X+
X+function check_post_size()
X+{
X+	$POST_MAX_SIZE = ini_get('post_max_size');
X+	$mul = substr($POST_MAX_SIZE, -1);
X+	$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
X+
X+	if ($_SERVER['CONTENT_LENGTH'] > $mul*(int)$POST_MAX_SIZE && $POST_MAX_SIZE)
X+	{
X+		return false;
X+	}
X+	return true;
X+}
X+
X //
X // The class that displays images (icons)
X //
X@@ -779,14 +921,22 @@
X //
X class FileManager
X {
X-	function checkPassword($inputPassword)
X+	function checkPassword($inputPassword,$alwaysFail = '0')
X 	{
X 		global $_CONFIG;
X 		global $_ERROR;
X 		global $_LANG;
X 
X+		// check if the result of the evaluation should always be FALSE
X+		if($alwaysFail == 1)
X+		{
X+			$_ERROR = $_LANG["wrong_password"];
X+			return false;
X+		}
X+
X 		if(strlen($_CONFIG['upload_password']) > 0 && $inputPassword == $_CONFIG['upload_password'])
X 		{
X+			$_ERROR = $_LANG["success"];
X 			return true;
X 		}
X 		else
X@@ -813,12 +963,55 @@
X 		}
X 	}
X 
X+	function deleteOnServer($location, $deletelist)
X+	{
X+		global $_ERROR;
X+		global $_LANG;
X+
X+		if(count($deletelist) > 0)
X+		{
X+			foreach ($deletelist as $deleteitem)
X+			{
X+				$deleteitem = urldecode($deleteitem);
X+
X+				// check if it is a file
X+				if (is_file($deleteitem))
X+				{
X+					if(!unlink($deleteitem))
X+						$_ERROR = $_LANG["del_file_failed"];
X+				}
X+				// it is a directory
X+				else
X+				{
X+					// check if directory is empty
X+					if(!is_empty_dir($deleteitem))
X+					{
X+						// recursively delete directory
X+						if(!recursive_delete($deleteitem))
X+							$_ERROR = $_LANG["del_dir_failed"];
X+					}
X+					else {
X+						if(!rmdir($deleteitem))
X+							$_ERROR = $_LANG["del_dir_failed"];
X+					}
X+				}
X+			}
X+		}
X+	}
X+
X 	function uploadFile($location, $userfile)
X 	{
X 		global $_CONFIG;
X 		global $_ERROR;
X 		global $_LANG;
X 
X+		if(!check_post_size())
X+		{
X+			$_ERROR = $_LANG["failed_upload_size"];
X+		}
X+		else
X+		{
X+
X 		$name = basename($userfile['name']);
X 		if(get_magic_quotes_gpc())
X 			$name = stripslashes($name);
X@@ -836,6 +1029,12 @@
X 		}
X 		else
X 			chmod($upload_file, 0755);
X+			// check if mail notification is enabled
X+			if ($_CONFIG['notify_enable'] == 1)
X+			{
X+				send_mail($location->getFullPath(), $name);
X+			}
X+		}
X 	}
X 
X 	//
X@@ -843,12 +1042,52 @@
X 	// 
X 	function run($location)
X 	{
X-		if(isset($_POST['password']) && $this->checkPassword($_POST['password']))
X+		global $_CONFIG;
X+		global $_ERROR;
X+		global $_LANG;
X+
X+		// check if the file size exceeds PHP limits
X+		if ($_SERVER['REQUEST_METHOD'] == 'POST' && empty($_POST) && $_SERVER['CONTENT_LENGTH'] > 0)
X 		{
X-			if(isset($_POST['userdir']) && strlen($_POST['userdir']) > 0)
X-				$this->newFolder($location, $_POST['userdir']);
X-			if(isset($_FILES['userfile']['name']) && strlen($_FILES['userfile']['name']) > 0)
X-				$this->uploadFile($location, $_FILES['userfile']);
X+			$_ERROR = $_LANG["failed_upload_size"];
X+		}
X+		else
X+		{
X+
X+			// This takes care of the following:
X+			// - check if upload is enabled
X+			// - check if delete is enabled
X+			// - check if a password is needed
X+			// - validate passwords
X+			// - check for empty passwords
X+			// - show error on empty or wrong passwords
X+			if ( (strlen($_CONFIG['upload_password']) == 0) || 
X+				( 
X+					(strlen($_CONFIG['upload_password']) > 0) && 
X+					(
X+						((isset($_POST['password'])) && $this->checkPassword($_POST['password'])) || 
X+				  	  	( 
X+							(
X+							(empty($_POST['password'])) && 
X+							((count($_POST['directorylist']) > 0) || (count($_POST['filelist']) > 0) || (strlen($_POST['userdir']) > 0))
X+							) && 
X+				 			$this->checkPassword($_POST['password'],1)
X+						)
X+					)
X+				)
X+			   )
X+			{
X+				// new folder
X+				if($_CONFIG['upload_enable'] == 1 && isset($_POST['userdir']) && strlen($_POST['userdir']) > 0)
X+					$this->newFolder($location, $_POST['userdir']);
X+				// delete
X+				if($_CONFIG['delete_enable'] == 1 && (isset($_POST['directorylist']) && count($_POST['directorylist']) > 0) || (isset($_POST['filelist']) && count($_POST['filelist']) > 0))
X+					$this->deleteOnServer($location, $_POST['directorylist']);
X+					$this->deleteOnServer($location, $_POST['filelist']);
X+				// upload
X+				if($_CONFIG['upload_enable'] == 1 && isset($_FILES['userfile']['name']) && strlen($_FILES['userfile']['name']) > 0)
X+					$this->uploadFile($location, $_FILES['userfile']);
X+			}
X 		}
X 	}
X }
X@@ -1059,6 +1298,8 @@
X 	// 
X 	function init()
X 	{
X+		global $_CONFIG;
X+
X 		$this->sort_by = "";
X 		$this->sort_as = "";
X 		if(isset($_GET["sort_by"]) && isset($_GET["sort_as"]))
X@@ -1076,7 +1317,10 @@
X 			$this->sort_as = "desc";
X 		}
X 
X-		$this->calculateSpace();
X+		if ($_CONFIG['status_enable'] == 1)
X+		{
X+			$this->calculateSpace();
X+		}
X 	}
X 
X 	//
X@@ -1281,6 +1525,15 @@
X }
X ?>
X 
X+<?php
X+if(strlen($_CONFIG['delete_enable']) == 1 || $_CONFIG['upload_enable'] == 1)
X+{
X+?>
X+<form enctype="multipart/form-data" action="" method="post">
X+<?php
X+}
X+?>
X+
X <!-- START: List table -->
X <table class="table" border="0" cellpadding="3" cellspacing="0">
X <tr class="breadcrumbs">
X@@ -1289,7 +1542,7 @@
X 	for($i = 0; $i < count($this->location->path); $i++)
X 	{
X ?>
X-		/ <a href="?dir=<?php print $this->location->getDir(false, true, count($this->location->path) - $i - 1); ?>">
X+		<a href="?dir=<?php print $this->location->getDir(false, true, count($this->location->path) - $i - 1); ?>">
X 			<?php print $this->location->path[$i]; ?>
X 		</a>
X <?php
X@@ -1299,11 +1552,13 @@
X </tr>
X <tr class="row one">
X 	<td class="icon"> </td>
X+	<td class="icon"> </td>
X 	<td class="name"><?php print $this->makeArrow("name");?></td>
X 	<td class="size"><?php print $this->makeArrow("size"); ?></td>
X 	<td class="changed"><?php print $this->makeArrow("mod"); ?></td>
X </tr>
X <tr class="row two">
X+	<td class="icon"> </td>
X 	<td class="icon"><img alt="dir" src="?img=directory" /></td>
X 	<td colspan="3" class="long"><a href="?dir=<?php print $this->location->getDir(false, true, 1); ?>">..</a></td>
X </tr>
X@@ -1323,6 +1578,7 @@
X 		$row_style = ($row ? "one" : "two");
X ?>
X <tr class="row <?php print $row_style; ?>">
X+	<td class="icon"><input type="checkbox" name="directorylist[]" value="<?php print $this->location->getFullPath().$dir->getNameEncoded(); ?>"></td>
X 	<td class="icon"><img alt="dir" src="?img=directory" /></td>
X 	<td colspan="3" class="long"><?php print "<a href=\"?dir=".$this->location->getDir(false, true, 0).$dir->getNameEncoded()."\">".$dir->getName()."</a>"; ?></td>
X </tr>
X@@ -1341,6 +1597,7 @@
X 		$row_style = ($row ? "one" : "two");
X ?>
X <tr class="row <?php echo $row_style; ?>">
X+	<td class="icon"><input type="checkbox" name="filelist[]" value="<?php print $this->location->getFullPath().$file->getNameEncoded(); ?>"></td>
X 	<td class="icon"><img alt="<?php print $file->getExtension(); ?>" src="<?php print $this->makeIcon($file->getExtension()); ?>" /></td>
X 	<td class="name">
X <?php
X@@ -1369,38 +1626,83 @@
X 
X </div>
X 
X+<!-- START: Action area -->
X+<div id="upload">
X+		<table cellspacing="0" cellpadding="0" border="0" width="100%">
X+			<tr>
X+				<td>
X+<!-- START: Delete area -->
X <?php
X-if(strlen($_CONFIG['upload_password']) > 0)
X+if($_CONFIG['delete_enable'] == 1)
X {
X ?>
X+					<div class="delete">
X+						<input type="submit" value="<?php print $_LANG["delete"]; ?>" />
X+					</div>
X+<?php
X+}
X+?>
X+<!-- END: Delete area -->
X <!-- START: Upload area -->
X-<div id="upload">
X-	<form enctype="multipart/form-data" action="" method="post">
X-		<table cellspacing="0" cellpadding="0" border="0" width="100%">
X+<?php
X+if($_CONFIG['upload_enable'] == 1)
X+{
X+?>
X+					<div class="upload">
X+						<input name="userdir" type="text" class="text" />
X+						<input type="submit" value="<?php print $_LANG["make_directory"]; ?>" />
X+					</div>
X+<?php
X+}
X+?>
X+<!-- END: Upload area -->
X+				</td>
X+			</tr>
X 			<tr>
X 				<td>
X+<!-- START: Password area -->
X+<?php
X+if(strlen($_CONFIG['upload_password']) > 0 && ($_CONFIG['upload_enable'] == 1 || $_CONFIG['delete_enable'] == 1))
X+{
X+?>
X 					<div class="password">
X 						<?php print $_LANG["password"]; ?>: <input type="password" name="password" class="text" />
X 					</div>
X+<?php
X+}
X+?>
X+<!-- END: Password area -->
X+<!-- START: Upload area -->
X+<?php
X+if($_CONFIG['upload_enable'] == 1)
X+{
X+?>
X 					<div class="upload">
X-						<input name="userdir" type="text" class="text" />
X-						<input type="submit" value="<?php print $_LANG["make_directory"]; ?>" />
X 						<input name="userfile" type="file" />
X 						<input type="submit" value="<?php print $_LANG["upload"]; ?>" />
X 					</div>
X+<?php
X+}
X+?>
X+<!-- END: Upload area -->
X 				</td>
X 			</tr>
X 		</table>
X-	</form>
X </div>
X-<!-- END: Upload area -->
X-<?php
X-}
X-?>
X+</form>
X+<!-- END: Action area -->
X 
X <!-- START: Info area -->
X <div id="info">
X-<?php print $_LANG["total_used_space"]; ?>: <?php print $this->spaceUsed; ?> MB | <?php print $_LANG["free_space"]; ?>: <?php print $this->spaceLeft; ?> MB | <a href="http://encode-explorer.siineiolekala.net">encode explorer</a>
X+<?php
X+if($_CONFIG['status_enable'] == 1)
X+{
X+?>
X+<?php print $_LANG["total_used_space"]; ?>: <?php print $this->spaceUsed; ?> MB | <?php print $_LANG["free_space"]; ?>: <?php print $this->spaceLeft; ?> MB | 
X+<?php
X+}
X+?>
X+<a href="http://encode-explorer.siineiolekala.net">encode explorer</a>
X </div>
X <!-- END: Info area -->
X <!-- Encode Explorer v5.0 -->
X@@ -1427,4 +1729,4 @@
X 	$encodeExplorer = new Encode_Explorer();
X 	$encodeExplorer->run($location);
X }
X-?>
X\ No newline at end of file
X+?>
388c27257a613e93d3488c6ce8e4e700
echo x - encode-explorer/pkg-descr
sed 's/^X//' >encode-explorer/pkg-descr << '09b08bf1985e463e7f6d891e2e0a1483'
XEncode Explorer is an easy-to-use php script to use as an index file.
XIt shows files in the server and lets you browse through folders,
Xupload files etc. It is kept small and neat so that the source can be
Xused for learning.
X
XWWW:	http://sourceforge.net/projects/encode-explorer/
09b08bf1985e463e7f6d891e2e0a1483
echo x - encode-explorer/distinfo
sed 's/^X//' >encode-explorer/distinfo << '37cf2119ab317e3e297a78f0aa6033e3'
XMD5 (encode-explorer_5.0.tar) = 60e8da0a1eee77c28e4b80382e0396dc
XSHA256 (encode-explorer_5.0.tar) = 4da27fe79077c3a3a89093c5038a1a75b6d5b8ec7f6f78ebc5b8bafdeb76caa7
XSIZE (encode-explorer_5.0.tar) = 51200
37cf2119ab317e3e297a78f0aa6033e3
echo x - encode-explorer/Makefile
sed 's/^X//' >encode-explorer/Makefile << '6f9e52f9df75d9110acf458d59036a82'
X# New ports collection makefile for:	encode-explorer
X# Date created:			Thu Apr 22 11:24:23 CEST 2010
X# Whom:				Frank Wall <fw at moov.de>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	encode
XPORTVERSION=	5.0
XCATEGORIES=	www
XMASTER_SITES=	SF/${PORTNAME}${PKGNAMESUFFIX}/${PORTNAME}${PKGNAMESUFFIX}/${PORTNAME}${PKGNAMESUFFIX}_${PORTVERSION}
XPKGNAMESUFFIX=	-explorer
XDISTNAME=	${PORTNAME}${PKGNAMESUFFIX}_${PORTVERSION}
XEXTRACT_SUFX=	.tar
X
XMAINTAINER=	fw at moov.de
XCOMMENT=	A PHP script to browse, create folders, upload files etc
X
XUSE_PHP=	yes
XWANT_PHP_WEB=	yes
X
XUSE_TAR=	yes
XNO_BUILD=	yes
X
XOPTIONS=	EXPERIMENTAL "Enable experimental features" off
X
XWRKSRC=		${WRKDIR}/${DISTNAME}
XWWWDIR=		${PREFIX}/www/${PORTNAME}${PKGNAMESUFFIX}
XDOCSDIR=	${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITH_EXPERIMENTAL)
XEXTRA_PATCHES+=	${PATCHDIR}/extra-patch-index-php-experimental
X.endif
X
Xdo-install:
X	${MKDIR} ${WWWDIR}
X	${INSTALL} ${WRKSRC}/index.php ${WWWDIR}
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X	${CP} ${WRKSRC}/README.txt ${DOCSDIR}
X.endif
X
X.include <bsd.port.post.mk>
6f9e52f9df75d9110acf458d59036a82
echo x - encode-explorer/pkg-plist
sed 's/^X//' >encode-explorer/pkg-plist << '5d5a7c9d43292cdd67ead13817ee5286'
X%%WWWDIR%%/index.php
X%%PORTDOCS%%%%DOCSDIR%%/README.txt
X at dirrm %%WWWDIR%%
5d5a7c9d43292cdd67ead13817ee5286
exit
--- encode-explorer-5.0.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list