Browse Source

- ushare: bunmp version to 1.2

master
vanhofen 3 years ago
parent
commit
359984216f
  1. 56
      package/ushare/patches/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
  2. 15
      package/ushare/patches/ushare-disable-iconv-check.patch
  3. 49
      package/ushare/patches/ushare-fix-building-with-gcc-5.x.patch
  4. 475
      package/ushare/patches/ushare.patch
  5. 52
      package/ushare/ushare.mk

56
package/ushare/patches/0001-Don-t-build-po-files-if-NLS-is-disabled.patch

@ -0,0 +1,56 @@
From c9f5783bb2df4a19c6281daeda30e8ab905d2ca3 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 22 Aug 2021 10:44:48 +0200
Subject: [PATCH] Don't build po files if NLS is disabled
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream status: https://github.com/ddugovic/uShare/pull/12]
---
Makefile | 7 +++++--
configure | 3 +++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index ebd8f91..6686cfd 100644
--- a/Makefile
+++ b/Makefile
@@ -14,10 +14,13 @@ EXTRADIST = AUTHORS \
THANKS \
TODO \
-SUBDIRS = po \
- scripts \
+SUBDIRS = scripts \
src \
+ifeq ($(NLS),yes)
+SUBDIRS += po
+endif
+
all:
for subdir in $(SUBDIRS); do \
$(MAKE) -C $$subdir $@; \
diff --git a/configure b/configure
index 4a3efe0..f48806a 100755
--- a/configure
+++ b/configure
@@ -414,6 +414,8 @@ for opt do
;;
--with-libdlna-dir=*) libdlnadir="$optval";
;;
+ --enable-nls) nls="yes"
+ ;;
--disable-nls) nls="no"
;;
--enable-dlna) dlna="yes"
@@ -723,6 +725,7 @@ append_config "LDFLAGS=$LDFLAGS"
append_config "INSTALL=$INSTALL"
append_config "DEBUG=$debug"
+append_config "NLS=$nls"
echolog "Creating $CONFIG_H ..."
--
2.32.0

15
package/ushare/patches/ushare-disable-iconv-check.patch

@ -1,15 +0,0 @@
diff --git a/configure b/configure
index ef8fb4e..609ea82 100755
--- a/configure
+++ b/configure
@@ -659,8 +659,8 @@ check_lib langinfo.h nl_langinfo "" && add_cflags -DHAVE_LANGINFO_CODESET
#################################################
# check for iconv (optional)
#################################################
-echolog "Checking for iconv ..."
-check_lib iconv.h iconv "" && add_cflags -DHAVE_ICONV
+#echolog "Checking for iconv ..."
+#check_lib iconv.h iconv "" && add_cflags -DHAVE_ICONV
#################################################
# check for libupnp and friends (mandatory)

49
package/ushare/patches/ushare-fix-building-with-gcc-5.x.patch

@ -1,49 +0,0 @@
From 6abc52190accc8d8b17455420e234a1d7dc7ba55 Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter@korsgaard.com>
Date: Mon, 16 Nov 2015 23:15:27 +0100
Subject: [PATCH] ushare: fix building with gcc 5.x
GCC5 defaults to -std=gnu11, which has different semantics for inline than
previous versions:
https://gcc.gnu.org/gcc-5/porting_to.html
Which causes linker issues when display_headers() and start_log() are
referenced from other files. There's no real reason why these needs to be
inline, so just drop the keyword.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
src/trace.c | 2 +-
src/ushare.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/trace.c b/src/trace.c
index 50729ef..4e314ef 100644
--- a/src/trace.c
+++ b/src/trace.c
@@ -57,7 +57,7 @@ print_log (log_level level, const char *format, ...)
va_end (va);
}
-inline void
+void
start_log (void)
{
openlog (PACKAGE_NAME, LOG_PID, LOG_DAEMON);
diff --git a/src/ushare.c b/src/ushare.c
index b64451e..af46e78 100644
--- a/src/ushare.c
+++ b/src/ushare.c
@@ -496,7 +496,7 @@ reload_config (int s __attribute__ ((unused)))
}
}
-inline void
+void
display_headers (void)
{
printf (_("%s (version %s), a lightweight UPnP A/V and DLNA Media Server.\n"),
--
2.1.4

475
package/ushare/patches/ushare.patch

@ -1,475 +0,0 @@
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/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/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 -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 -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 -Naur ushare-1.1a/scripts/ushare.conf ushare-1.1a_/scripts/ushare.conf
--- ushare-1.1a/scripts/ushare.conf 2007-12-09 14:03:36.000000000 +0100
+++ ushare-1.1a_/scripts/ushare.conf 2012-07-05 09:35:00.000000000 +0200
@@ -2,11 +2,11 @@
# Configuration file for uShare
# uShare UPnP Friendly Name (default is 'uShare').
-USHARE_NAME=
+USHARE_NAME=coolstream
# Interface to listen to (default is eth0).
# Ex : USHARE_IFACE=eth1
-USHARE_IFACE=
+USHARE_IFACE=eth0
# Port to listen to (default is random from IANA Dynamic Ports range)
# Ex : USHARE_PORT=49200
@@ -18,7 +18,7 @@
# Directories to be shared (space or CSV list).
# Ex: USHARE_DIR=/dir1,/dir2
-USHARE_DIR=
+USHARE_DIR=/media/sda1,media/sdb1
# Use to override what happens when iconv fails to parse a file name.
# The default uShare behaviour is to not add the entry in the media list
@@ -28,7 +28,7 @@
# as is. (Umlauts for all!)
#
# Options are TRUE/YES/1 for override and anything else for default behaviour
-USHARE_OVERRIDE_ICONV_ERR=
+USHARE_OVERRIDE_ICONV_ERR=yes
# Enable Web interface (yes/no)
ENABLE_WEB=

52
package/ushare/ushare.mk

@ -4,36 +4,52 @@
#
################################################################################
USHARE_VERSION = 1.1a
USHARE_DIR = ushare-uShare_v$(USHARE_VERSION)
USHARE_VERSION = 2.1
USHARE_DIR = uShare-$(USHARE_VERSION)
USHARE_SOURCE = uShare_v$(USHARE_VERSION).tar.gz
USHARE_SITE = https://github.com/GeeXboX/ushare/archive
$(DL_DIR)/$(USHARE_SOURCE):
$(download) $(USHARE_SITE)/$(USHARE_SOURCE)
USHARE_SITE = $(call github,ddugovic,uShare,v$(USHARE_VERSION))
USHARE_DEPENDENCIES = libupnp
USHARE_CONF_OPTS = \
--prefix=$(prefix) \
--sysconfdir=$(sysconfdir) \
--sysconfdir=$(REMOVE_sysconfdir) \
--disable-dlna \
--disable-nls \
--disable-strip \
--cross-compile \
--cross-prefix=$(TARGET_CROSS)
ushare: $(USHARE_DEPENDENCIES) $(DL_DIR)/$(USHARE_SOURCE) | $(TARGET_DIR)
$(REMOVE)/$(PKG_DIR)
$(UNTAR)/$(PKG_SOURCE)
$(call APPLY_PATCHES,$(PKG_PATCHES_DIR))
$(CHDIR)/$(PKG_DIR); \
$(TARGET_CONFIGURE_ENV) ./configure $($(PKG)_CONF_OPTS); \
ln -sf ../config.h src/; \
$(MAKE); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
USHARE_MAKE_OPTS = \
LDFLAGS="$(TARGET_LDFLAGS)"
define USHARE_LINK_CONFIG_H
ln -sf ../config.h $(PKG_BUILD_DIR)/src/
endef
USHARE_POST_PATCH_HOOKS += USHARE_LINK_CONFIG_H
define USHARE_INSTALL_CONF
$(INSTALL_DATA) -D $(PKG_FILES_DIR)/ushare.conf $(TARGET_sysconfdir)/ushare.conf
$(SED) 's|%(BOXTYPE)|$(BOXTYPE)|; s|%(BOXMODEL)|$(BOXMODEL)|' $(TARGET_sysconfdir)/ushare.conf
endef
USHARE_TARGET_FINALIZE_HOOKS += USHARE_INSTALL_CONF
define USHARE_INSTALL_INIT_SCRIPT
$(INSTALL_EXEC) -D $(PKG_FILES_DIR)/ushare.init $(TARGET_sysconfdir)/init.d/ushare
$(UPDATE-RC.D) ushare defaults 75 25
$(REMOVE)/$(PKG_DIR)
$(TOUCH)
endef
USHARE_TARGET_FINALIZE_HOOKS += USHARE_INSTALL_INIT_SCRIPT
ushare: | $(TARGET_DIR)
$(call DEPENDENCIES)
$(call DOWNLOAD,$($(PKG)_SOURCE))
$(call STARTUP)
$(call EXTRACT,$(BUILD_DIR))
$(call APPLY_PATCHES,$(PKG_PATCHES_DIR))
$(CHDIR)/$($(PKG)_DIR); \
$(TARGET_CONFIGURE_ENV) \
./configure $($(PKG)_CONF_OPTS); \
$(TARGET_MAKE_ENV) \
$(MAKE) $($(PKG)_MAKE_OPTS); \
$(MAKE) install DESTDIR=$(TARGET_DIR)
$(call TARGET_FOLLOWUP)

Loading…
Cancel
Save