diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-video/ushare | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-video/ushare')
-rw-r--r-- | media-video/ushare/Manifest | 1 | ||||
-rw-r--r-- | media-video/ushare/files/01_all_ushare_build_system.patch | 170 | ||||
-rw-r--r-- | media-video/ushare/files/02_all_ushare_build_warnings.patch | 35 | ||||
-rw-r--r-- | media-video/ushare/files/03_all_ushare_mp4_video_mime.patch | 20 | ||||
-rw-r--r-- | media-video/ushare/files/04_all_ushare_upnp_build_fix.patch | 156 | ||||
-rw-r--r-- | media-video/ushare/files/05_all_missing_headers.patch | 59 | ||||
-rw-r--r-- | media-video/ushare/files/06_all_ushare_disable_sysconf.patch | 20 | ||||
-rw-r--r-- | media-video/ushare/files/07_all_drop_optimizations.patch | 20 | ||||
-rw-r--r-- | media-video/ushare/files/ushare.conf.d | 38 | ||||
-rw-r--r-- | media-video/ushare/files/ushare.init.d | 79 | ||||
-rw-r--r-- | media-video/ushare/files/ushare.init.d.ng | 36 | ||||
-rw-r--r-- | media-video/ushare/files/ushare.service | 11 | ||||
-rw-r--r-- | media-video/ushare/metadata.xml | 11 | ||||
-rw-r--r-- | media-video/ushare/ushare-1.1a-r5.ebuild | 56 | ||||
-rw-r--r-- | media-video/ushare/ushare-1.1a-r6.ebuild | 64 |
15 files changed, 776 insertions, 0 deletions
diff --git a/media-video/ushare/Manifest b/media-video/ushare/Manifest new file mode 100644 index 00000000000..e4f0aa83947 --- /dev/null +++ b/media-video/ushare/Manifest @@ -0,0 +1 @@ +DIST ushare-1.1a.tar.bz2 65864 SHA256 7b9b85c79968d4f4560f02a99e33c6a33ff58f9d41d8faea79e31cce2ee78665 SHA512 2144ef96e58960d4d11bcefcd857c7eb7adab8df4ff815772d3b9d668f9f9daa1312707eb00a770c461b2a316e094e6697a004723ea02e86ee872fbe60b4797c WHIRLPOOL de9043c34edfd9ff3a1220968496e2ce42fae43cf1b190c40a14f11a6e4297689d2d800878e698a9f57edbe35dbb5c7ca82d81a67029df648a0d6e6c75966471 diff --git a/media-video/ushare/files/01_all_ushare_build_system.patch b/media-video/ushare/files/01_all_ushare_build_system.patch new file mode 100644 index 00000000000..c635bd7d52f --- /dev/null +++ b/media-video/ushare/files/01_all_ushare_build_system.patch @@ -0,0 +1,170 @@ +diff -uNr ushare-1.1a/configure ushare-1.1b/configure +--- ushare-1.1a/configure 2007-12-09 08:03:36.000000000 -0500 ++++ ushare-1.1b/configure 2012-03-25 17:35:07.000000000 -0400 +@@ -42,6 +42,9 @@ + echo " --with-libdlna-dir=DIR check for libdlna installed in DIR" + echo "" + echo "Advanced options (experts only):" ++ echo " --disable-sysconf disable installation of init files" ++ echo " --enable-developer enable developer options" ++ echo " --disable-developer disable developer options" + echo " --enable-debug enable debugging symbols" + echo " --disable-debug disable debugging symbols" + echo " --disable-strip disable stripping of executables at installation" +@@ -164,6 +167,11 @@ + echo "#define $1 \"$2\"" >> $CONFIG_H + } + ++check_cmd_exists(){ ++ log check_cmd_exists "$@" ++ which "$@" >>$logfile 2>&1 ++} ++ + check_cmd(){ + log "$@" + "$@" >>$logfile 2>&1 +@@ -300,13 +308,15 @@ + strip="strip" + cpu=`uname -m` + optimize="yes" ++sysconf="yes" ++developer="no" + debug="no" + dostrip="yes" + extralibs="" + installstrip="-s" + cross_compile="no" + INSTALL="/usr/bin/install -c" +-VERSION="1.1a" ++VERSION="1.2.0" + system_name=`uname -s 2>&1` + + ################################################# +@@ -420,6 +430,12 @@ + ;; + --disable-dlna) dlna="no" + ;; ++ --disable-sysconf) sysconf="no" ++ ;; ++ --enable-developer) developer="yes" ++ ;; ++ --disable-developer) developer="no" ++ ;; + --enable-debug) debug="yes" + ;; + --disable-debug) debug="no" +@@ -584,6 +600,25 @@ + linux && add_cflags -D_GNU_SOURCE + + ################################################# ++# check for developer options ++################################################# ++if enabled developer; then ++ add_cflags -Werror ++ add_cflags -DHAVE_DEVELOPER ++ ++ have_ctags='no' ++ if check_cmd_exists 'ctags'; then ++ have_ctags='yes' ++ fi ++ ++ have_etags='no' ++ if check_cmd_exists 'etags'; then ++ have_etags='yes' ++ fi ++ ++fi ++ ++################################################# + # check for debug symbols + ################################################# + if enabled debug; then +@@ -684,6 +719,8 @@ + echolog " STRIP $strip" + echolog " make $make" + echolog " CPU $cpu ($tune)" ++echolog " install sysconf $sysconf" ++echolog " developer options $developer" + echolog " debug symbols $debug" + echolog " strip symbols $dostrip" + echolog " optimize $optimize" +@@ -724,6 +761,10 @@ + append_config "LDFLAGS=$LDFLAGS" + append_config "INSTALL=$INSTALL" + ++append_config "INSTALL_SYSCONF=$sysconf" ++append_config "DEVELOPER=$developer" ++append_config "HAVE_CTAGS=$have_ctags" ++append_config "HAVE_ETAGS=$have_etags" + append_config "DEBUG=$debug" + + +diff -uNr ushare-1.1a/scripts/Makefile ushare-1.1b/scripts/Makefile +--- ushare-1.1a/scripts/Makefile 2007-12-09 08:03:36.000000000 -0500 ++++ ushare-1.1b/scripts/Makefile 2012-03-25 17:35:07.000000000 -0400 +@@ -3,6 +3,11 @@ + endif + include ../config.mak + ++INSTALL_RULES = ++ifeq ($(INSTALL_SYSCONF),yes) ++ INSTALL_RULES += install-sysconf ++endif ++ + CONF_FILE = "ushare.conf" + INITD_FILE = "ushare" + +@@ -14,7 +19,9 @@ + + distclean: + +-install: ++install: $(INSTALL_RULES) ++ ++install-sysconf: + $(INSTALL) -d $(sysconfdir) + $(INSTALL) -m 644 $(CONF_FILE) $(sysconfdir) + $(INSTALL) -d $(sysconfdir)/init.d +diff -uNr ushare-1.1a/src/Makefile ushare-1.1b/src/Makefile +--- ushare-1.1a/src/Makefile 2007-12-09 08:03:36.000000000 -0500 ++++ ushare-1.1b/src/Makefile 2012-03-25 17:35:07.000000000 -0400 +@@ -3,6 +3,15 @@ + endif + include ../config.mak + ++ifeq ($(DEVELOPER),yes) ++ ifeq ($(HAVE_ETAGS),yes) ++ BUILD_RULES += TAGS ++ endif ++ ifeq ($(HAVE_CTAGS),yes) ++ BUILD_RULES += tags ++ endif ++endif ++ + PROG = ushare + + EXTRADIST = ushare.1 \ +@@ -50,7 +59,7 @@ + + .SUFFIXES: .c .o + +-all: depend $(PROG) ++all: depend $(BUILD_RULES) $(PROG) + + .c.o: + $(CC) -c $(CFLAGS) $(OPTFLAGS) -o $@ $< +@@ -58,6 +67,14 @@ + $(PROG): $(OBJS) + $(CC) $(OBJS) $(LDFLAGS) $(EXTRALIBS) -o $@ + ++TAGS: ++ @rm -f $@; \ ++ ( find -name '*.[chS]' -print ) | xargs etags -a ++ ++tags: ++ @rm -f $@; \ ++ ( find -name '*.[chS]' -print ) | xargs ctags -a; ++ + clean: + -$(RM) -f *.o $(PROG) + -$(RM) -f .depend diff --git a/media-video/ushare/files/02_all_ushare_build_warnings.patch b/media-video/ushare/files/02_all_ushare_build_warnings.patch new file mode 100644 index 00000000000..f79e7890f8c --- /dev/null +++ b/media-video/ushare/files/02_all_ushare_build_warnings.patch @@ -0,0 +1,35 @@ +diff --git a/src/ctrl_telnet.c b/src/ctrl_telnet.c +index 0849d80..b3e9e8d 100644 +--- a/src/ctrl_telnet.c ++++ b/src/ctrl_telnet.c +@@ -202,6 +202,7 @@ ctrl_telnet_start (int port) + void + ctrl_telnet_stop (void) + { ++ ssize_t tmp; + pthread_mutex_lock (&startstop_lock); + + if (!started) +@@ -211,7 +212,7 @@ ctrl_telnet_stop (void) + } + + /* yes is int, which is bigger then char, so this should be safe */ +- write (ttd.killer[1], &yes, sizeof (char)); ++ tmp = write (ttd.killer[1], &yes, sizeof (char)); + + pthread_mutex_unlock (&startstop_lock); + pthread_join (ttd.thread, NULL); +diff --git a/src/mime.c b/src/mime.c +index 66c48ab..bf0121b 100644 +--- a/src/mime.c ++++ b/src/mime.c +@@ -144,7 +144,8 @@ char *mime_get_protocol (struct mime_type_t *mime) + if (!mime) + return NULL; + +- sprintf (protocol, mime->mime_protocol); ++ //sprintf (protocol, mime->mime_protocol); ++ strcpy (protocol, mime->mime_protocol); + strcat (protocol, "*"); + return strdup (protocol); + } diff --git a/media-video/ushare/files/03_all_ushare_mp4_video_mime.patch b/media-video/ushare/files/03_all_ushare_mp4_video_mime.patch new file mode 100644 index 00000000000..0edba22cba9 --- /dev/null +++ b/media-video/ushare/files/03_all_ushare_mp4_video_mime.patch @@ -0,0 +1,20 @@ +diff --git a/src/mime.c b/src/mime.c +index bf0121b..f38deca 100644 +--- a/src/mime.c ++++ b/src/mime.c +@@ -53,6 +53,7 @@ const struct mime_type_t MIME_Type_List[] = { + { "mpeg2", UPNP_VIDEO, "http-get:*:video/mpeg2:"}, + { "m4v", UPNP_VIDEO, "http-get:*:video/mp4:"}, + { "m4p", UPNP_VIDEO, "http-get:*:video/mp4:"}, ++ { "mp4", UPNP_VIDEO, "http-get:*:video/mp4:"}, + { "mp4ps", UPNP_VIDEO, "http-get:*:video/x-nerodigital-ps:"}, + { "ts", UPNP_VIDEO, "http-get:*:video/mpeg2:"}, + { "ogm", UPNP_VIDEO, "http-get:*:video/mpeg:"}, +@@ -79,7 +80,6 @@ const struct mime_type_t MIME_Type_List[] = { + { "mp1", UPNP_AUDIO, "http-get:*:audio/mp1:"}, + { "mp2", UPNP_AUDIO, "http-get:*:audio/mp2:"}, + { "mp3", UPNP_AUDIO, "http-get:*:audio/mpeg:"}, +- { "mp4", UPNP_AUDIO, "http-get:*:audio/mp4:"}, + { "m4a", UPNP_AUDIO, "http-get:*:audio/mp4:"}, + { "ogg", UPNP_AUDIO, "http-get:*:audio/x-ogg:"}, + { "wav", UPNP_AUDIO, "http-get:*:audio/wav:"}, diff --git a/media-video/ushare/files/04_all_ushare_upnp_build_fix.patch b/media-video/ushare/files/04_all_ushare_upnp_build_fix.patch new file mode 100644 index 00000000000..c3ec37a324c --- /dev/null +++ b/media-video/ushare/files/04_all_ushare_upnp_build_fix.patch @@ -0,0 +1,156 @@ +diff -wbBur ushare-1.1a/src/http.c ushare-1.1a.my/src/http.c +--- ushare-1.1a/src/http.c 2007-12-09 13:03:36.000000000 +0000 ++++ ushare-1.1a.my/src/http.c 2010-10-29 11:13:07.000000000 +0000 +@@ -77,8 +77,7 @@ + info->content_type = ixmlCloneDOMString (content_type); + } + +-static int +-http_get_info (const char *filename, struct File_Info *info) ++int http_get_info (const char *filename, struct File_Info *info) + { + extern struct ushare_t *ut; + struct upnp_entry_t *entry = NULL; +@@ -197,8 +196,7 @@ + return ((UpnpWebFileHandle) file); + } + +-static UpnpWebFileHandle +-http_open (const char *filename, enum UpnpOpenFileMode mode) ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode) + { + extern struct ushare_t *ut; + struct upnp_entry_t *entry = NULL; +@@ -251,8 +249,7 @@ + return ((UpnpWebFileHandle) file); + } + +-static int +-http_read (UpnpWebFileHandle fh, char *buf, size_t buflen) ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen) + { + struct web_file_t *file = (struct web_file_t *) fh; + ssize_t len = -1; +@@ -286,8 +283,7 @@ + return len; + } + +-static int +-http_write (UpnpWebFileHandle fh __attribute__((unused)), ++int http_write (UpnpWebFileHandle fh __attribute__((unused)), + char *buf __attribute__((unused)), + size_t buflen __attribute__((unused))) + { +@@ -296,8 +292,7 @@ + return 0; + } + +-static int +-http_seek (UpnpWebFileHandle fh, off_t offset, int origin) ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin) + { + struct web_file_t *file = (struct web_file_t *) fh; + off_t newpos = -1; +@@ -371,8 +366,7 @@ + return 0; + } + +-static int +-http_close (UpnpWebFileHandle fh) ++int http_close (UpnpWebFileHandle fh) + { + struct web_file_t *file = (struct web_file_t *) fh; + +@@ -402,13 +396,3 @@ + + return 0; + } +- +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks = +- { +- http_get_info, +- http_open, +- http_read, +- http_write, +- http_seek, +- http_close +- }; +diff -wbBur ushare-1.1a/src/http.h ushare-1.1a.my/src/http.h +--- ushare-1.1a/src/http.h 2007-12-09 13:03:36.000000000 +0000 ++++ ushare-1.1a.my/src/http.h 2010-10-29 11:13:11.000000000 +0000 +@@ -25,6 +25,13 @@ + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks; ++int http_close (UpnpWebFileHandle fh); ++int http_write (UpnpWebFileHandle fh __attribute__((unused)), ++ char *buf __attribute__((unused)), ++ size_t buflen __attribute__((unused))); ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin); ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode); ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen); ++int http_get_info (const char *filename, struct File_Info *info); + + #endif /* _HTTP_H_ */ +diff -wbBur ushare-1.1a/src/ushare.c ushare-1.1a.my/src/ushare.c +--- ushare-1.1a/src/ushare.c 2007-12-09 13:03:36.000000000 +0000 ++++ ushare-1.1a.my/src/ushare.c 2010-10-29 11:17:45.000000000 +0000 +@@ -188,7 +188,7 @@ + if (strcmp (request->DevUDN + 5, ut->udn)) + return; + +- ip = request->CtrlPtIPAddr.s_addr; ++ ip = (*(struct sockaddr_in*)&request->CtrlPtIPAddr).sin_addr.s_addr; + ip = ntohl (ip); + sprintf (val, "%d.%d.%d.%d", + (ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF); +@@ -348,7 +348,47 @@ + + UpnpEnableWebserver (TRUE); + +- res = UpnpSetVirtualDirCallbacks (&virtual_dir_callbacks); ++ res = UpnpVirtualDir_set_WriteCallback(http_write); ++ if (res != UPNP_E_SUCCESS) ++ { ++ log_error (_("Cannot set virtual directory callbacks\n")); ++ free (description); ++ return -1; ++ } ++ ++ res = UpnpVirtualDir_set_GetInfoCallback(http_get_info); ++ if (res != UPNP_E_SUCCESS) ++ { ++ log_error (_("Cannot set virtual directory callbacks\n")); ++ free (description); ++ return -1; ++ } ++ ++ res = UpnpVirtualDir_set_ReadCallback(http_read); ++ if (res != UPNP_E_SUCCESS) ++ { ++ log_error (_("Cannot set virtual directory callbacks\n")); ++ free (description); ++ return -1; ++ } ++ ++ res = UpnpVirtualDir_set_OpenCallback(http_open); ++ if (res != UPNP_E_SUCCESS) ++ { ++ log_error (_("Cannot set virtual directory callbacks\n")); ++ free (description); ++ return -1; ++ } ++ ++ res = UpnpVirtualDir_set_SeekCallback(http_seek); ++ if (res != UPNP_E_SUCCESS) ++ { ++ log_error (_("Cannot set virtual directory callbacks\n")); ++ free (description); ++ return -1; ++ } ++ ++ res = UpnpVirtualDir_set_CloseCallback(http_close); + if (res != UPNP_E_SUCCESS) + { + log_error (_("Cannot set virtual directory callbacks\n")); diff --git a/media-video/ushare/files/05_all_missing_headers.patch b/media-video/ushare/files/05_all_missing_headers.patch new file mode 100644 index 00000000000..0d2f0e8faff --- /dev/null +++ b/media-video/ushare/files/05_all_missing_headers.patch @@ -0,0 +1,59 @@ +diff -uNr ushare-1.1a.a/src/cds.c ushare-1.1a.b/src/cds.c +--- ushare-1.1a.a/src/cds.c 2007-12-09 08:03:36.000000000 -0500 ++++ ushare-1.1a.b/src/cds.c 2012-05-27 11:28:42.000000000 -0400 +@@ -19,7 +19,9 @@ + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + ++#include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + +diff -uNr ushare-1.1a.a/src/cms.c ushare-1.1a.b/src/cms.c +--- ushare-1.1a.a/src/cms.c 2007-12-09 08:03:36.000000000 -0500 ++++ ushare-1.1a.b/src/cms.c 2012-05-27 11:25:03.000000000 -0400 +@@ -20,6 +20,7 @@ + */ + + #include <stdlib.h> ++#include <string.h> + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + +diff -uNr ushare-1.1a.a/src/http.c ushare-1.1a.b/src/http.c +--- ushare-1.1a.a/src/http.c 2012-05-27 11:23:32.000000000 -0400 ++++ ushare-1.1a.b/src/http.c 2012-05-27 11:25:13.000000000 -0400 +@@ -25,6 +25,7 @@ + #include <errno.h> + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #include <unistd.h> + #include <errno.h> + +diff -uNr ushare-1.1a.a/src/presentation.c ushare-1.1a.b/src/presentation.c +--- ushare-1.1a.a/src/presentation.c 2007-12-09 08:03:36.000000000 -0500 ++++ ushare-1.1a.b/src/presentation.c 2012-05-27 11:30:08.000000000 -0400 +@@ -18,7 +18,9 @@ + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + ++#include <stdio.h> + #include <stdlib.h> ++#include <string.h> + + #if HAVE_LANGINFO_CODESET + # include <langinfo.h> +diff -uNr ushare-1.1a.a/src/services.c ushare-1.1a.b/src/services.c +--- ushare-1.1a.a/src/services.c 2007-12-09 08:03:36.000000000 -0500 ++++ ushare-1.1a.b/src/services.c 2012-05-27 11:25:26.000000000 -0400 +@@ -20,6 +20,7 @@ + */ + + #include <stdlib.h> ++#include <string.h> + #include <upnp/upnp.h> + #include <upnp/upnptools.h> + diff --git a/media-video/ushare/files/06_all_ushare_disable_sysconf.patch b/media-video/ushare/files/06_all_ushare_disable_sysconf.patch new file mode 100644 index 00000000000..c3adf8e5428 --- /dev/null +++ b/media-video/ushare/files/06_all_ushare_disable_sysconf.patch @@ -0,0 +1,20 @@ +Do not try to parse the default configuration file as everyting +should be handled by the /etc/conf.d/ushare file in Gentoo +Index: ushare-1.1a/src/ushare.c +=================================================================== +--- ushare-1.1a.orig/src/ushare.c ++++ ushare-1.1a/src/ushare.c +@@ -813,13 +813,6 @@ main (int argc, char **argv) + return EXIT_SUCCESS; + } + +- if (parse_config_file (ut) < 0) +- { +- /* fprintf here, because syslog not yet ready */ +- fprintf (stderr, _("Warning: can't parse file \"%s\".\n"), +- ut->cfg_file ? ut->cfg_file : SYSCONFDIR "/" USHARE_CONFIG_FILE); +- } +- + if (ut->xbox360) + { + char *name; diff --git a/media-video/ushare/files/07_all_drop_optimizations.patch b/media-video/ushare/files/07_all_drop_optimizations.patch new file mode 100644 index 00000000000..7a5029f7951 --- /dev/null +++ b/media-video/ushare/files/07_all_drop_optimizations.patch @@ -0,0 +1,20 @@ +Index: ushare-1.1a/configure +=================================================================== +--- ushare-1.1a.orig/configure ++++ ushare-1.1a/configure +@@ -627,15 +627,6 @@ if enabled debug; then + dostrip=no + fi + +-if enabled optimize; then +- if test -n "`$cc -v 2>&1 | grep xlc`"; then +- add_cflags "-O5" +- add_ldflags "-O5" +- else +- add_cflags "-O3" +- fi +-fi +- + ################################################# + # check for locales (optional) + ################################################# diff --git a/media-video/ushare/files/ushare.conf.d b/media-video/ushare/files/ushare.conf.d new file mode 100644 index 00000000000..4779c0f2e2f --- /dev/null +++ b/media-video/ushare/files/ushare.conf.d @@ -0,0 +1,38 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# User to run ushare daemon (if none, root will be used) +USHARE_USER="ushare" + +# UPNP Friendly Name: +USHARE_NAME="uShare" + +# The interface to bind to: +USHARE_IFACE="eth0" + +# Static ushare port: +USHARE_PORT="" + +# Enable/Disable telnet: +USHARE_TELNET="yes" + +# Choose different telnet port: +USHARE_TELNET_PORT="" + +# Enable/Disable web component: +USHARE_WEB="yes" + +# A List of directories to share, each precieded by '-c': +USHARE_DIRS="" + +# Enable/Disable XboX 360 compliant profile: +USHARE_XBOX="no" + +# Enable/Disable DLNA compliant profile (Playstation3 requires this): +USHARE_DLNA="no" + +# Misc. options: +USHARE_OPTS="" + +# Check ushare --help or man ushare for more options. diff --git a/media-video/ushare/files/ushare.init.d b/media-video/ushare/files/ushare.init.d new file mode 100644 index 00000000000..157a1e35884 --- /dev/null +++ b/media-video/ushare/files/ushare.init.d @@ -0,0 +1,79 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use net +} + +start() { + ebegin "Starting uShare" + + # Sanity check to avoid ushare failling on booting with no + # shared dirs + if [[ -z "${USHARE_DIRS}" ]] ; then + eerror "Please set shared dirs in /etc/conf.d/ushare" + return 1 + fi + + if [[ -z "${USHARE_PORT}" ]] ; then + einfo "${USHARE_NAME} runs on a dynamic port" + local ushare_port= + else + local ushare_port="--port ${USHARE_PORT}" + einfo "${USHARE_NAME} using port ${USHARE_PORT}" + fi + + if [[ "${USHARE_TELNET}" == "yes" ]] ; then + local ushare_telnet= + else + local ushare_telnet="--no-telnet" + fi + + if [[ -z "${ushare_telnet}" ]] ; then + if [[ -z "${USHARE_TELNET_PORT}" ]] ; then + local ushare_telnet_port= + einfo "${USHARE_NAME} runs telnet on the default port" + else + local ushare_telnet_port="--telnet-port ${USHARE_TELNET_PORT}" + einfo "${USHARE_NAME} runs telnet on port ${USHARE_TELNET_PORT}" + fi + else + local ushare_telnet_port= + fi + + if [[ "${USHARE_WEB}" == "yes" ]] ; then + local ushare_web= + else + local ushare_web="--no-web" + fi + + if [[ "${USHARE_XBOX}" == "yes" ]] ; then + local ushare_xbox="--xbox" + else + local ushare_xbox= + fi + + if [[ "${USHARE_DLNA}" == "yes" ]] ; then + local ushare_dlna="--dlna" + else + local ushare_dlna= + fi + + start-stop-daemon --start --quiet -u ${USHARE_USER:-root} \ + --exec /usr/bin/ushare -- -D -i ${USHARE_IFACE} \ + -n ${USHARE_NAME} ${USHARE_OPTS} ${USHARE_DIRS} \ + ${ushare_port} \ + ${ushare_telnet} ${ushare_telnet_port} \ + ${ushare_web} \ + ${ushare_xbox} \ + ${ushare_dlna} + eend $? +} + +stop() { + ebegin "Stopping uShare" + start-stop-daemon --stop --quiet --exec /usr/bin/ushare + eend $? +} diff --git a/media-video/ushare/files/ushare.init.d.ng b/media-video/ushare/files/ushare.init.d.ng new file mode 100644 index 00000000000..5349c4bb353 --- /dev/null +++ b/media-video/ushare/files/ushare.init.d.ng @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use net +} + +start() { + ebegin "Starting uShare" + + if [ ! -f /etc/ushare.conf -a -f /etc/conf.d/ushare ]; then + ewarn "Please migrate your settings from" + ewarn "/etc/conf.d/ushare to the new /etc/ushare.conf file" + ewarn "and then delete the /etc/conf.d/ushare file." + eerror "User migration steps are needed!" + fi + + if [ -f /etc/ushare.conf -a -f /etc/conf.d/ushare ]; then + ewarn "Old configuration file /etc/conf.d/ushare detected!" + ewarn "Please migrate your settings to the new /etc/ushare.conf file" + ewarn "and then delete the old one." + eerror "User migration steps are needed!" + fi + + start-stop-daemon --start --quiet -u ushare \ + --exec /usr/bin/ushare -- -D --cfg=/etc/ushare.conf + eend $? +} + +stop() { + ebegin "Stopping uShare" + start-stop-daemon --stop --quiet --exec /usr/bin/ushare + eend $? +} diff --git a/media-video/ushare/files/ushare.service b/media-video/ushare/files/ushare.service new file mode 100644 index 00000000000..a1ea1080fce --- /dev/null +++ b/media-video/ushare/files/ushare.service @@ -0,0 +1,11 @@ +[Unit] +Description=Ushare Media Server +Requires=network.target + +[Service] +Type=forking +User=ushare +ExecStart=/usr/bin/ushare -D --cfg=/etc/ushare.conf + +[Install] +WantedBy=multi-user.target diff --git a/media-video/ushare/metadata.xml b/media-video/ushare/metadata.xml new file mode 100644 index 00000000000..b5ccf28b8d5 --- /dev/null +++ b/media-video/ushare/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>hwoarang@gentoo.org</email> + <name>Markos Chandras</name> +</maintainer> +<use> + <flag name='dlna'>Add DLNA (<pkg>media-libs/libdlna</pkg>) support</flag> +</use> +</pkgmetadata> diff --git a/media-video/ushare/ushare-1.1a-r5.ebuild b/media-video/ushare/ushare-1.1a-r5.ebuild new file mode 100644 index 00000000000..3c9ec8e5565 --- /dev/null +++ b/media-video/ushare/ushare-1.1a-r5.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +inherit eutils multilib readme.gentoo toolchain-funcs user + +DESCRIPTION="uShare is a UPnP (TM) A/V & DLNA Media Server" +HOMEPAGE="http://ushare.geexbox.org/" +SRC_URI="http://ushare.geexbox.org/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="dlna nls" + +RDEPEND=">=net-libs/libupnp-1.6.14 + dlna? ( >=media-libs/libdlna-0.2.4 )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_prepare() { + EPATCH_SOURCE="${FILESDIR}" EPATCH_SUFFIX="patch" \ + EPATCH_OPTS="-p1" epatch + + DOC_CONTENTS="Please edit /etc/conf.d/ushare to set the shared directories + and other important settings. Check system log if ushare is + not booting." +} + +src_configure() { + local myconf + myconf="--prefix=/usr --disable-sysconf --disable-strip $(use_enable dlna)" + # nls can only be disabled, on by default. + use nls || myconf="${myconf} --disable-nls" + + # I can't use econf + # --host is not implemented in ./configure file + tc-export CC CXX + + ./configure ${myconf} || die "./configure failed" +} + +src_install() { + emake DESTDIR="${D}" install + doman src/ushare.1 + newconfd "${FILESDIR}"/ushare.conf.d ushare + newinitd "${FILESDIR}"/ushare.init.d ushare + dodoc NEWS README TODO THANKS AUTHORS + readme.gentoo_create_doc +} + +pkg_postinst() { + enewuser ushare + readme.gentoo_print_elog +} diff --git a/media-video/ushare/ushare-1.1a-r6.ebuild b/media-video/ushare/ushare-1.1a-r6.ebuild new file mode 100644 index 00000000000..52f57dbc023 --- /dev/null +++ b/media-video/ushare/ushare-1.1a-r6.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +inherit eutils multilib readme.gentoo toolchain-funcs user systemd + +DESCRIPTION="uShare is a UPnP (TM) A/V & DLNA Media Server" +HOMEPAGE="http://ushare.geexbox.org/" +SRC_URI="http://ushare.geexbox.org/releases/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="dlna nls" + +RDEPEND=">=net-libs/libupnp-1.6.14 + dlna? ( >=media-libs/libdlna-0.2.4 )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_prepare() { + EPATCH_EXCLUDE="06_all_ushare_disable_sysconf.patch" + EPATCH_SOURCE="${FILESDIR}" EPATCH_SUFFIX="patch" \ + EPATCH_OPTS="-p1" epatch + + DOC_CONTENTS="Please edit /etc/ushare.conf to set the shared directories + and other important settings. Check system log if ushare is + not booting." +} + +src_configure() { + local myconf + myconf="--prefix=/usr --sysconfdir=/etc --disable-strip $(use_enable dlna)" + # nls can only be disabled, on by default. + use nls || myconf="${myconf} --disable-nls" + + # I can't use econf + # --host is not implemented in ./configure file + tc-export CC CXX + + ./configure ${myconf} || die "./configure failed" +} + +src_install() { + emake DESTDIR="${D}" install + doman src/ushare.1 + newconfd "${FILESDIR}"/${PN}.conf.d ${PN} + newinitd "${FILESDIR}"/${PN}.init.d.ng ${PN} + dodoc NEWS README TODO THANKS AUTHORS + systemd_dounit "${FILESDIR}"/${PN}.service + readme.gentoo_create_doc +} + +pkg_postinst() { + enewuser ushare + readme.gentoo_print_elog + elog + elog "The config file has been moved to /etc/ushare.conf" + elog "Please migrate your settings from /etc/conf.d/ushare" + elog "to /etc/ushare.conf in order to use the ushare init script" + elog "and systemd unit service." + elog +} |