From cb96188c1ec67650c88d6f184aa4043ae5420edf Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 20 Aug 2017 22:26:13 +0200 Subject: add new PKG_NEEDS variable data, fix logitechmediaserver package --- adk/tools/pkgmaker.c | 2 + package/kodi/Makefile | 2 +- package/logitechmediaserver/Makefile | 9 +- .../files/logitechmediaserver.init | 5 +- .../files/logitechmediaserver.postinst | 2 +- .../patches/patch-Slim_Utils_OS_Linux_pm | 6 +- .../logitechmediaserver/patches/patch-modules_conf | 11 +++ .../src/Slim/Utils/OS/OpenADK.pm | 100 --------------------- package/mpd/Makefile | 2 +- target/arm/Makefile | 2 +- target/config/Config.in.runtime | 8 +- 11 files changed, 35 insertions(+), 114 deletions(-) create mode 100644 package/logitechmediaserver/patches/patch-modules_conf delete mode 100644 package/logitechmediaserver/src/Slim/Utils/OS/OpenADK.pm diff --git a/adk/tools/pkgmaker.c b/adk/tools/pkgmaker.c index 8ab121234..ca5dbfa2c 100644 --- a/adk/tools/pkgmaker.c +++ b/adk/tools/pkgmaker.c @@ -917,6 +917,8 @@ int main() { fprintf(cfg, "\tselect ADK_TARGET_LIBC_WITH_LOCALE if ADK_TARGET_LIB_UCLIBC_NG\n"); if (strncmp(token, "threads", 7) == 0) fprintf(cfg, "\tselect ADK_TARGET_LIB_WITH_THREADS\n"); + if (strncmp(token, "data", 4) == 0) + fprintf(cfg, "\tselect ADK_RUNTIME_DATA_PARTITION\n"); if (strncmp(token, "mmu", 3) == 0) fprintf(cfg, "\tdepends on ADK_TARGET_WITH_MMU\n"); token = strtok(NULL, " "); diff --git a/package/kodi/Makefile b/package/kodi/Makefile index c3f3513b6..9e6ea5366 100644 --- a/package/kodi/Makefile +++ b/package/kodi/Makefile @@ -28,7 +28,7 @@ PKG_BUILDDEP+= libgpg-error libvorbis PKG_BUILDDEP+= swig-host liblzo-host libpng-host libjpeg-turbo-host PKG_BUILDDEP+= zip-host unzip-host giflib-host libsquish libdcadec PKG_BUILDDEP+= libcrossguid libressl xz bzip2 liblzo -PKG_NEEDS:= threads c++ iconv +PKG_NEEDS:= threads c++ iconv data PKG_URL:= http://kodi.tv/ PKG_SITES:= https://github.com/xbmc/xbmc/archive/ diff --git a/package/logitechmediaserver/Makefile b/package/logitechmediaserver/Makefile index cced75621..68af0ad3a 100644 --- a/package/logitechmediaserver/Makefile +++ b/package/logitechmediaserver/Makefile @@ -10,6 +10,7 @@ PKG_RELEASE:= 1 PKG_HASH:= dfc803d31129ef55e3bbd1db34349d7ac31bbc261fcdb78246c895dcbbb4bf2d PKG_DESCR:= popular media server PKG_SECTION:= mm/audio +PKG_NEEDS:= data PKG_DEPENDS:= perl p5-xml-parser p5-dbi p5-ev p5-html-parser PKG_DEPENDS+= p5-json-xs p5-digest-sha1 p5-yaml-xs p5-sub-name PKG_DEPENDS+= p5-xml-parser-expat p5-common-sense @@ -37,16 +38,18 @@ post-extract: rm -rf ${WRKBUILD}/CPAN/HTML* rm -rf ${WRKBUILD}/CPAN/DBI/ rm -rf ${WRKBUILD}/CPAN/DBI.pm + rm -rf ${WRKBUILD}/CPAN/EV.pm rm -rf ${WRKBUILD}/CPAN/IO/Interface* rm -rf ${WRKBUILD}/CPAN/JSON/XS.pm + rm -rf ${WRKBUILD}/CPAN/Image/ logitechmediaserver-install: $(INSTALL_DIR) $(IDIR_LOGITECHMEDIASERVER)/opt/lms $(CP) $(WRKSRC)/* $(IDIR_LOGITECHMEDIASERVER)/opt/lms @find $(IDIR_LOGITECHMEDIASERVER)/opt/lms -type f -exec chmod 644 {} \; @find $(IDIR_LOGITECHMEDIASERVER)/opt/lms -type d -exec chmod 755 {} \; - $(INSTALL_DIR) $(IDIR_LOGITECHMEDIASERVER)/opt/lms/prefs/plugin - $(INSTALL_DIR) $(IDIR_LOGITECHMEDIASERVER)/opt/lms/Logs - $(INSTALL_DIR) $(IDIR_LOGITECHMEDIASERVER)/opt/lms/Cache + ln -sf ../../data/lms/prefs $(IDIR_LOGITECHMEDIASERVER)/opt/lms/prefs + ln -sf ../../data/lms/Logs $(IDIR_LOGITECHMEDIASERVER)/opt/lms/Logs + ln -sf ../../data/lms/Cache $(IDIR_LOGITECHMEDIASERVER)/opt/lms/Cache include ${ADK_TOPDIR}/mk/pkg-bottom.mk diff --git a/package/logitechmediaserver/files/logitechmediaserver.init b/package/logitechmediaserver/files/logitechmediaserver.init index 267c88bb9..15b5c8df0 100644 --- a/package/logitechmediaserver/files/logitechmediaserver.init +++ b/package/logitechmediaserver/files/logitechmediaserver.init @@ -12,8 +12,9 @@ autostart) exec sh $0 start ;; start) - chown -R squeezeboxserver /opt/lms/prefs /opt/lms/Logs /opt/lms/Cache - perl /opt/lms/slimserver.pl + mkdir -p /data/lms/Cache /data/lms/Logs /data/lms/prefs + chown -R squeezeboxserver /data/lms + su squeezeboxserver -c 'perl /opt/lms/slimserver.pl --daemon' ;; stop) ;; diff --git a/package/logitechmediaserver/files/logitechmediaserver.postinst b/package/logitechmediaserver/files/logitechmediaserver.postinst index f2a322e79..577f4c461 100644 --- a/package/logitechmediaserver/files/logitechmediaserver.postinst +++ b/package/logitechmediaserver/files/logitechmediaserver.postinst @@ -3,4 +3,4 @@ add_rcconf logitechmediaserver NO gid=$(get_next_gid) add_group squeezeboxserver $gid -add_user squeezeboxserver $(get_next_uid) $gid /opt/lms +add_user squeezeboxserver $(get_next_uid) $gid /opt/lms /bin/sh diff --git a/package/logitechmediaserver/patches/patch-Slim_Utils_OS_Linux_pm b/package/logitechmediaserver/patches/patch-Slim_Utils_OS_Linux_pm index 6561fe08c..39d9a53a6 100644 --- a/package/logitechmediaserver/patches/patch-Slim_Utils_OS_Linux_pm +++ b/package/logitechmediaserver/patches/patch-Slim_Utils_OS_Linux_pm @@ -1,6 +1,6 @@ ---- logitechmediaserver-7.9.0-1418119409-noCPAN.orig/Slim/Utils/OS/Linux.pm 2014-12-08 22:00:23.000000000 -0600 -+++ logitechmediaserver-7.9.0-1418119409-noCPAN/Slim/Utils/OS/Linux.pm 2014-12-13 02:11:35.032418001 -0600 -@@ -27,6 +27,10 @@ sub getFlavor { +--- logitechmediaserver-7.9.1-1502887423-noCPAN.orig/Slim/Utils/OS/Linux.pm 2017-08-09 10:50:44.000000000 +0200 ++++ logitechmediaserver-7.9.1-1502887423-noCPAN/Slim/Utils/OS/Linux.pm 2017-08-17 20:44:24.015911172 +0200 +@@ -47,6 +47,10 @@ sub getFlavor { return 'Netgear RAIDiator'; diff --git a/package/logitechmediaserver/patches/patch-modules_conf b/package/logitechmediaserver/patches/patch-modules_conf new file mode 100644 index 000000000..142f77017 --- /dev/null +++ b/package/logitechmediaserver/patches/patch-modules_conf @@ -0,0 +1,11 @@ +--- logitechmediaserver-7.9.1-1502887423-noCPAN.orig/modules.conf 2017-08-09 10:50:44.000000000 +0200 ++++ logitechmediaserver-7.9.1-1502887423-noCPAN/modules.conf 2017-08-20 13:14:25.110813899 +0200 +@@ -20,7 +20,7 @@ File::Temp 0.17 + File::Which 0.05 + HTML::Entities 3.68 + HTML::Parser 3.68 +-Image::Scale 0.08 ++Image::Scale 0.08 0.13 + IO::String 1.07 + JSON::XS 2.3 + JSON::XS::VersionOneAndTwo 0.31 diff --git a/package/logitechmediaserver/src/Slim/Utils/OS/OpenADK.pm b/package/logitechmediaserver/src/Slim/Utils/OS/OpenADK.pm deleted file mode 100644 index d82807b05..000000000 --- a/package/logitechmediaserver/src/Slim/Utils/OS/OpenADK.pm +++ /dev/null @@ -1,100 +0,0 @@ -package Slim::Utils::OS::OpenADK; - -# Logitech Media Server Copyright 2001-2011 Logitech. -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License, -# version 2. - -use strict; -use FindBin qw($Bin); - -use base qw(Slim::Utils::OS::Linux); - -sub initDetails { - my $class = shift; - - $class->{osDetails} = $class->SUPER::initDetails(); - - # package specific addition to @INC to cater for plugin locations - $class->{osDetails}->{isDebian} = 1 ; - - unshift @INC, '/usr/share/logitechmediaserver'; - unshift @INC, '/usr/share/logitechmediaserver/CPAN'; - - return $class->{osDetails}; -} - -=head2 dirsFor( $dir ) - -Return OS Specific directories. - -Argument $dir is a string to indicate which of the server directories we -need information for. - -=cut - -sub dirsFor { - my ($class, $dir) = @_; - - my @dirs = (); - - if ($dir =~ /^(?:oldprefs|updates)$/) { - - push @dirs, $class->SUPER::dirsFor($dir); - - } elsif ($dir =~ /^(?:Firmware|Graphics|HTML|IR|MySQL|SQL|lib|Bin)$/) { - - push @dirs, "/usr/share/logitechmediaserver/$dir"; - - } elsif ($dir eq 'Plugins') { - - push @dirs, $class->SUPER::dirsFor($dir); - push @dirs, "/usr/share/perl5/Slim/Plugin", "/usr/share/logitechmediaserver/Plugins"; - - } elsif ($dir =~ /^(?:strings|revision)$/) { - - push @dirs, "/usr/share/logitechmediaserver"; - - } elsif ($dir eq 'libpath') { - - push @dirs, "/usr/share/logitechmediaserver"; - - } elsif ($dir =~ /^(?:types|convert)$/) { - - push @dirs, "/etc/logitechmediaserver"; - - } elsif ($dir =~ /^(?:prefs)$/) { - - push @dirs, $::prefsdir || "/var/lib/logitechmediaserver/prefs"; - - } elsif ($dir eq 'log') { - - push @dirs, $::logdir || "/var/log/logitechmediaserver"; - - } elsif ($dir eq 'cache') { - - push @dirs, $::cachedir || "/var/lib/logitechmediaserver/cache"; - - } elsif ($dir =~ /^(?:music|playlists)$/) { - - push @dirs, ''; - - } else { - - warn "dirsFor: Didn't find a match request: [$dir]\n"; - } - - return wantarray() ? @dirs : $dirs[0]; -} - -# Bug 9488, always decode on Ubuntu/Debian -sub decodeExternalHelperPath { - return Slim::Utils::Unicode::utf8decode_locale($_[1]); -} - -sub scanner { - return '/usr/sbin/logitechmediaserver-scanner'; -} - - -1; diff --git a/package/mpd/Makefile b/package/mpd/Makefile index 5cec776c3..34249bf46 100644 --- a/package/mpd/Makefile +++ b/package/mpd/Makefile @@ -12,7 +12,7 @@ PKG_SECTION:= mm/audio PKG_DEPENDS:= libmpdclient boost libncurses libexpat PKG_BUILDDEP:= libmpdclient boost ncurses expat PKG_FDEPENDS:= libmpdclient -PKG_NEEDS:= threads c++ +PKG_NEEDS:= threads c++ data PKG_URL:= http://www.musicpd.org/ PKG_SITES:= http://www.musicpd.org/download/mpd/0.20/ diff --git a/target/arm/Makefile b/target/arm/Makefile index 4e600888f..783bb3040 100644 --- a/target/arm/Makefile +++ b/target/arm/Makefile @@ -61,7 +61,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM_VEXPRESS_A9)$(ADK_TARGET_SYSTEM_QEMU_ARM_VERS @echo 'qemu-system-${ADK_TARGET_CPU_ARCH} ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${ADK_TARGET_CPU_ARCH}.img' endif ifeq ($(ADK_TARGET_BOARD_BCM28XX)$(ADK_TARGET_SYSTEM_SOLIDRUN_IMX6)$(ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG),y) -ifeq ($(ADK_APPLIANCE_KODI),y) +ifeq ($(ADK_RUNTIME_DATA_PARTITION),y) @echo "Use following command to install with a writable data partition" @echo "sudo ./scripts/install.sh -d 256 $(ADK_TARGET_SYSTEM) /dev/sdX $(FW_DIR)/$(ROOTFSTARBALL)" @echo "If you want to update a card without loosing existing data on the writable partition use:" diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime index 9dd20d971..03daaa24f 100644 --- a/target/config/Config.in.runtime +++ b/target/config/Config.in.runtime @@ -1,6 +1,9 @@ # This file is part of the OpenADK project. OpenADK is copyrighted # material, please see the LICENCE file in the top-level directory. +config ADK_RUNTIME_DATA_PARTITION + bool + config ADK_RUNTIME_HOSTNAME string "hostname for the embedded system" default "openadk" @@ -202,8 +205,9 @@ config ADK_RUNTIME_TIMEZONE config ADK_RUNTIME_DEFAULT_LOCALE string "default locale" - depends on ADK_TARGET_LIBC_WITH_LOCALE - default "de_DE" + depends on ADK_TARGET_LIBC_WITH_LOCALE \ + || ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_MUSL + default "C.UTF-8" help Locale to be set in the target system as default. -- cgit v1.2.3