aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended/webmin
diff options
context:
space:
mode:
authorDexuan Cui <dexuan.cui@intel.com>2011-10-26 15:17:09 +0800
committerPaul Eggleton <paul.eggleton@linux.intel.com>2011-11-09 14:09:23 +0000
commit031ea292d62a8d316d3f2ef588590c20a9ff8d85 (patch)
tree39d46c8df53399eabaa6bc90f421010d4b68534b /recipes-extended/webmin
parent538515fcde324dbc836890dbb22d6e4b57dbf997 (diff)
downloadmeta-baryon-031ea292d62a8d316d3f2ef588590c20a9ff8d85.tar.gz
meta-baryon-031ea292d62a8d316d3f2ef588590c20a9ff8d85.tar.bz2
meta-baryon-031ea292d62a8d316d3f2ef588590c20a9ff8d85.zip
webmin: Add a simple module for Media Tomb
Signed-off-by: Jiajun Xu <jiajun.xu@intel.com>
Diffstat (limited to 'recipes-extended/webmin')
-rw-r--r--recipes-extended/webmin/files/media-tomb.patch65
-rw-r--r--recipes-extended/webmin/webmin_1.570.bb3
2 files changed, 67 insertions, 1 deletions
diff --git a/recipes-extended/webmin/files/media-tomb.patch b/recipes-extended/webmin/files/media-tomb.patch
new file mode 100644
index 0000000..d98fefb
--- /dev/null
+++ b/recipes-extended/webmin/files/media-tomb.patch
@@ -0,0 +1,65 @@
+diff -Nru webmin-1.570.bak/mediatomb/index.cgi webmin-1.570/mediatomb/index.cgi
+--- webmin-1.570.bak/mediatomb/index.cgi 1969-12-31 16:00:00.000000000 -0800
++++ webmin-1.570/mediatomb/index.cgi 2011-10-26 10:00:05.992522036 -0700
+@@ -0,0 +1,13 @@
++#!/usr/bin/perl
++# index.cgi
++# Display Media Tomb option categories
++
++require './mediatomb-lib.pl';
++
++ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
++
++
++$ipaddress = &get_my_address();
++print &text('index_desc', $ipaddress),"<p>\n";
++
++ui_print_footer("/", $text{'index'});
+diff -Nru webmin-1.570.bak/mediatomb/lang/en webmin-1.570/mediatomb/lang/en
+--- webmin-1.570.bak/mediatomb/lang/en 1969-12-31 16:00:00.000000000 -0800
++++ webmin-1.570/mediatomb/lang/en 2011-10-26 10:01:13.340522186 -0700
+@@ -0,0 +1,2 @@
++index_title=Media Tomb
++index_desc=Media Tomb is an open source (GPL) UPnP MediaServer with a nice web user interface. You could access it via <a href='http://$1:49153'>here</a>.
+diff -Nru webmin-1.570.bak/mediatomb/mediatomb-lib.pl webmin-1.570/mediatomb/mediatomb-lib.pl
+--- webmin-1.570.bak/mediatomb/mediatomb-lib.pl 1969-12-31 16:00:00.000000000 -0800
++++ webmin-1.570/mediatomb/mediatomb-lib.pl 2011-10-26 10:01:34.692522079 -0700
+@@ -0,0 +1,31 @@
++#!/usr/bin/perl
++# mediatomb-lib.pl
++# Common functions for the Media Tomb
++
++BEGIN { push(@INC, ".."); };
++use WebminCore;
++&init_config();
++
++sub get_my_address
++{
++my $myip;
++if (&foreign_check("net")) {
++ # Try to get ethernet interface
++ &foreign_require("net", "net-lib.pl");
++ my @act = &net::active_interfaces();
++ my @ifaces = grep { &net::iface_type($_->{'fullname'}) =~ /ether/i }
++ @act;
++ @ifaces = ( $act[0] ) if (!@ifaces && @act);
++ if (@ifaces) {
++ return wantarray ? ( map { $_->{'address'} } @ifaces )
++ : $ifaces[0]->{'address'};
++ }
++ }
++$myip = &to_ipaddress(&get_system_hostname());
++if ($myip) {
++ # Can resolve hostname .. use that
++ return wantarray ? ( $myip ) : $myip;
++ }
++return wantarray ? ( ) : undef;
++}
++
+diff -Nru webmin-1.570.bak/mediatomb/module.info webmin-1.570/mediatomb/module.info
+--- webmin-1.570.bak/mediatomb/module.info 1969-12-31 16:00:00.000000000 -0800
++++ webmin-1.570/mediatomb/module.info 2011-10-26 09:59:50.428528369 -0700
+@@ -0,0 +1,3 @@
++desc=Media Tomb
++category=others
++longdesc=Media Tomb for Yocto
diff --git a/recipes-extended/webmin/webmin_1.570.bb b/recipes-extended/webmin/webmin_1.570.bb
index d34b3a8..ff235e5 100644
--- a/recipes-extended/webmin/webmin_1.570.bb
+++ b/recipes-extended/webmin/webmin_1.570.bb
@@ -21,7 +21,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \
file://nfs-export.patch \
file://mount-excludefs.patch \
file://samba-config-fix.patch \
- file://proftpd-config-fix.patch"
+ file://proftpd-config-fix.patch \
+ file://media-tomb.patch"
inherit allarch perlnative update-rc.d