pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/mserv-php Added www/mserv-php version 0.90



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2a2f99ebd985
branches:  trunk
changeset: 568590:2a2f99ebd985
user:      abs <abs%pkgsrc.org@localhost>
date:      Tue Dec 15 16:17:44 2009 +0000

description:
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:

 www/mserv-php/DESCR            |   3 +
 www/mserv-php/Makefile         |  46 ++++++++++++++++++++++++++++
 www/mserv-php/PLIST            |  18 ++++++++++
 www/mserv-php/distinfo         |  11 ++++++
 www/mserv-php/patches/patch-aa |  39 +++++++++++++++++++++++
 www/mserv-php/patches/patch-ab |  40 ++++++++++++++++++++++++
 www/mserv-php/patches/patch-ac |  22 +++++++++++++
 www/mserv-php/patches/patch-ad |  13 +++++++
 www/mserv-php/patches/patch-ae |  69 ++++++++++++++++++++++++++++++++++++++++++
 www/mserv-php/patches/patch-af |  47 ++++++++++++++++++++++++++++
 10 files changed, 308 insertions(+), 0 deletions(-)

diffs (truncated from 348 to 300 lines):

diff -r 96f50b7728ce -r 2a2f99ebd985 www/mserv-php/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/mserv-php/DESCR       Tue Dec 15 16:17:44 2009 +0000
@@ -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 -r 96f50b7728ce -r 2a2f99ebd985 www/mserv-php/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/mserv-php/Makefile    Tue Dec 15 16:17:44 2009 +0000
@@ -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@localhost
+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 -r 96f50b7728ce -r 2a2f99ebd985 www/mserv-php/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/mserv-php/PLIST       Tue Dec 15 16:17:44 2009 +0000
@@ -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 -r 96f50b7728ce -r 2a2f99ebd985 www/mserv-php/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/mserv-php/distinfo    Tue Dec 15 16:17:44 2009 +0000
@@ -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 -r 96f50b7728ce -r 2a2f99ebd985 www/mserv-php/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/mserv-php/patches/patch-aa    Tue Dec 15 16:17:44 2009 +0000
@@ -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 -r 96f50b7728ce -r 2a2f99ebd985 www/mserv-php/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/mserv-php/patches/patch-ab    Tue Dec 15 16:17:44 2009 +0000
@@ -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 -r 96f50b7728ce -r 2a2f99ebd985 www/mserv-php/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/mserv-php/patches/patch-ac    Tue Dec 15 16:17:44 2009 +0000
@@ -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 -r 96f50b7728ce -r 2a2f99ebd985 www/mserv-php/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/mserv-php/patches/patch-ad    Tue Dec 15 16:17:44 2009 +0000
@@ -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 -r 96f50b7728ce -r 2a2f99ebd985 www/mserv-php/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/mserv-php/patches/patch-ae    Tue Dec 15 16:17:44 2009 +0000
@@ -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 -r 96f50b7728ce -r 2a2f99ebd985 www/mserv-php/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/mserv-php/patches/patch-af    Tue Dec 15 16:17:44 2009 +0000



Home | Main Index | Thread Index | Old Index