add Logitech Media Server

This commit is contained in:
Jörg Deckert 2020-11-07 16:39:18 +01:00
parent 4d24b47154
commit fa9f268a21
13 changed files with 471 additions and 0 deletions

View File

@ -0,0 +1,2 @@
DIST libmediascan-20190401.tar.gz 37496355 BLAKE2B 744bdbd612e7e9d17ff975957c26e280188d2154c9a8366106ee04cc95f264358d85eecd413eb411e18b3acce0fadddb103436cac932826eab35c9457136acf3 SHA512 6de1e38221361aca7fc676611efc9276e629a9519bc4addae9802199a19d50bf893a5375fedff6e2ad9b8546237d6f74b81005101424529fdfabe2894df29ad4
EBUILD Media-Scan-20190401.ebuild 692 BLAKE2B c36cb4ba4010912428b1861a5b7fbdc1ca12952179ca430d7129acfe769bafa8cb07d1e2a888393cd91253bfe4457011fac5fa7d24206896752c2304f7e6e4e0 SHA512 815aba46c6ad3272861b50aad31a7f02c11d9a1e7419e5b0ca6324b6cf07b41bf0d78bb3f0a83828cf6f0863a177b429d8638ca2a887068672b887e9bfdc2a62

View File

@ -0,0 +1,25 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
COMMIT="9fc5afde68a6b95ab10caa0305a63252f53f16c0"
inherit perl-module
DESCRIPTION="C library for scanning audio/video/image file metadata"
HOMEPAGE="https://github.com/andygrundman/libmediascan"
SRC_URI="https://github.com/andygrundman/libmediascan/archive/${COMMIT}.tar.gz -> libmediascan-${PV}.tar.gz"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x64-macos"
IUSE="doc"
DEPEND="media-libs/libmediascan"
RDEPEND=""
S=${WORKDIR}/libmediascan-${COMMIT}/bindings/perl
src_configure() {
myconf="--with-lms-includes=/usr/include/libmediascan"
perl-module_src_configure
}

View File

@ -0,0 +1,2 @@
DIST libmediascan-20190401.tar.gz 37496355 BLAKE2B 744bdbd612e7e9d17ff975957c26e280188d2154c9a8366106ee04cc95f264358d85eecd413eb411e18b3acce0fadddb103436cac932826eab35c9457136acf3 SHA512 6de1e38221361aca7fc676611efc9276e629a9519bc4addae9802199a19d50bf893a5375fedff6e2ad9b8546237d6f74b81005101424529fdfabe2894df29ad4
EBUILD libmediascan-20190401.ebuild 821 BLAKE2B 6779adfaf62435e995659212f5bb4119e4c4285606a819eace06db614fc5a0839c8b33e45324f6fd83f90cf79f5761974d542e4712489dff7aff9c4a74cb4e09 SHA512 2e722ecb98e518f3f5d5c87205eff98f18eaf96f191c19b9550546cb7bf6aa4316dde95899dc8431c27e732fe0087ae2da6b3bca7abebe9fef815f6b569b2ec2

View File

@ -0,0 +1,35 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
WANT_AUTOMAKE=1.15
COMMIT="9fc5afde68a6b95ab10caa0305a63252f53f16c0"
inherit autotools
DESCRIPTION="C library for scanning audio/video/image file metadata"
HOMEPAGE="https://github.com/andygrundman/libmediascan"
SRC_URI="https://github.com/andygrundman/libmediascan/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x64-macos"
IUSE="doc"
DEPEND="media-video/ffmpeg
media-libs/giflib
media-libs/libjpeg-turbo
media-libs/libpng
media-libs/libexif"
RDEPEND=""
S=${WORKDIR}/${PN}-${COMMIT}
src_prepare() {
default
eautoreconf
eautomake --add-missing
}
src_install() {
emake DESTDIR="${D}" includedir=/usr/include/${PN} install
}

View File

@ -0,0 +1,8 @@
AUX Gentoo-plugins-README.txt 760 BLAKE2B 92275e9113faee502b4f7f958c11c7953308dffa7e37b0d115d5531e9855c3e3ae7edfb7ab8e18a8831cf68db67d8d66b0aedc11e5ba51dbd89e0849ff99c780 SHA512 734a148fd40ed896cde88b7b420328adeec9ccc3ecefff0d57272ac51e8fbd3221e320c8b69dec4ef94dd153b3abc2fbdef1b4ff15927c11aafcd5819987e078
AUX gentoo-filepaths.pm 2059 BLAKE2B 34fa46b5b476b4a5919173edb93db2a474c5dae6f552e7db319ae1f1a9838dce87e73b475e15b8f4f7c3c37db73996c290a6504e7f5f5b755414837ef528638f SHA512 6160ae9d3b5413b77373980c367292b5d07312b6e12389e66defc89c77acc54e143b4ca1599abf22c2403aae6a20146a46c4d5b99deff9e1210b31556bcd8f54
AUX logitechmediaserver.conf.d 59 BLAKE2B 92c3f518df15b81d27fcc76318cbed2f6901ce08dafd660915971a473258b7daa659427a5270be98f7b0cb3d1f2fa9e0891dfd34806d7a36c69996a1c7d3de3a SHA512 e1852833d88558a1beceb8ab060e829773d16fa74320cc3ba17cca9919cc834028a4c37b31cb16d2dc3ab06691d41e035f83d65f78b0a34c1df8fc31861b991a
AUX logitechmediaserver.init.d 892 BLAKE2B efc3a006ec656994cb5e30868dcab0881bdde6c5c75deb8723e2259b5d906d698d3f8471f89bd597c625e927f1688471c6735ae073ce926bc67f32296cbe637a SHA512 c0596868287aa9b67d359816dff40f31973bb8470e9fe65e2420269a901ea456746bce697d1923da47bc4c4765159c14a54a2f1474726016c0bffe3f2c389262
AUX logitechmediaserver.logrotate.d 431 BLAKE2B 30cdb5b44cd66b7637ba4ea701386c06781dff6595eb0681df87009f464f732b47b3996db09434c5f2913ec5de2a57df0198dd5d0aacc7d4b52323a0b82f023a SHA512 451f8a1c453bce39df7c1cd7df5df0030304a8a7fe8ed32b30d59d06a3ccb8e5db946c37fe38a2c61cce607f9ca6844819987965799d3ab69daa81a12c3b7adb
DIST logitechmediaserver-7.9.3-noCPAN.tgz 21296645 BLAKE2B c5c26edaa02c93b4bbfd8bda0de283f7818f019dd0e7d053a70d7d022ae1a6aa881ea50aa589716c56d2f572175ef8f5bb3cbe3015b1da0d5654a961f7d35265 SHA512 eba033238bac5fbfad2485b936f3433db3abe0dac54b5aed842ffaf57326f2bf190c5b2086868305c4ce147f702cf9bb706bd2bc4624b3d34abbdf7031dd10a1
DIST slimserver-vendor-7.9.3.tar.gz 148813270 BLAKE2B 2bae72535bec5136e36063b16e57958c64c67e5cc798c963b078ff4621a5b924f2571922169301784ea08e818309e3de58f297041291ecaeb717b7bbf31dfad9 SHA512 a63b1acd42c99ae456fdb6d3021f7fd52779f79d15361a7bcd77c8baca0b3ca6829ea77781b580cd31aa18eef9bb9a6bd12be2c1b37a14eb436ef13b46daa4fb
EBUILD logitechmediaserver-7.9.3-r1.ebuild 7397 BLAKE2B 188b44102425199032064619b337129fe551b9164145bb128e4c2e311b40512568a863fbc7206e3ea0163831ccc508db32e4eea55065bd99340e9b815f6bb085 SHA512 5e7083e0619eecdf32cce02ddc60c767c28d6ea11d0590763130b4558d6fb4e20fde728c49b0e86284a83010d0de54da1c15308cc6de42d79c1782ace94305df

View File

@ -0,0 +1,21 @@
The standard Logitech Media Server package is installed differently on Gentoo in
order that the installation complies with Gentoo's filesystem layout. These
notes are provided to give guidance for installing plugins within this
modified layout.
INSTALLING PLUGINS
The installation instructions of plugins should be followed but with the
following Gentoo specifics:
* Plugins should be installed into the directory:
/var/lib/logitechmediaserver/Plugins
* Extension binaries (which sometimes accompany plugins) should be installed
into the directory:
/usr/lib/logitechmediaserver/Bin
BACKGROUND
Those interested can refer to the following for details of Gentoo's filesystem
standard:
http://devmanual.gentoo.org/general-concepts/filesystem/index.html

View File

@ -0,0 +1,94 @@
package Slim::Utils::OS::Custom;
# Logitech Media Server Copyright 2001-2020 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}->{isGentoo} = 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, "@@SLIMPLUGINPATH@@", "/var/lib/logitechmediaserver/Plugins";
} elsif ($dir =~ /^(?:strings|revision|repositories)$/) {
push @dirs, "/usr/share/logitechmediaserver";
} elsif ($dir eq 'libpath') {
push @dirs, "/usr/lib/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|videos|pictures|playlists)$/) {
push @dirs, '';
} else {
warn "dirsFor: Didn't find a match request: [$dir]\n";
}
return wantarray() ? @dirs : $dirs[0];
}
sub scanner {
return '/usr/sbin/logitechmediaserver-scanner';
}
1;

View File

@ -0,0 +1,3 @@
# /etc/conf.d/logitechmediaserver
#LMS_OPTS="--d_startup"

View File

@ -0,0 +1,32 @@
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
description="Logitech Media Server"
LMS_USER="logitechmediaserver"
LMS_GROUP="logitechmediaserver"
serverlog="/var/log/logitechmediaserver/server.log"
scannerlog="/var/log/logitechmediaserver/scanner.log"
perfmonlog="/var/log/logitechmediaserver/perfmon.log"
command_args_background="--daemon --pidfile=/run/logitechmediaserver.pid"
command="/usr/sbin/logitechmediaserver"
command_args="
--user=$LMS_USER
--group=$LMS_GROUP
${LMS_OPTS}
"
pidfile=/run/logitechmediaserver.pid
depend() {
need localmount net
}
start_pre() {
checkpath --file --owner $LMS_USER:$LMS_GROUP --mode 0644 $serverlog
checkpath --file --owner $LMS_USER:$LMS_GROUP --mode 0644 $scannerlog
checkpath --file --owner $LMS_USER:$LMS_GROUP --mode 0644 $perfmonlog
}

View File

@ -0,0 +1,11 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezeboxserver/files/squeezeboxserver.logrotate.d,v 1.1 2009/11/25 22:52:25 lavajoe Exp $
/var/log/logitechmediaserver/scanner.log /var/log/logitechmediaserver/server.log /var/log/logitechmediaserver/perfmon.log {
missingok
notifempty
copytruncate
rotate 5
size 100k
}

View File

@ -0,0 +1,236 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/squeezeboxserver/squeezeboxserver-7.4.1.ebuild,v 1.1 2009/11/25 22:52:26 lavajoe Exp $
EAPI=5
inherit eutils perl-functions user
SLIMSERVER_VENDOR_COMMIT="aca68b8423893897a87daa718f4a8cad5e2ea18f"
DESCRIPTION="Logitech Media server"
HOMEPAGE="http://www.logitechsqueezebox.com/support/download-squeezebox-server.html"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="lame wavpack musepack alac ogg flac avahi aac"
SRC_URI="http://downloads.slimdevices.com/LogitechMediaServer_v${PV}/${P}-noCPAN.tgz
https://github.com/Logitech/slimserver-vendor/archive/${SLIMSERVER_VENDOR_COMMIT}.tar.gz -> slimserver-vendor-${PV}.tar.gz"
RUN_UID=logitechmediaserver
RUN_GID=logitechmediaserver
DEPEND=""
RDEPEND="
virtual/logger
avahi? ( net-dns/avahi )
dev-lang/perl
dev-perl/GD[jpeg,png]
dev-perl/IO-Socket-SSL
>=dev-perl/Media-Scan-20190401
lame? ( media-sound/lame )
alac? ( media-sound/alac_decoder )
wavpack? ( media-sound/wavpack )
flac? (
media-libs/flac
media-sound/sox[flac]
)
ogg? ( media-sound/sox[ogg] )
aac? ( media-libs/faad2 )
"
S="${WORKDIR}/${P}-noCPAN"
# everything from slimserver-vendor, but Media::Scan
CPANBUILD="
Audio::Scan
Class::C3::XS
Class::XSAccessor
Compress::Raw::Zlib
DBD::SQLite
Digest::SHA1
EV
Encode::Detect
HTML::Parser
Image::Scale
IO::AIO
IO::Interface
JSON::XS
Linux::Inotify2
Mac::FSEvents
MP3::Cut::Gapless
Sub::Name
Template
XML::Parser
YAML::LibYAML
"
VARLIBSBS="/var/lib/logitechmediaserver"
PREFSDIR="${VARLIBSBS}/prefs"
LIVE_PREFS="${PREFSDIR}/server.prefs"
SHAREDIR="/usr/share/logitechmediaserver"
LIBDIR="/usr/lib/logitechmediaserver"
PLUGINSDIR="${VARLIBSBS}/Plugins"
pkg_setup() {
# Create the user and group if not already present
enewgroup ${RUN_GID}
enewuser ${RUN_UID} -1 -1 "/dev/null" ${RUN_GID}
}
src_prepare() {
default
sed -e "s/foreach ('0.99', '0.93', '0.95', '0.94')/foreach ('1.02', '1.01', '0.99', '0.93', '0.95', '0.94')/" -i lib/Audio/Scan.pm
}
src_compile() {
cd ${WORKDIR}/slimserver-vendor-${SLIMSERVER_VENDOR_COMMIT}/CPAN
# Bug???
mkdir -p build/lib
cp --dereference /usr/lib/gcc/x86_64-pc-linux-gnu/*/libstdc++.so build/lib/libstdc++.so
for ITEM in ${CPANBUILD}; do
./buildme.sh -t ${ITEM}
done
rm -f build/lib/libstdc++.so
}
src_install() {
# The main Perl executables
exeinto /usr/sbin
newexe slimserver.pl logitechmediaserver
newexe scanner.pl logitechmediaserver-scanner
newexe cleanup.pl logitechmediaserver-cleanup
# The custom OS module for Gentoo - provides OS-specific path details
cp "${FILESDIR}/gentoo-filepaths.pm" "Slim/Utils/OS/Custom.pm" || die "Unable to install Gentoo custom OS module"
perl_set_version
sed -e "s#@@SLIMPLUGINPATH@@#${VENDOR_LIB}/Slim/Plugin#" -i Slim/Utils/OS/Custom.pm
# The server Perl modules
pushd Slim/
perl_domodule -C Slim -r . || die "Unable to install server Perl modules"
popd
# CPAN modules
insinto "/usr/share/logitechmediaserver/CPAN"
doins -r CPAN/*
doins -r ${WORKDIR}/slimserver-vendor-${SLIMSERVER_VENDOR_COMMIT}/CPAN/build/arch/*/*/*
# Various directories of architecture-independent static files
dodir "${SHAREDIR}"
cp -r Firmware "${D}/${SHAREDIR}" || die "Unable to install firmware"
cp -r Graphics "${D}/${SHAREDIR}" || die "Unable to install Graphics"
cp -r HTML "${D}/${SHAREDIR}" || die "Unable to install HTML"
cp -r IR "${D}/${SHAREDIR}" || die "Unable to install IR"
cp -r SQL "${D}/${SHAREDIR}" || die "Unable to install SQL"
# Architecture-dependent static files
dodir "${LIBDIR}"
cp -r lib/* "${D}/${LIBDIR}" || die "Unable to install architecture-dependent files"
# Strings and version identification
insinto "${SHAREDIR}"
doins strings.txt
doins revision.txt
doins icudt46b.dat
doins icudt46l.dat
doins icudt58b.dat
doins icudt58l.dat
# Documentation
dodoc Changelog*.html
dodoc Installation.txt
dodoc License*.txt
newdoc "${FILESDIR}/Gentoo-plugins-README.txt" Gentoo-plugins-README.txt
# Configuration files
insinto /etc/logitechmediaserver
doins convert.conf
doins types.conf
doins modules.conf
# Install init scripts
newconfd "${FILESDIR}/logitechmediaserver.conf.d" logitechmediaserver
newinitd "${FILESDIR}/logitechmediaserver.init.d" logitechmediaserver
# Install preferences
keepdir "${PREFSDIR}"
fowners ${RUN_GID}:${RUN_UID} "${PREFSDIR}"
fperms 770 "${PREFSDIR}"
keepdir "${PREFSDIR}"/plugin
fowners ${RUN_GID}:${RUN_UID} "${PREFSDIR}"/plugin
fperms 770 "${PREFSDIR}"/plugin
# Initialize server cache directory
keepdir /var/lib/logitechmediaserver/cache
fowners ${RUN_GID}:${RUN_UID} /var/lib/logitechmediaserver/cache
fperms 770 /var/lib/logitechmediaserver/cache
# Initialize the log directory
keepdir /var/log/logitechmediaserver
fowners ${RUN_GID}:${RUN_UID} /var/log/logitechmediaserver
fperms 770 /var/log/logitechmediaserver
# Initialise the user-installed plugins directory
keepdir "${PLUGINSDIR}"
fowners ${RUN_GID}:${RUN_UID} "${PLUGINSDIR}"
fperms 770 "${PLUGINSDIR}"
# Install logrotate support
insinto /etc/logrotate.d
newins "${FILESDIR}/logitechmediaserver.logrotate.d" logitechmediaserver
## # Install Avahi support (if USE flag is set)
## if use avahi; then
## insinto /etc/avahi/services
## newins "${FILESDIR}/avahi-logitechmediaserver.service" logitechmediaserver.service
## fi
}
pkg_postinst() {
# FLAC and LAME are quite useful (but not essential) for Squeezebox Server -
# if they're not enabled then make sure the user understands that.
if ! use flac; then
ewarn "'flac' USE flag is not set. Although not essential, FLAC is required"
ewarn "for playing lossless WAV and FLAC (for Squeezebox 1), and for"
ewarn "playing other less common file types (if you have a Squeezebox 2 or newer)."
ewarn "For maximum flexibility you are recommended to set the 'flac' USE flag".
ewarn ""
fi
if ! use lame; then
ewarn "'lame' USE flag is not set. Although not essential, LAME is"
ewarn "required if you want to limit the bandwidth your Squeezebox or"
ewarn "Transporter uses when streaming audio."
ewarn "For maximum flexibility you are recommended to set the 'lame' USE flag".
ewarn ""
fi
# Remind user to configure Avahi if necessary
if use avahi; then
elog ""
elog "Avahi support installed. Remember to edit the folowing file if"
elog "you run Logitech Media Server's web interface on a port other than 9000:"
elog "\t/etc/avahi/services/logitechmediaserver.service"
fi
elog ""
elog "Logitech Media Server can be started with the following command:"
elog "\t/etc/init.d/logitechmediaserver start"
elog ""
elog "Logitech Media Server can be automatically started on each boot with the"
elog "following command:"
elog "\trc-update add logitechmediaserver default"
elog ""
elog "You might want to examine and modify the following configuration"
elog "file before starting Logitech Media Server:"
elog "\t/etc/conf.d/logitechmediaserver"
elog ""
# Discover the port number from the preferences, but if it isn't there
# then report the standard one.
httpport=$(gawk '$1 == "httpport:" { print $2 }' "${ROOT}${LIVE_PREFS}" 2>/dev/null)
elog "You may access and configure Squeezebox Server by browsing to:"
elog "\thttp://localhost:${httpport:-9000}/"
elog ""
}

1
metadata/layout.conf Normal file
View File

@ -0,0 +1 @@
masters = gentoo

1
profiles/repo_name Normal file
View File

@ -0,0 +1 @@
smarthome