summaryrefslogtreecommitdiff
path: root/www/mserv-php
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2009-12-15 16:17:44 +0000
committerabs <abs@pkgsrc.org>2009-12-15 16:17:44 +0000
commitb0ab9d31441f2148359d3fcd0de6e61069ba7350 (patch)
treeb90db7dc9734a98cfc8c4bb21dccaf99f67b6d16 /www/mserv-php
parent9af1eedcb170de674e33bd53b1420e4055c4c51f (diff)
downloadpkgsrc-b0ab9d31441f2148359d3fcd0de6e61069ba7350.tar.gz
Added www/mserv-php version 0.90
mserv-php is a web interface to the mserv jukebox system. It was a real quick hack, so there may be some inconsistencies.
Diffstat (limited to 'www/mserv-php')
-rw-r--r--www/mserv-php/DESCR3
-rw-r--r--www/mserv-php/Makefile46
-rw-r--r--www/mserv-php/PLIST18
-rw-r--r--www/mserv-php/distinfo11
-rw-r--r--www/mserv-php/patches/patch-aa39
-rw-r--r--www/mserv-php/patches/patch-ab40
-rw-r--r--www/mserv-php/patches/patch-ac22
-rw-r--r--www/mserv-php/patches/patch-ad13
-rw-r--r--www/mserv-php/patches/patch-ae69
-rw-r--r--www/mserv-php/patches/patch-af47
10 files changed, 308 insertions, 0 deletions
diff --git a/www/mserv-php/DESCR b/www/mserv-php/DESCR
new file mode 100644
index 00000000000..5206ce448b2
--- /dev/null
+++ b/www/mserv-php/DESCR
@@ -0,0 +1,3 @@
+mserv-php is a web interface to the mserv jukebox system.
+
+It was a real quick hack, so there may be some inconsistencies.
diff --git a/www/mserv-php/Makefile b/www/mserv-php/Makefile
new file mode 100644
index 00000000000..fa27b188c61
--- /dev/null
+++ b/www/mserv-php/Makefile
@@ -0,0 +1,46 @@
+# $NetBSD: Makefile,v 1.1.1.1 2009/12/15 16:17:44 abs Exp $
+#
+
+DISTNAME= mserv-php-090
+PKGNAME= mserv-php-0.90
+CATEGORIES= audio www
+MASTER_SITES= http://dougiamas.com/mserv/src/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= abs@absd.org
+HOMEPAGE= http://dougiamas.com/mserv/
+COMMENT= Quick web interface to mserv audio jukebox
+
+DEPENDS+= mserv-[0-9]*:../../audio/mserv
+DEPENDS+= php>=4.0.6:../../lang/php5
+
+WRKSRC= ${WRKDIR}/mserv-php
+
+LICENSE= gnu-gpl-v2
+
+MSERVPHPDIR= ${PREFIX}/share/mserv-php
+DOCDIR= ${PREFIX}/share/doc/mserv-php
+
+SUBST_CLASSES+= paths
+SUBST_FILES.paths= ${WRKDIR}/config.php
+SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g'
+SUBST_STAGE.paths= post-build
+
+PKG_DESTDIR_SUPPORT = user-destdir
+INSTALLATION_DIRS += share/mserv-php share/mserv-php/image share/doc/mserv-php
+
+do-build:
+ ${CP} ${WRKSRC}/config.php ${WRKDIR}/config.php
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/*.php ${DESTDIR}${MSERVPHPDIR}
+ ${INSTALL_DATA} ${WRKDIR}/config.php ${DESTDIR}${MSERVPHPDIR}
+ ${INSTALL_DATA} ${WRKSRC}/*.css ${DESTDIR}${MSERVPHPDIR}
+ ${INSTALL_DATA} ${WRKSRC}/*.html ${DESTDIR}${MSERVPHPDIR}
+ ${INSTALL_DATA} ${WRKSRC}/image/*.gif ${DESTDIR}${MSERVPHPDIR}/image
+ ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DESTDIR}${MSERVPHPDIR}
+ ${CHMOD} -R a-w ${DESTDIR}${MSERVPHPDIR}
+ ${INSTALL_DATA} ${WRKSRC}/COPYRIGHT.GPL ${DESTDIR}${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README-0.90 ${DESTDIR}${DOCDIR}
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/www/mserv-php/PLIST b/www/mserv-php/PLIST
new file mode 100644
index 00000000000..94cae9b3235
--- /dev/null
+++ b/www/mserv-php/PLIST
@@ -0,0 +1,18 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2009/12/15 16:17:44 abs Exp $
+share/doc/mserv-php/COPYRIGHT.GPL
+share/doc/mserv-php/README-0.90
+share/mserv-php/albums.php
+share/mserv-php/albumsnav.php
+share/mserv-php/config.php
+share/mserv-php/current.php
+share/mserv-php/functions.php
+share/mserv-php/image/add.gif
+share/mserv-php/image/refresh.gif
+share/mserv-php/image/sub.gif
+share/mserv-php/index.php
+share/mserv-php/login.html
+share/mserv-php/options.php
+share/mserv-php/queue.php
+share/mserv-php/setup.php
+share/mserv-php/styles.css
+share/mserv-php/tracks.php
diff --git a/www/mserv-php/distinfo b/www/mserv-php/distinfo
new file mode 100644
index 00000000000..f1c2f1a39ee
--- /dev/null
+++ b/www/mserv-php/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1.1.1 2009/12/15 16:17:44 abs Exp $
+
+SHA1 (mserv-php-090.tgz) = 12f3cc4dc70c0c923bfcf3fb65cfd0195f112cef
+RMD160 (mserv-php-090.tgz) = 9e4dbc38943f3203beaa25418694dc104ad4808a
+Size (mserv-php-090.tgz) = 15374 bytes
+SHA1 (patch-aa) = 59c5dd63c7430cfca634e59111bc24e578730584
+SHA1 (patch-ab) = 4681305b964632acd82a51ad914ab2c4590eb26f
+SHA1 (patch-ac) = 459bb8accd5f6ff7084a1d6a7d325e9618d0e10b
+SHA1 (patch-ad) = ea66cb91e57346203e85043bd034916451ee9cc3
+SHA1 (patch-ae) = 7d35ad4287639aa4d4ca92b50d002e8637b37226
+SHA1 (patch-af) = 08ada6c2682cdd3db18e9c3040846a361e9e1d7f
diff --git a/www/mserv-php/patches/patch-aa b/www/mserv-php/patches/patch-aa
new file mode 100644
index 00000000000..1a65106647e
--- /dev/null
+++ b/www/mserv-php/patches/patch-aa
@@ -0,0 +1,39 @@
+$NetBSD: patch-aa,v 1.1.1.1 2009/12/15 16:17:44 abs Exp $
+
+--- albums.php.orig 2002-04-04 14:24:36.000000000 +0000
++++ albums.php
+@@ -7,20 +7,28 @@
+ $result = albums();
+
+ $prevchar = "";
++ $albums;
+ for ($i=1; $i<$result["ALBUMCOUNT"]; $i++) {
+- $title = $result["$i"];
++ $albums[$i] = ucfirst($result[$i]);
++ }
++ asort($albums, SORT_STRING);
++ reset($albums);
++ while (list($alnum, $title) = each($albums)) {
+ $thischar = substr($title, 0, 1);
+ if ($thischar != $prevchar) {
+ if ($prevchar) {
+ echo "</TABLE>";
+ }
+- echo "<A NAME=\"$thischar\"></A>";
+- echo "<TABLE WIDTH=100%>";
+- $prevchar = $thischar;
++ else
++ $prevchar = chr(ord($thischar)-1);
++ for($linkchar = ord($prevchar) + 1; $linkchar <= ord($thischar) ; ++$linkchar)
++ echo "<A NAME=\"".chr($linkchar)."\"></A>";
++ echo "<TABLE WIDTH=100%>";
++ $prevchar = $thischar;
+ }
+ echo "<TR><TD>";
+- echo "<B><A TARGET=\"mp3tracks\" HREF=\"tracks.php?album=$i\">$title</A></B></TD>";
+- echo "<TD ALIGN=right><A TITLE=\"Queue this album\" TARGET=\"mp3queue\" HREF=\"queue.php?album=$i\"><IMG SRC=\"image/add.gif\" BORDER=0 HEIGHT=15 WIDTH=15></A></TD></TR>\n";
++ echo "<B><A TARGET=\"mp3tracks\" HREF=\"tracks.php?album=$alnum\">$title</A></B></TD>";
++ echo "<TD ALIGN=right><A TITLE=\"Queue this album\" TARGET=\"mp3queue\" HREF=\"queue.php?album=$alnum\"><IMG SRC=\"image/add.gif\" BORDER=0 HEIGHT=15 WIDTH=15></A></TD></TR>\n";
+ }
+ echo "</TABLE>";
+
diff --git a/www/mserv-php/patches/patch-ab b/www/mserv-php/patches/patch-ab
new file mode 100644
index 00000000000..88f815c0064
--- /dev/null
+++ b/www/mserv-php/patches/patch-ab
@@ -0,0 +1,40 @@
+$NetBSD: patch-ab,v 1.1.1.1 2009/12/15 16:17:44 abs Exp $
+
+--- config.php.orig 2002-05-27 08:32:52.000000000 +0000
++++ config.php
+@@ -1,10 +1,10 @@
+ <?PHP // config.php
+
+ // Your descriptive name for this server
+- $sitename = "Home Music Server";
++ $sitename = "Mserv";
+
+ // Full path to "mservcmd" binary on your system
+- $mservcmd = "/opt/bin/mservcmd";
++ $mservcmd = "@PREFIX@/bin/mservcmd";
+
+ // Interface colors
+ $bgcolor = "#990000";
+@@ -14,14 +14,14 @@
+
+ // Filter Menu
+ $filters = array (
+- "Martin's Unheard" => "!(martin=heard)",
+- "Martin's Best" => "!(martin=awful|martin=bad|martin=neutral)",
+- "Sarah's Best" => "sarah=good|sarah=superb",
+- "Martin + Sarah" => "(sarah=superb|sarah=good)&(martin=superb|martin=good)",
+- "Electronic" => "electronic=good|electronic=superb",
+- "Smooth" => "smooth=good|smooth=superb",
+- "Groovy" => "groovy=good|groovy=superb",
+- "Quiet" => "quiet=good|quiet=superb"
++ # "Martin's Unheard" => "!(martin=heard)",
++ # "Martin's Best" => "!(martin=awful|martin=bad|martin=neutral)",
++ # "Sarah's Best" => "sarah=good|sarah=superb",
++ # "Martin + Sarah" => "(sarah=superb|sarah=good)&(martin=superb|martin=good)",
++ # "Electronic" => "electronic=good|electronic=superb",
++ # "Smooth" => "smooth=good|smooth=superb",
++ # "Groovy" => "groovy=good|groovy=superb",
++ # "Quiet" => "quiet=good|quiet=superb"
+ );
+
+
diff --git a/www/mserv-php/patches/patch-ac b/www/mserv-php/patches/patch-ac
new file mode 100644
index 00000000000..87c7fcbef28
--- /dev/null
+++ b/www/mserv-php/patches/patch-ac
@@ -0,0 +1,22 @@
+$NetBSD: patch-ac,v 1.1.1.1 2009/12/15 16:17:44 abs Exp $
+
+--- functions.php.orig 2002-06-17 01:53:30.000000000 +0000
++++ functions.php
+@@ -29,7 +29,7 @@ function print_header($meta="") {
+ function print_rating ($current, $mode, $album, $track="") {
+ $common = "tracks.php?mode=$mode&album=$album&track=$track&rate=";
+
+- $options = array ("SUPERB", "GOOD", "NEUTRAL", "BAD", "AWFUL", "UNHEARD");
++ $options = array ("SUPERB", "GOOD", "NEUTRAL", "BAD", "AWFUL", "heard", "unheard");
+
+ $name = "a".$album."t".$track;
+
+@@ -37,7 +37,7 @@ function print_rating ($current, $mode,
+ echo "<SELECT NAME=popup TARGET=mp3tracks onChange=\"window.location=document.$name.popup.options[document.$name.popup.selectedIndex].value\">\n";
+ foreach ($options as $value) {
+ echo " <OPTION VALUE=\"$common$value\"";
+- if ($value == $current) {
++ if (strtoupper($value) == $current) {
+ echo " SELECTED";
+ }
+ echo ">$value</OPTION>\n";
diff --git a/www/mserv-php/patches/patch-ad b/www/mserv-php/patches/patch-ad
new file mode 100644
index 00000000000..6789b5c654d
--- /dev/null
+++ b/www/mserv-php/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1.1.1 2009/12/15 16:17:44 abs Exp $
+
+--- options.php.orig 2002-05-15 06:35:00.000000000 +0000
++++ options.php
+@@ -86,7 +86,7 @@ Volume: <SELECT NAME=vol onChange="windo
+ <?
+ for ($i=100; $i>=0; $i-=5) {
+ echo "<OPTION VALUE=\"options.php?volume=$i\"";
+- if ($i == $volume["VOLUME"]) {
++ if ($i >= $volume["VOLUME"] && $i< $volume["VOLUME"]+5) {
+ echo " SELECTED ";
+ }
+ echo ">$i</OPTION>\n";
diff --git a/www/mserv-php/patches/patch-ae b/www/mserv-php/patches/patch-ae
new file mode 100644
index 00000000000..fceabcddfec
--- /dev/null
+++ b/www/mserv-php/patches/patch-ae
@@ -0,0 +1,69 @@
+$NetBSD: patch-ae,v 1.1.1.1 2009/12/15 16:17:44 abs Exp $
+
+--- setup.php.orig 2002-04-07 08:04:39.000000000 +0000
++++ setup.php
+@@ -3,22 +3,55 @@
+ require_once("functions.php");
+
+ session_start();
+-session_register("USERNAME");
+-session_register("PASSWORD");
+-if (! isset($USERNAME)) $USERNAME = "";
+-if (! isset($PASSWORD)) $PASSWORD = "";
+-
+-
+-if ( isset($username) and isset($password) ) {
+- $USERNAME = $username;
+- $PASSWORD = $password;
++if ( isset($_SESSION["USERNAME"]))
++ $USERNAME = $_SESSION["USERNAME"];
++else
++ $USERNAME = "";
++
++if ( isset($_SESSION["PASSWORD"]))
++ $PASSWORD = $_SESSION["PASSWORD"];
++else
++ $PASSWORD = "";
++
++if ( isset($_REQUEST["username"]) and isset($_REQUEST["password"]) ) {
++ $USERNAME = $_REQUEST["username"];
++ $PASSWORD = $_REQUEST["password"];
+ }
+
++$_SESSION["USERNAME"] = $USERNAME;
++$_SESSION["PASSWORD"] = $PASSWORD;
++
+ if (! ($USERNAME and $PASSWORD)) {
+ require("login.html");
+ exit;
+ }
+
++if ( isset($_REQUEST["command"]))
++ $command = $_REQUEST["command"];
++else
++ $command = "";
++
++if ( isset($_REQUEST["track"]))
++ $track = $_REQUEST["track"];
++
++if ( isset($_REQUEST["volume"]))
++ $volume = $_REQUEST["volume"];
++
++if ( isset($_REQUEST["rate"]))
++ $rate = $_REQUEST["rate"];
++else
++ $rate = "";
++
++if ( isset($_REQUEST["mode"]))
++ $mode = $_REQUEST["mode"];
++
++if ( isset($_REQUEST["album"]))
++ $album = $_REQUEST["album"];
++else if ( isset($_SESSION["album"]))
++ $album = $_SESSION["album"];
++else
++ $album = "";
++
+ // Setup the mserv command for the current user.
+ $MSERVCMD = $mservcmd." -u ".escapeshellarg($USERNAME)." -p ".escapeshellarg($PASSWORD)." ";
+
diff --git a/www/mserv-php/patches/patch-af b/www/mserv-php/patches/patch-af
new file mode 100644
index 00000000000..ddb0cb94c07
--- /dev/null
+++ b/www/mserv-php/patches/patch-af
@@ -0,0 +1,47 @@
+$NetBSD: patch-af,v 1.1.1.1 2009/12/15 16:17:44 abs Exp $
+
+--- albumsnav.php.orig 2002-04-08 06:01:35.000000000 +0000
++++ albumsnav.php
+@@ -11,33 +11,16 @@
+ print_header();
+ print_heading("Albums - ($numtracks tracks in $numalbums albums)");
+
++ for ($i=1; $i<$albums["ALBUMCOUNT"]; $i++) {
++ $thischar = ucfirst(substr($albums["$i"], 0, 1));
++ $index[$thischar] = 1;
++ }
++ ksort($index, SORT_STRING);
++ reset($index);
+ echo "<TABLE WIDTH=100%><TR>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#A\">A</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#B\">B</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#C\">C</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#D\">D</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#E\">E</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#F\">F</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#G\">G</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#H\">H</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#I\">I</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#J\">J</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#K\">K</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#L\">L</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#M\">M</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#N\">N</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#O\">O</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#P\">P</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#Q\">Q</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#R\">R</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#S\">S</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#T\">T</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#U\">U</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#V\">V</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#W\">W</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#X\">X</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#Y\">Y</A>";
+- echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#Z\">Z</A>";
++ while (list($char, $xj) = each($index)) {
++ echo "<TD><A TARGET=\"mp3albums\" HREF=\"albums.php#$char\">$char</A>";
++ }
+ echo "</TABLE>";
+
+ ?>