diff options
Diffstat (limited to 'multimedia/ushare')
-rw-r--r-- | multimedia/ushare/DESCR | 16 | ||||
-rw-r--r-- | multimedia/ushare/Makefile | 46 | ||||
-rw-r--r-- | multimedia/ushare/PLIST | 8 | ||||
-rw-r--r-- | multimedia/ushare/distinfo | 11 | ||||
-rwxr-xr-x | multimedia/ushare/files/ushare.sh | 18 | ||||
-rw-r--r-- | multimedia/ushare/patches/patch-aa | 15 | ||||
-rw-r--r-- | multimedia/ushare/patches/patch-ab | 15 | ||||
-rw-r--r-- | multimedia/ushare/patches/patch-ac | 15 | ||||
-rw-r--r-- | multimedia/ushare/patches/patch-ad | 30 | ||||
-rw-r--r-- | multimedia/ushare/patches/patch-ae | 15 | ||||
-rw-r--r-- | multimedia/ushare/patches/patch-af | 87 |
11 files changed, 276 insertions, 0 deletions
diff --git a/multimedia/ushare/DESCR b/multimedia/ushare/DESCR new file mode 100644 index 00000000000..3058dc5bfe8 --- /dev/null +++ b/multimedia/ushare/DESCR @@ -0,0 +1,16 @@ +uShare is a UPnP (TM) A/V Media Server. It implements the server component that +provides UPnP media devices with information on available multimedia files. +uShare uses the built-in http server of libupnp to stream the files to clients. + +GeeXboX uShare is able to provide access to both images, videos, music or +playlists files (see below for a complete file format support list). It does not +act as an UPnP Media Adaptor and thus, can't transcode streams to fit the client +requirements. + +uShare is written in C for the GeeXboX project. It is designed to provide access +to multimedia contents to GeeXboX but can of course be used by any other UPnP +client device. It should compile and run on any modern POSIX compatible system +such as Linux. + +uShare is free software - it is licensed under the terms of the GNU General +Public License (GPL). diff --git a/multimedia/ushare/Makefile b/multimedia/ushare/Makefile new file mode 100644 index 00000000000..b41a39f7d16 --- /dev/null +++ b/multimedia/ushare/Makefile @@ -0,0 +1,46 @@ +# $NetBSD: Makefile,v 1.1.1.1 2010/05/23 08:18:04 obache Exp $ +# + +DISTNAME= ushare-1.1a +CATEGORIES= net multimedia +MASTER_SITES= http://ushare.geexbox.org/releases/ +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= obache@NetBSD.org +HOMEPAGE= http://ushare.geexbox.org/ +COMMENT= UPnP AV Mediaserver +LICENSE= gnu-gpl-v2 + +PKG_DESTDIR_SUPPORT= user-destdir + +USE_LANGUAGES= c c++ +USE_PKGINSTALL= yes +USE_TOOLS+= gmake pkg-config + +HAS_CONFIGURE= yes + +CONFIGURE_ARGS+= --prefix=${PREFIX} +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} +CONFIGURE_ARGS+= --localedir=${PREFIX}/${PKGLOCALEDIR}/locale +CONFIGURE_ARGS+= --with-libupnp-dir=${BUILDLINK_PREFIX.libupnp} +CONFIGURE_ARGS+= --enable-dlna +CONFIGURE_ARGS+= --with-libdlna-dir=${BUILDLINK_PREFIX.libdlna} + +BROKEN_GETTEXT_DETECTION= yes + +CONF_FILES= ${PREFIX}/share/examples/ushare/ushare.conf ${PKG_SYSCONFDIR}/ushare.conf +RCD_SCRIPTS= ushare + +INSTALL_MAKE_FLAGS+= sysconfdir=${DESTDIR}${PREFIX}/share/examples/ushare + +INSTALLATION_DIRS+= ${PKGMANDIR}/man1 + +post-install: + ${INSTALL_MAN} ${WRKSRC}/src/ushare.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ + +.include "../../converters/libiconv/buildlink3.mk" +.include "../../devel/gettext-lib/buildlink3.mk" +.include "../../net/libdlna/buildlink3.mk" +.include "../../net/libupnp/buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/multimedia/ushare/PLIST b/multimedia/ushare/PLIST new file mode 100644 index 00000000000..ea1a7b52af8 --- /dev/null +++ b/multimedia/ushare/PLIST @@ -0,0 +1,8 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2010/05/23 08:18:04 obache Exp $ +bin/ushare +man/man1/ushare.1 +share/examples/rc.d/ushare +share/examples/ushare/init.d/ushare +share/examples/ushare/ushare.conf +share/locale/de/LC_MESSAGES/ushare.mo +share/locale/fr/LC_MESSAGES/ushare.mo diff --git a/multimedia/ushare/distinfo b/multimedia/ushare/distinfo new file mode 100644 index 00000000000..b9dcbe204bc --- /dev/null +++ b/multimedia/ushare/distinfo @@ -0,0 +1,11 @@ +$NetBSD: distinfo,v 1.1.1.1 2010/05/23 08:18:04 obache Exp $ + +SHA1 (ushare-1.1a.tar.bz2) = 1539e83cde5d80f433d262d971f5fe78486c9375 +RMD160 (ushare-1.1a.tar.bz2) = 6194ffec031d20fd897f2c7cf71c3c810238713f +Size (ushare-1.1a.tar.bz2) = 65864 bytes +SHA1 (patch-aa) = bf8b49ac048b97d9edd6d18f71fa34d93526ce43 +SHA1 (patch-ab) = 2136d6b0e92b797072ea13d30e0fcc7131ab50a6 +SHA1 (patch-ac) = 0c8cc122de8d1fbdaaace4867656819cad0b84e7 +SHA1 (patch-ad) = 6c8e838add604b54132fbe924c4a8697ee2e2c09 +SHA1 (patch-ae) = 180151696678bb2f3ccd2bbaaaf9ed55f1c441e9 +SHA1 (patch-af) = 43de62f0bb720bb31f7e8f1c8a31a5b7c5e19881 diff --git a/multimedia/ushare/files/ushare.sh b/multimedia/ushare/files/ushare.sh new file mode 100755 index 00000000000..dda5d075f06 --- /dev/null +++ b/multimedia/ushare/files/ushare.sh @@ -0,0 +1,18 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: ushare.sh,v 1.1.1.1 2010/05/23 08:18:04 obache Exp $ +# +# PROVIDE: ushare +# REQUIRE: DAEMON +# + +. /etc/rc.subr + +name="ushare" +rcvar=${name} +command="@PREFIX@/bin/${name}" +requre_files="@PKG_SYSCONFDIR@/ushare.conf" +command_args="--daemon" + +load_rc_config ${name} +run_rc_command "$1" diff --git a/multimedia/ushare/patches/patch-aa b/multimedia/ushare/patches/patch-aa new file mode 100644 index 00000000000..1a09f064999 --- /dev/null +++ b/multimedia/ushare/patches/patch-aa @@ -0,0 +1,15 @@ +$NetBSD: patch-aa,v 1.1.1.1 2010/05/23 08:18:04 obache Exp $ + +for broken gettext-libs detection + +--- configure.orig 2007-12-09 13:03:36.000000000 +0000 ++++ configure +@@ -302,7 +302,7 @@ cpu=`uname -m` + optimize="yes" + debug="no" + dostrip="yes" +-extralibs="" ++extralibs="${INTLLIBS}" + installstrip="-s" + cross_compile="no" + INSTALL="/usr/bin/install -c" diff --git a/multimedia/ushare/patches/patch-ab b/multimedia/ushare/patches/patch-ab new file mode 100644 index 00000000000..3f686edbf10 --- /dev/null +++ b/multimedia/ushare/patches/patch-ab @@ -0,0 +1,15 @@ +$NetBSD: patch-ab,v 1.1.1.1 2010/05/23 08:18:04 obache Exp $ + +Requre -I.. to include config.h. + +--- src/Makefile.orig 2007-12-09 13:03:36.000000000 +0000 ++++ src/Makefile +@@ -53,7 +53,7 @@ OBJS = $(SRCS:.c=.o) + all: depend $(PROG) + + .c.o: +- $(CC) -c $(CFLAGS) $(OPTFLAGS) -o $@ $< ++ $(CC) -c -I.. $(CFLAGS) $(OPTFLAGS) -o $@ $< + + $(PROG): $(OBJS) + $(CC) $(OBJS) $(LDFLAGS) $(EXTRALIBS) -o $@ diff --git a/multimedia/ushare/patches/patch-ac b/multimedia/ushare/patches/patch-ac new file mode 100644 index 00000000000..9f8db81a42d --- /dev/null +++ b/multimedia/ushare/patches/patch-ac @@ -0,0 +1,15 @@ +$NetBSD: patch-ac,v 1.1.1.1 2010/05/23 08:18:04 obache Exp $ + +Treat NetBSD same as FreeBSD. + +--- src/cfgparser.h.orig 2007-12-09 13:03:36.000000000 +0000 ++++ src/cfgparser.h +@@ -37,7 +37,7 @@ + #define USHARE_CONFIG_FILE "ushare.conf" + #define DEFAULT_USHARE_NAME "uShare" + +-#if (defined(BSD) || defined(__FreeBSD__)) ++#if (defined(BSD) || defined(__FreeBSD__) || defined(__NetBSD__)) + #define DEFAULT_USHARE_IFACE "lnc0" + #else /* Linux */ + #define DEFAULT_USHARE_IFACE "eth0" diff --git a/multimedia/ushare/patches/patch-ad b/multimedia/ushare/patches/patch-ad new file mode 100644 index 00000000000..c67fda7d99c --- /dev/null +++ b/multimedia/ushare/patches/patch-ad @@ -0,0 +1,30 @@ +$NetBSD: patch-ad,v 1.1.1.1 2010/05/23 08:18:04 obache Exp $ + +Treat NetBSD same as FreeBSD. + +--- src/osdep.c.orig 2007-12-09 13:03:36.000000000 +0000 ++++ src/osdep.c +@@ -18,7 +18,7 @@ + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +-#if (defined(__unix__) || defined(unix)) && !defined(USG) ++#if (defined(__unix__) || defined(unix)) && !defined(USG) || defined(__NetBSD__) + #include <sys/param.h> + #endif + +@@ -29,7 +29,7 @@ + + #include "osdep.h" + +-#if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__)) ++#if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)) + char * + strndup (const char *s, size_t n) + { +@@ -88,4 +88,4 @@ getline (char **lineptr, size_t *n, FILE + + return len; + } +-#endif /* (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__)) */ ++#endif /* (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)) */ diff --git a/multimedia/ushare/patches/patch-ae b/multimedia/ushare/patches/patch-ae new file mode 100644 index 00000000000..26521f3deae --- /dev/null +++ b/multimedia/ushare/patches/patch-ae @@ -0,0 +1,15 @@ +$NetBSD: patch-ae,v 1.1.1.1 2010/05/23 08:18:04 obache Exp $ + +Treat NetBSD same as FreeBSD. + +--- src/osdep.h.orig 2007-12-09 13:03:36.000000000 +0000 ++++ src/osdep.h +@@ -21,7 +21,7 @@ + #ifndef _OS_DEP_H_ + #define _OS_DEP_H_ + +-#if (defined(BSD) || defined(__FreeBSD__)) ++#if (defined(BSD) || defined(__FreeBSD__) || defined(__NetBSD__)) + #include <unistd.h> + char *strndup (const char *s, size_t n); + ssize_t getline (char **lineptr, size_t *n, FILE *stream); diff --git a/multimedia/ushare/patches/patch-af b/multimedia/ushare/patches/patch-af new file mode 100644 index 00000000000..39a8dbe6586 --- /dev/null +++ b/multimedia/ushare/patches/patch-af @@ -0,0 +1,87 @@ +$NetBSD: patch-af,v 1.1.1.1 2010/05/23 08:18:04 obache Exp $ + +* Treat NetBSD same as FreeBSD. +* Move sys/param.h and config.h header files before using conditions. + +--- src/ushare.c.orig 2007-12-09 13:03:36.000000000 +0000 ++++ src/ushare.c +@@ -28,7 +28,11 @@ + #include <errno.h> + #include <getopt.h> + +-#if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__)) ++#if (defined(__unix__) || defined(unix)) && !defined(USG) || defined(__NetBSD__) ++#include <sys/param.h> ++#endif ++ ++#if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)) + #include <sys/socket.h> + #include <sys/sysctl.h> + #include <net/if_dl.h> +@@ -49,18 +53,15 @@ + #include <ifaddrs.h> + #endif + +-#if (defined(__unix__) || defined(unix)) && !defined(USG) +-#include <sys/param.h> +-#endif +- + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + ++#include "config.h" ++ + #if (defined(HAVE_SETLOCALE) && defined(CONFIG_NLS)) + # include <locale.h> + #endif + +-#include "config.h" + #include "ushare.h" + #include "services.h" + #include "http.h" +@@ -505,7 +506,7 @@ create_udn (char *interface) + char *buf; + unsigned char *ptr; + +-#if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__)) ++#if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)) + int mib[6]; + size_t len; + struct if_msghdr *ifm; +@@ -517,7 +518,7 @@ create_udn (char *interface) + if (!interface) + return NULL; + +-#if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__)) ++#if (defined(BSD) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)) + mib[0] = CTL_NET; + mib[1] = AF_ROUTE; + mib[2] = 0; +@@ -568,7 +569,7 @@ create_udn (char *interface) + buf = (char *) malloc (64 * sizeof (char)); + memset (buf, 0, 64); + ptr = (unsigned char *) ifr.ifr_hwaddr.sa_data; +-#endif /* (defined(BSD) || defined(__FreeBSD__)) */ ++#endif /* (defined(BSD) || defined(__FreeBSD__) || defined(__NetBSD__)) */ + + snprintf (buf, 64, "%s-%02x%02x%02x%02x%02x%02x", DEFAULT_UUID, + (ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377), +@@ -734,7 +735,7 @@ setup_i18n(void) + #ifdef HAVE_SETLOCALE + setlocale (LC_ALL, ""); + #endif +-#if (!defined(BSD) && !defined(__FreeBSD__)) ++#if (!defined(BSD) && !defined(__FreeBSD__) && !defined(__NetBSD__)) + bindtextdomain (PACKAGE, LOCALEDIR); + #endif + textdomain (PACKAGE); +@@ -845,6 +846,9 @@ main (int argc, char **argv) + + signal (SIGINT, UPnPBreak); + signal (SIGHUP, reload_config); ++#ifndef MSG_NOSIGNAL ++ signal (SIGPIPE, SIG_IGN); ++#endif + + if (ut->use_telnet) + { |