--- wmaloader-0.1.orig/image_transfer.c +++ wmaloader-0.1/image_transfer.c @@ -19,6 +19,7 @@ /*------------------------------------------------------------------------*/ /* system */ +#include #include #include #include --- wmaloader-0.1.orig/Makefile +++ wmaloader-0.1/Makefile @@ -17,17 +17,18 @@ # Where to install binary -DEST=/usr/local/bin +DEST=/usr/sbin # Path to uPnP include files -UPNP_INC=/usr/local/upnp +UPNP_INC=/usr/include/upnp # Path to uPnP libraries -UPNP_LIBS=/usr/local/lib/upnp +UPNP_LIBS=/usr/lib CC=gcc -LDFLAGS=-lixml -lupnp -lthreadutil -L$(UPNP_LIBS) -CFLAGS=-Wall -O2 -I$(UPNP_INC) $(LIBS) -D_REENTRANT +LDFLAGS+=-L$(UPNP_LIBS) +LIBS=-lpthread -lixml -lupnp -lthreadutil +CFLAGS=-Wall -O2 -I$(UPNP_INC) -D_REENTRANT TARGET=wmaloader OBJS=wmaloader.o image_transfer.o common.o @@ -39,6 +40,7 @@ all: $(TARGET) $(TARGET) : wmaloader.o image_transfer.o common.o + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) clean : rm -f $(TARGET) *.o @@ -54,4 +56,4 @@ rm -rf $(DIST) mkdir $(DIST) cp $(DIST_FILES) $(DIST) - tar -zc -f $(DIST).tar.gz $(DIST) \ No newline at end of file + tar -zc -f $(DIST).tar.gz $(DIST) --- wmaloader-0.1.orig/wmaloader.c +++ wmaloader-0.1/wmaloader.c @@ -384,7 +384,7 @@ /*------------------------------------------------------------------------*/ int parse_command_line(int argc, char **argv){ - char x = 0; + signed char x = 0; int idx = 0; static struct option opts[] = --- wmaloader-0.1.orig/debian/control +++ wmaloader-0.1/debian/control @@ -0,0 +1,23 @@ +Source: wmaloader +Section: net +Priority: extra +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Steve McIntyre <93sam@debian.org> +Build-Depends: libupnp-dev, debhelper (>= 5.0.0) +Standards-Version: 3.8.2.0 + +Package: wmaloader +Priority: extra +Architecture: any +Depends: ${shlibs:Depends}, adduser +Description: firmware downloader for Linksys WMA11B media adapter + wmaloader is a simple program that can download filesystem images to + the Linksys WMA11B. It performs the same function as the Windows + XP/2000 Digital Media Adapter Application Loader (supplied with the + original software) but can run on other operating systems. This + allows the Linksys Wireless Media adapter to be booted from a Linux + system. It does *not* supply media files to the device (yet!) but + even so it might prove useful to those who wish to experiment hacking + the device. + + --- wmaloader-0.1.orig/debian/wmaloader.postinst +++ wmaloader-0.1/debian/wmaloader.postinst @@ -0,0 +1,13 @@ +#!/bin/sh +# Post-install script for wmaloader + +set -e + +WMAUSER=wmaloader +WMAHOME=/usr/lib/wmaloader + +chgrp "$WMAUSER" "$WMAHOME" 2>/dev/null || addgroup --system "$WMAUSER" +chown "$WMAUSER"."$WMAUSER" "$WMAHOME" 2>/dev/null || \ + adduser --system --home "$WMAHOME" --no-create-home --disabled-password --ingroup "$WMAUSER" "$WMAUSER" + +#DEBHELPER# --- wmaloader-0.1.orig/debian/wmaloader.dirs +++ wmaloader-0.1/debian/wmaloader.dirs @@ -0,0 +1,4 @@ +usr/bin +usr/share/man/man8 +etc/init.d +etc/default --- wmaloader-0.1.orig/debian/changelog +++ wmaloader-0.1/debian/changelog @@ -0,0 +1,62 @@ +wmaloader (0.1-5.1ubuntu2) raring; urgency=low + + * Merge from Debian. Rmaining changes: + - Remove duplicated section field in debian/control + - Makefile: Fix linking with ld --no-add-needed and --as-needed. + + -- Oussama Bounaim Mon, 12 Nov 2012 17:20:02 +0100 + +wmaloader (0.1-5.1) unstable; urgency=low + + * Non-maintainer upload. + * Add -lpthread to LDFLAGS to fix link failure with gold (closes: #556678). + + -- Julien Cristau Fri, 30 Dec 2011 19:27:40 +0100 + +wmaloader (0.1-5ubuntu2) quantal; urgency=low + + * Rebuild against the latest libupnp. + * Remove duplicated section field in debian/control + + -- Bhavani Shankar Tue, 29 May 2012 11:33:46 +0530 + +wmaloader (0.1-5ubuntu1) natty; urgency=low + + * Makefile: Fix linking with ld --no-add-needed and --as-needed. + + -- Michael Bienia Sun, 05 Dec 2010 18:51:22 +0100 + +wmaloader (0.1-5) unstable; urgency=low + + * Fix missing include. Closes: #518890. + * Update Standards-Version and Build-deps. + + -- Steve McIntyre <93sam@debian.org> Thu, 30 Jul 2009 15:59:01 +0200 + +wmaloader (0.1-4) unstable; urgency=low + + * add LSB formatted dependency info in the init.d script. Thanks to + Petter Reinholdtsen for the patch. Closes: #469426 + * Update Standards-Version and fix a range of lintian warnings. + + -- Steve McIntyre <93sam@debian.org> Wed, 05 Feb 2008 20:56:05 +0000 + +wmaloader (0.1-3.1) unstable; urgency=medium + + * Depend on adduser for our postinst. Closes: #398524 + + -- Steve McIntyre <93sam@debian.org> Tue, 14 Nov 2006 09:29:53 +0000 + +wmaloader (0.1-2) unstable; urgency=low + + * Fixed the init script so that using interfaces other than eth0 might + work. Thanks to Andy Wild for pointing this out... Closes: #312348 + + -- Steve McIntyre <93sam@debian.org> Wed, 08 Jun 2005 00:52:24 +0100 + +wmaloader (0.1-1) unstable; urgency=low + + * Initial version + + -- Steve McIntyre <93sam@debian.org> Thu, 20 Jan 2005 00:55:08 +0000 + --- wmaloader-0.1.orig/debian/rules +++ wmaloader-0.1/debian/rules @@ -0,0 +1,44 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 by Joey Hess. + +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=0 + +build: + $(MAKE) + +clean: + dh_testdir + dh_testroot + $(MAKE) clean + dh_clean + +binary-indep: + +binary-arch: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + dh_installdocs + install wmaloader debian/wmaloader/usr/bin + install debian/wmaloader.8 debian/wmaloader/usr/share/man/man8 + + dh_strip + dh_installchangelogs + dh_installdocs README debian/README.Debian + dh_installinit + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false --- wmaloader-0.1.orig/debian/wmaloader.init +++ wmaloader-0.1/debian/wmaloader.init @@ -0,0 +1,68 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: wmaloader +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: start or stop the wmaloader daemon +### END INIT INFO + +test -f /usr/bin/wmaloader || exit 0 + +if [ -f /etc/default/wmaloader ] ; then + . /etc/default/wmaloader +fi + +if [ "$INTERFACE"x = ""x ] ; then + IFACE="" +else + if [ "$1"x = "start"x ] ; then + # Bring up a multicast route on this interface if we don't have one + /sbin/route -n | grep -q 239.0.0.0 + if [ $? -ne 0 ] ; then + echo Adding a multicast route for the WMA firmware loader + route add -net 239.0.0.0 netmask 255.0.0.0 $INTERFACE + fi + fi + IP=`ifconfig $INTERFACE | awk '/inet addr/ {gsub("addr:","");print $2}'` + if [ "$IP"x != ""x ] ; then + IFACE="--interface $IP" + fi +fi + +case "$1" in + start) + echo Starting the WMA firmware loader + if [ "$IMAGE"x = ""x ] ; then + echo "Unable to start WMA firmware loader - no image file specified in" + echo "/etc/default/wmaloader" + exit 0 + fi + + if [ ! -f "$IMAGE" ] ; then + echo "Unable to start WMA firmware loader - image file" + echo " \"$IMAGE\" " + echo "listed in /etc/default/wmaloader does not exist" + exit 0 + fi + + start-stop-daemon --start --quiet --chuid wmaloader \ + --exec /usr/bin/wmaloader -- --daemon --image $IMAGE $IFACE + ;; + stop) + echo Stopping the WMA firmware loader + start-stop-daemon --stop --quiet --exec /usr/bin/wmaloader + ;; + restart|force-reload) + echo Restarting the WMA firmware loader + start-stop-daemon --stop --quiet --exec /usr/bin/wmaloader + start-stop-daemon --start --quiet --chuid wmaloader \ + --exec /usr/bin/wmaloader -- --daemon --image $IMAGE $IFACE + ;; + *) + echo "Usage: /etc/init.d/wmaloader {start|stop|restart}" + exit 1 +esac + +exit 0 --- wmaloader-0.1.orig/debian/copyright +++ wmaloader-0.1/debian/copyright @@ -0,0 +1,22 @@ +This is the Debian GNU/Linux prepackaged version of wmaloader, a +firmware downloader for the Linksys WMA11B wireless media adapter. It +was downloaded from + +http://www-jcsu.jesus.cam.ac.uk/~acw43/projects/wma11b/wmaloader-0.1.tar.gz + +and packaged by Steve McIntyre <93sam@debian.org> + +The upstream homepage is + +http://www-jcsu.jesus.cam.ac.uk/~acw43/projects/wma11b/wmaloader.html + +Copyright 2004 Andrew Wild + +wmaloader is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2 of the License, or (at your +option) any later version. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + --- wmaloader-0.1.orig/debian/wmaloader.default +++ wmaloader-0.1/debian/wmaloader.default @@ -0,0 +1,9 @@ +# Parameters for wmaloader + +# Which interface should wmaloader bind to? +INTERFACE=eth0 + +# Where is the firmware image? The default on the CD from Linksys is +# /Program Files/Linksys Wireless-B Media Adapter/bootimg/squishguava +IMAGE=/usr/lib/wmaloader/squishguava + --- wmaloader-0.1.orig/debian/wmaloader.postrm +++ wmaloader-0.1/debian/wmaloader.postrm @@ -0,0 +1,10 @@ +#!/bin/sh +# Post-removal script for wmaloader +set -e + +if [ "$1" = "purge" ] ; then + # Remove user wmaloader, if it exists + userdel wmaloader || true +fi + +#DEBHELPER# --- wmaloader-0.1.orig/debian/wmaloader.8 +++ wmaloader-0.1/debian/wmaloader.8 @@ -0,0 +1,28 @@ +.TH wmaloader 8 +.SH NAME +wmaloader \- server to download firmware to the Linksys WMA11B media adapter +.SH SYNOPSIS +.B wmaloader [\-\-interface "if"] [\-\-daemon] \-\-image "image_file" +.SH DESCRIPTION +.B wmaloader +serves up a firmware image to a Linksys media adapter. + +.SH OPTIONS +.TP +.B \-\-interface "if" +Bind to a specific interface. +.TP +.B \-\-daemon +Detach and run in background. Log to syslog. + +.SH NOTES +To avoid mysterious uPnP problems ensure you add a route for +multicasting, e.g.: + +.B # route add -net 239.0.0.0 netmask 255.0.0.0 eth0 + +.SH AUTHOR +The wmaloader server was written by Andrew Wild . +This manual page was written by Steve McIntyre <93sam@debian.org>, for +the Debian GNU/Linux system (but may be used by others). +Both are published under the terms of the GNU General Public License. --- wmaloader-0.1.orig/debian/README.Debian +++ wmaloader-0.1/debian/README.Debian @@ -0,0 +1,40 @@ +README.Debian for wmaloader +=========================== + +Steve McIntyre, 2005/01/20 + +Configuration +------------- + +To use wmaloader, specify the location of your boot image and the +network interface you want to bind to in /etc/default/wmaloader. The +CD that came with the wma11b contains the standard firmware image in +the file + + /Program Files/Linksys Wireless-B Media Adapter/bootimg/squishguava + +wmamp (see below) will also work; at least it does for me! + +More information on using the wma11b with Linux +----------------------------------------------- + +There is plenty of information about how to drive the wma11b using +Free Software on the web: + +* Andy Wild's site (including the wmaloader upstream) at + http://www-jcsu.jesus.cam.ac.uk/~acw43/projects/wma11b/ gives a lot + more information about the hardware, and suggestions on what you can + do with it. + +* http://www.turtlehead.co.uk/section/wma11b/ describes wmamp, an + iTunes client that will run on the wma11b instead of the original + application that needs the proprietary Windows-based music + server. wmamp is what I use on my own wma11b, and I'm planning on + extending it to add more features shortly. For now, download the + latest stable version of the image from + http://www.turtlehead.co.uk/downloads/Wmamp-0.3.zip + +* daapd is a Free iTunes-compatible server that is also packaged in + Debian, allowing you to serve up MP3 and AAC audio to your wma11b + from any server on the network. + --- wmaloader-0.1.orig/debian/compat +++ wmaloader-0.1/debian/compat @@ -0,0 +1,2 @@ +5 +