Difference between revisions of "Wizd on Gentoo"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m
 
(34 intermediate revisions by 5 users not shown)
Line 4: Line 4:
  
 
== Preparing for Build ==
 
== Preparing for Build ==
First download the version of wizd you would like to install. In this example, we are going to use version 0_12h_pvb_19 from http://www.geocities.com/flipflop7146/wizd.html. Unzip this file. If you don't have unzip, you will need to ''emerge app-arch/unzip''.
+
First download the version of wizd you would like to install. Wizd has recently been moved to Sourceforge, so we have to download the source through CVS, as well as download the supporting files. In this example, we are going to use version 0_12h_pvb_21.
  # unzip wizd_0_12h_pvb_19.zip
+
===Source files===
Since this was originally built for Cygwin under Windows, let's reorganize the directory structure and delete unnecessary files.
+
You will need a CVS client for this part. You can get this through portage:
# rm -f wizd_0_12h_pvb_19/wizd.exe wizd_0_12h_pvb_19/cygwin1.dll
+
# emerge dev-util/cvs
# mkdir /usr/local/src/wizd_0_12h_pvb_19
+
You can also use ''dev-util/colorcvs'' but it is currently masked for ppcYou can add this to your packages.keywords if you want to use it, and know how. Next we change directories to /usr/local/src and retrieve the Wizd build from http://wizd.sourceforge.net/
  # mv wizd_0_12h_pvb_19/source/* /usr/local/src/wizd_0_12h_pvb_19
+
  # cd /usr/local/src
  # rmdir wizd_0_12h_pvb_19/source
+
  kurobox src # cvs -d:pserver:anonymous@wizd.cvs.sourceforge.net:/cvsroot/wizd co -P wizd
# mkdir /usr/local/bin/wizd
+
The latest version of Wizd's source files should now be in /usr/local/src/wizd. Wizd requires the jpeg library, and the libdvdread library in order to compile properly. We can download and install these through portage.
# mv wizd_0_12h_pvb_19/* /usr/local/bin/wizd
+
  kurobox src # emerge media-libs/jpeg media-libs/libdvdread
Wizd requires the jpeg library, and the libdvdread library in order to compile properly. We can download and install these through portage.
+
  # emerge media-libs/jpeg media-libs/libdvdread
+
  
 
== Modify the Makefile ==
 
== Modify the Makefile ==
We will need to make some small changes to the original Makefile in order to compile properly.
+
We will need to make some small changes to the original Makefile in order for wizd to compile properly.
  # cd /usr/local/src/wizd_0_12h_pvb_19/
+
  kurobox src # cd wizd
  # nano Makefile
+
  kurobox wizd # nano makefile
  
 
  ''replace''
 
  ''replace''
Line 25: Line 23:
 
  ''with''
 
  ''with''
 
   LDFLAGS += -L/usr/local/lib -Wl,-rpath,/usr/local/lib -ljpeg -ldvdread -ldl -lm
 
   LDFLAGS += -L/usr/local/lib -Wl,-rpath,/usr/local/lib -ljpeg -ldvdread -ldl -lm
 +
The makefile that comes with release 21 is misnamed. Makefile needs a capital M
 +
mv makefile Makefile
  
 
== Compile Wizd ==
 
== Compile Wizd ==
 
Now that we've created the appropriate directories, and updated our Makefile, we can go ahead and compile Wizd.
 
Now that we've created the appropriate directories, and updated our Makefile, we can go ahead and compile Wizd.
  # make
+
  kurobox wizd # make
 
   .
 
   .
 
   .
 
   .
 
   .
 
   .
  # mv wizd /usr/local/bin/wizd
+
and then move it to its final location.
 +
  kurobox wizd # mv wizd /usr/local/wizd
 +
We need to make the /docroot directory and get the skins for wizd.
 +
kurobox wizd # cd /usr/local/wizd
 +
kurobox wizd # mkdir docroot
 +
kurobox wizd # cvs -d:pserver:anonymous@wizd.cvs.sourceforge.net:/cvsroot/wizd co -P skin
  
== Modify the Configuration File ==
+
== Get and Modify the Configuration File ==
You will need to update your configuration file to tell Wizd where to find your media files, etc.
+
You will need to update your configuration file to tell Wizd where to find your media files, etc. Getting the wizd.conf file is a bit tricky since it is not in CVS. It is found in the windows package .zip file. To make life easier a copy of it has been placed in the Gentoo downloads area.
  # cd /usr/local/bin/wizd
+
  kurobox wizd # wget http://www.kurobox.com/downloads/gentoo/wizd.conf
  # nano wizd.conf
+
  kurobox wizd # nano wizd.conf
  
 
== Add Wizd to Runlevel Default ==
 
== Add Wizd to Runlevel Default ==
If you want Wizd to start automatically after boot, you will need to add Wizd to your default runlevel. Here is a sample script written by a member of the I-O DATA USA FORUM, with a few modifications (Original post: http://www.iodata.com/usa/forum/showthread.php?t=422#post2398)
+
If you want Wizd to start automatically after boot, you will need to add Wizd to your default runlevel. Here is a sample script written by a member of the Kurobox forum (Dave Taylor), with a few modifications ([http://www.kurobox.com/forums/viewtopic.php?t=929#5351 original post]).
 
  # cd /etc/init.d
 
  # cd /etc/init.d
 
  # nano wizd
 
  # nano wizd
 
+
Copy and paste the following:
  #! /bin/sh
+
  #!/sbin/runscript
 
  #
 
  #
  # Start/stop the Wizd daemon.
+
  # start/stop the Wizd daemon.
 
  #
 
  #
 
   
 
   
cd /usr/local/bin/wizd;
+
  start() {
+
  ebegin "Starting the Wizd daemon"
  start()
+
  start-stop-daemon --start --pidfile /var/run/wizd --make-pidfile --chdir /usr/local/wizd --exec /usr/local/wizd/wizd
{
+
  eend $?
  /sbin/killall -s KILL "/usr/local/bin/wizd/wizd" > /dev/null 2>&1
+
  echo -n "Starting Wizd: "
+
  /usr/local/bin/wizd/wizd
+
 
  }
 
  }
 
   
 
   
 
  #
 
  #
  # Stop the Wizd server processe.
+
  # Stop the Wizd server daemon
 
  #
 
  #
 
   
 
   
  stop()
+
  stop() {
  {
+
  ebegin "Stopping the Wizd daemon"
  echo 'Stop services: wizd'
+
  start-stop-daemon --stop --name wizd
  /bin/killall "/usr/local/bin/wizd/wizd" > /dev/null 2>&1
+
  eend $?
 
  }
 
  }
+
Have Wizd start automatically when you boot your Kurobox.
#
+
# Usage statement.
+
#
+
+
case "$1" in
+
start)
+
start
+
;;
+
stop)
+
stop
+
;;
+
restart)
+
stop
+
start
+
;;
+
*)
+
echo "usage: $0 {start|stop|restart}"
+
exit 1
+
;;
+
esac
+
 
+
 
  # chmod 755 wizd
 
  # chmod 755 wizd
 
  # rc-update add wizd default
 
  # rc-update add wizd default
Line 107: Line 88:
 
* [http://www.geocities.co.jp/SiliconValley-SanJose/3271/ wizd -- MediaWiz Server Daemon for Linux] (Japanese)
 
* [http://www.geocities.co.jp/SiliconValley-SanJose/3271/ wizd -- MediaWiz Server Daemon for Linux] (Japanese)
 
* [http://www.vertexlink.co.jp/home/mediawiz/index.html VertexLink MediaWiz] (Japanese)
 
* [http://www.vertexlink.co.jp/home/mediawiz/index.html VertexLink MediaWiz] (Japanese)
 
+
{{Template:Articles|Kurobox|Gentoo}}
[[Category:Gentoo]]
+

Latest revision as of 00:22, 13 July 2007

This article is based on the original Wizd for the Kuro Box page at http://jhue.users.sonic.net/.

Wizd is a server daemon originally designed for the Vertex MediaWiz, but is compatible with other popular media players such as the Buffalo LinkTheater and the I-O DATA AVeL LinkPlayer2.

Contents

Preparing for Build

First download the version of wizd you would like to install. Wizd has recently been moved to Sourceforge, so we have to download the source through CVS, as well as download the supporting files. In this example, we are going to use version 0_12h_pvb_21.

Source files

You will need a CVS client for this part. You can get this through portage:

# emerge dev-util/cvs

You can also use dev-util/colorcvs but it is currently masked for ppc. You can add this to your packages.keywords if you want to use it, and know how. Next we change directories to /usr/local/src and retrieve the Wizd build from http://wizd.sourceforge.net/

# cd /usr/local/src
kurobox src # cvs -d:pserver:anonymous@wizd.cvs.sourceforge.net:/cvsroot/wizd co -P wizd

The latest version of Wizd's source files should now be in /usr/local/src/wizd. Wizd requires the jpeg library, and the libdvdread library in order to compile properly. We can download and install these through portage.

kurobox src # emerge media-libs/jpeg media-libs/libdvdread

Modify the Makefile

We will need to make some small changes to the original Makefile in order for wizd to compile properly.

kurobox src # cd wizd
kurobox wizd # nano makefile
replace
  LDFLAGS += -static -L/usr/local/lib -ljpeg -ldvdread
with
  LDFLAGS += -L/usr/local/lib -Wl,-rpath,/usr/local/lib -ljpeg -ldvdread -ldl -lm

The makefile that comes with release 21 is misnamed. Makefile needs a capital M

mv makefile Makefile

Compile Wizd

Now that we've created the appropriate directories, and updated our Makefile, we can go ahead and compile Wizd.

kurobox wizd # make
  .
  .
  .

and then move it to its final location.

kurobox wizd # mv wizd /usr/local/wizd

We need to make the /docroot directory and get the skins for wizd.

kurobox wizd # cd /usr/local/wizd
kurobox wizd # mkdir docroot
kurobox wizd # cvs -d:pserver:anonymous@wizd.cvs.sourceforge.net:/cvsroot/wizd co -P skin

Get and Modify the Configuration File

You will need to update your configuration file to tell Wizd where to find your media files, etc. Getting the wizd.conf file is a bit tricky since it is not in CVS. It is found in the windows package .zip file. To make life easier a copy of it has been placed in the Gentoo downloads area.

kurobox wizd # wget http://www.kurobox.com/downloads/gentoo/wizd.conf
kurobox wizd # nano wizd.conf

Add Wizd to Runlevel Default

If you want Wizd to start automatically after boot, you will need to add Wizd to your default runlevel. Here is a sample script written by a member of the Kurobox forum (Dave Taylor), with a few modifications (original post).

# cd /etc/init.d
# nano wizd

Copy and paste the following:

#!/sbin/runscript
#
# start/stop the Wizd daemon.
#

start() {
 ebegin "Starting the Wizd daemon"
 start-stop-daemon --start --pidfile /var/run/wizd --make-pidfile --chdir /usr/local/wizd --exec /usr/local/wizd/wizd
 eend $?
}

#
# Stop the Wizd server daemon
#

stop() {
 ebegin "Stopping the Wizd daemon"
 start-stop-daemon --stop --name  wizd
 eend $?
}

Have Wizd start automatically when you boot your Kurobox.

# chmod 755 wizd
# rc-update add wizd default
 * wizd added to runlevel default
 * rc-update complete.

Run Wizd

You can reboot your system to make sure Wizd starts at runlevel default, or you can start it manually.

# /etc/init.d/wizd start

Any time you make any changes to the wizd.conf configuration file, Wizd will need to be restarted.

# /etc/init.d/wizd restart

You can test that Wizd is working properly by pointing your webbrowser to http://your_kurobox_ip:8004/ and you should be able to see the Wizd media selection screen.

External links