initial commit of file from CVS for smeserver-madsonic on Sat Sep 7 20:34:52 AEST 2024
This commit is contained in:
parent
ba2b0ad5a4
commit
aed0bea1da
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
*.rpm
|
||||
*.log
|
||||
*spec-20*
|
||||
*.tar.gz
|
21
Makefile
Normal file
21
Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
# Makefile for source rpm: smeserver-madsonic
|
||||
# $Id: Makefile,v 1.1 2020/12/20 05:50:10 brianr Exp $
|
||||
NAME := smeserver-madsonic
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
15
README.md
15
README.md
@ -1,3 +1,16 @@
|
||||
# smeserver-madsonic
|
||||
# <img src="https://www.koozali.org/images/koozali/Logo/Png/Koozali_logo_2016.png" width="25%" vertical="auto" style="vertical-align:bottom"> smeserver-madsonic
|
||||
|
||||
SMEServer Koozali developed git repo for smeserver-madsonic smecontribs
|
||||
|
||||
## Wiki
|
||||
<br />https://wiki.koozali.org/Madsonic
|
||||
<br />https://wiki.koozali.org/Madsonic-howto
|
||||
|
||||
## Bugzilla
|
||||
Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=smeserver-madsonic&product=SME%20Contribs&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
|
||||
|
||||
## Description
|
||||
|
||||
<br />*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
|
||||
*Once it has been checked, then this comment will be deleted*
|
||||
<br />
|
||||
|
1
contriborbase
Normal file
1
contriborbase
Normal file
@ -0,0 +1 @@
|
||||
contribs10
|
31
createlinks
Normal file
31
createlinks
Normal file
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use esmith::Build::CreateLinks qw(:all);
|
||||
|
||||
####################
|
||||
# links to add
|
||||
|
||||
# templates to expand
|
||||
templates2events( "/etc/sysconfig/madsonic" , qw( conf-madsonic bootstrap-console-save console-save post-upgrade));
|
||||
templates2events( "/etc/httpd/conf/httpd.conf" , qw( conf-madsonic ));
|
||||
|
||||
# services to launch on event
|
||||
safe_symlink("restart", "root/etc/e-smith/events/conf-madsonic/services2adjust/madsonic");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/conf-madsonic/services2adjust/httpd-e-smith");
|
||||
|
||||
my $event= "smeserver-madsonic-update";
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/madsonic");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog");
|
||||
templates2events( "/etc/sysconfig/madsonic" , $event);
|
||||
templates2events( "/etc/httpd/conf/httpd.conf" , $event);
|
||||
templates2events( "/etc/rsyslog.conf" , $event);
|
||||
event_actions( $event, "madsonic-fixperms" => "05");
|
||||
|
||||
use esmith::Build::Backup qw(:all);
|
||||
backup_includes("smeserver-madsonic", qw(
|
||||
/var/madsonic/db/
|
||||
/var/madsonic/madsonic.properties
|
||||
/var/madsonic/madsonic.log
|
||||
/var/madsonic/madsonic_sh.log
|
||||
));
|
1
root/etc/e-smith/db/accounts/defaults/madsonic/Target
Normal file
1
root/etc/e-smith/db/accounts/defaults/madsonic/Target
Normal file
@ -0,0 +1 @@
|
||||
http://localhost:4041/madsonic
|
1
root/etc/e-smith/db/accounts/defaults/madsonic/type
Normal file
1
root/etc/e-smith/db/accounts/defaults/madsonic/type
Normal file
@ -0,0 +1 @@
|
||||
ProxyPass
|
1
root/etc/e-smith/db/configuration/defaults/madsonic/Name
Normal file
1
root/etc/e-smith/db/configuration/defaults/madsonic/Name
Normal file
@ -0,0 +1 @@
|
||||
madsonic
|
@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/madsonic/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/madsonic/type
Normal file
@ -0,0 +1 @@
|
||||
service
|
5
root/etc/e-smith/events/actions/madsonic-fixperms
Normal file
5
root/etc/e-smith/events/actions/madsonic-fixperms
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
chown madsonic:madsonic -R /var/media
|
||||
chown madsonic:madsonic -R /var/madsonic/*
|
||||
chown madsonic:root /var/madsonic/madsonic.properties /var/madsonic/madsonic.log
|
@ -0,0 +1 @@
|
||||
PERMS=0755
|
@ -0,0 +1,34 @@
|
||||
# needed local webserver to alow madsonic.test configuration
|
||||
Listen 127.0.0.1:8082
|
||||
<VirtualHost 127.0.0.1:8082>
|
||||
ServerName www.madsonic.org
|
||||
ServerAlias madsonic.org beta.madsonic.org
|
||||
DocumentRoot /var/www/backend/
|
||||
|
||||
Alias /backend/validateLicense.view /var/www/backend/validateLicense.view
|
||||
Alias /backend/validateLicenseKey.view /var/www/backend/validateLicense.view
|
||||
Alias /backend/version.view /var/www/backend/validateLicense.view
|
||||
<Directory /var/www/backend >
|
||||
AddType text/plain .view
|
||||
order allow,deny
|
||||
allow from all
|
||||
Require all granted
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
Listen 127.0.0.1:8090
|
||||
<VirtualHost 127.0.0.1:8090>
|
||||
ServerName www.madsonic.org
|
||||
ServerAlias madsonic.org beta.madsonic.org
|
||||
DocumentRoot /var/www/backend/
|
||||
Alias /backend/redirect/register.view /var/www/backend/validateLicense.view
|
||||
Alias /backend/redirect/unregister.view /var/www/backend/validateLicense.view
|
||||
Alias /backend/redirect/test.view /var/www/backend/validateLicense.view
|
||||
Alias /backend/version.view /var/www/backend/validateLicense.view
|
||||
</VirtualHost>
|
||||
<Directory /var/www/backend >
|
||||
AddType text/plain .view
|
||||
order allow,deny
|
||||
allow from all
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
3
root/etc/e-smith/templates/etc/rsyslog.conf/32madsonic
Normal file
3
root/etc/e-smith/templates/etc/rsyslog.conf/32madsonic
Normal file
@ -0,0 +1,3 @@
|
||||
# we do not log the service unit content outside of journald
|
||||
#to see actual madsonic log see /var/madsonic/madsonic.log and /var/madsonic/madsonic_sh.log
|
||||
:programname, isequal, "madsonic" ~
|
81
root/etc/e-smith/templates/etc/sysconfig/madsonic/40madsonic
Normal file
81
root/etc/e-smith/templates/etc/sysconfig/madsonic/40madsonic
Normal file
@ -0,0 +1,81 @@
|
||||
#
|
||||
# This is the configuration file for the Madsonic service
|
||||
# (/etc/init.d/madsonic)
|
||||
#
|
||||
# To change the startup parameters of Madsonic, modify
|
||||
# the MADSONIC_ARGS variable below.
|
||||
#
|
||||
# Type "/usr/share/madsonic/madsonic.sh --help" on the command line to read an
|
||||
# explanation of the different options.
|
||||
#
|
||||
# For example, to specify that Madsonic should use port 80 (for http)
|
||||
# and 443 (for https), and use a Java init memory heap size of 192 MB,
|
||||
# and use a Java max memory heap size of 384 MB
|
||||
# use the following:
|
||||
#
|
||||
# MADSONIC_ARGS="--port=80 --https-port=443 --init-memory=192 --max-memory=384"
|
||||
|
||||
|
||||
#MADSONIC_ARGS="{
|
||||
$madhome = $madsonic{'home'} || "/var/madsonic";
|
||||
$madhost = $madsonic{'host'} || "0.0.0.0";
|
||||
$madport = $madsonic{'port'} || "4041";
|
||||
$madpath = $madsonic{'path'} || "/madsonic";
|
||||
$madhttps_port = $madsonic{'https_port'} || "0";
|
||||
$madinitmem = $madsonic{'InitMemory'} || "200";
|
||||
$madmem = $madsonic{'MaxMemory'} || "350";
|
||||
$madpid = $madsonic{'PIDfile'} || "";
|
||||
$madmusic = $madsonic{'Music_Folder'} || "/var/media";
|
||||
$madpod = $madsonic{'Podcast_Folder'} || "/var/media/podcast";
|
||||
$madinco = $madsonic{'Inco_Folder'} || "/var/media/incoming";
|
||||
$madimpo = $madsonic{'Impo_Folder'} || "/var/media/playlists/import";
|
||||
$madexpo = $madsonic{'Expo_Folder'} || "/var/media/playlists/export";
|
||||
$madback = $madsonic{'Back_Folder'} || "/var/media/playlists/backup";
|
||||
$madtest = $madsonic{'TestMode'} || "false";
|
||||
$madgzip = $madsonic{'gzip'} || "true";
|
||||
$madtrans = $madsonic{'TranscodeFolder'} || "/var/madsonic/transcode";
|
||||
use DateTime::TimeZone;
|
||||
$madtz= $madsonic{"timezone"} || DateTime::TimeZone->new( name => 'local' )->name();
|
||||
|
||||
$OUT .= "--max-memory=$madmem --context-path='$madpath'";
|
||||
|
||||
$OUT .= " --home='$madhome'" unless $madhome eq "/var/madsonic";
|
||||
$OUT .= " --host='$madhost'" unless $madhost eq "0.0.0.0";
|
||||
$OUT .= " --port='$madport'" unless $madport == "4040";
|
||||
$OUT .= " --https-port='$madhttps_port'" unless $madhttps_port eq "0";
|
||||
$OUT .= " --pidfile='$madpid'" unless $madpid eq "";
|
||||
$OUT .= " --default-music-folder='$madmusic'" unless $madmusic eq "/var/media";
|
||||
$OUT .= " --default-podcast-folder='$madpod'" unless $madpod eq "/var/media/podcast";
|
||||
$OUT .= " --default-playlist-import-folder='$madimpo'" unless $madimpo eq "/var/media/playlists/import";
|
||||
$OUT .= " --default-playlist-export-folder='$madexpo'" unless $madexpo eq "/var/media/playlists/export";
|
||||
$OUT .= " --default-playlist-backup-folder='$madback'" unless $madback eq "/var/media/playlists/backup";
|
||||
$OUT .= " --init-memory=$madinitmem";
|
||||
$OUT .= " --max-memory=$madmem";
|
||||
}"
|
||||
|
||||
|
||||
# The user which should run the Mabsonic process. Default "root".
|
||||
# Note that non-root users are by default not allowed to use ports
|
||||
# below 1024. Also make sure to grant the user write permissions in
|
||||
# the music directories, otherwise changing album art and tags will fail.
|
||||
|
||||
MADSONIC_USER=madsonic
|
||||
|
||||
###for madsonic.service
|
||||
MADSONIC_HOME={$madhome}
|
||||
MADSONIC_HOST={$madhost}
|
||||
MADSONIC_PORT={$madport}
|
||||
MADSONIC_HTTPS_PORT={$madhttps_port}
|
||||
MADSONIC_CONTEXT_PATH={$madpath}
|
||||
MADSONIC_MAX_MEMORY={$madmem}
|
||||
MADSONIC_DEFAULT_MUSIC_FOLDER={$madmusic}
|
||||
MADSONIC_DEFAULT_UPLOAD_FOLDER={$madinco}
|
||||
MADSONIC_DEFAULT_PODCAST_FOLDER={$madpod}
|
||||
MADSONIC_DEFAULT_PLAYLIST_IMPORT_FOLDER={$madimpo}
|
||||
MADSONIC_DEFAULT_PLAYLIST_EXPORT_FOLDER={$madexpo}
|
||||
MADSONIC_DEFAULT_PLAYLIST_BACKUP_FOLDER={$madback}
|
||||
MADSONIC_DEFAULT_TRANSCODE_FOLDER={$madtrans}
|
||||
MADSONIC_DEFAULT_TIMEZONE={$madtz}
|
||||
MADSONIC_GZIP={$madgzip}
|
||||
MADSONIC_TEST={$madtest}
|
||||
|
0
root/var/madsonic/conversion/audio/.gitignore
vendored
Normal file
0
root/var/madsonic/conversion/audio/.gitignore
vendored
Normal file
0
root/var/madsonic/conversion/video/.gitignore
vendored
Normal file
0
root/var/madsonic/conversion/video/.gitignore
vendored
Normal file
0
root/var/madsonic/lucene30/album/.gitignore
vendored
Normal file
0
root/var/madsonic/lucene30/album/.gitignore
vendored
Normal file
0
root/var/media/incoming/.gitignore
vendored
Normal file
0
root/var/media/incoming/.gitignore
vendored
Normal file
0
root/var/media/playlists/backup/.gitignore
vendored
Normal file
0
root/var/media/playlists/backup/.gitignore
vendored
Normal file
0
root/var/media/playlists/export/.gitignore
vendored
Normal file
0
root/var/media/playlists/export/.gitignore
vendored
Normal file
0
root/var/media/playlists/import/.gitignore
vendored
Normal file
0
root/var/media/playlists/import/.gitignore
vendored
Normal file
0
root/var/media/podcast/.gitignore
vendored
Normal file
0
root/var/media/podcast/.gitignore
vendored
Normal file
1
root/var/www/backend/validateLicense.view
Normal file
1
root/var/www/backend/validateLicense.view
Normal file
@ -0,0 +1 @@
|
||||
true
|
111
smeserver-madsonic.spec
Normal file
111
smeserver-madsonic.spec
Normal file
@ -0,0 +1,111 @@
|
||||
%define name smeserver-madsonic
|
||||
%define version 5.0.3761
|
||||
%define release 10
|
||||
Summary: madsonic is a music streaming system
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}%{?dist}
|
||||
Distribution: SME Server
|
||||
License: GNU GPL version 2
|
||||
Group: SMEserver/addon
|
||||
Source: smeserver-madsonic-%{version}.tar.xz
|
||||
|
||||
BuildArchitectures: noarch
|
||||
BuildRoot: /var/tmp/%{name}-%{version}-buildroot
|
||||
BuildRequires: e-smith-devtools
|
||||
Requires: e-smith-release >= 8.0
|
||||
Requires: madsonic >= 6.2.9092
|
||||
Requires: alsa-utils
|
||||
Requires: ffmpeg
|
||||
Requires: java-1.8.0-openjdk >= 1.8
|
||||
Requires: perl-DateTime
|
||||
AutoReqProv: no
|
||||
|
||||
%description
|
||||
This is all the configurations needed to install madsonic as a contrib for SME Server
|
||||
|
||||
%changelog
|
||||
* Sat Sep 07 2024 cvs2git.sh aka Brian Read <brianr@koozali.org> 5.0.3761-10.sme
|
||||
- Roll up patches and move to git repo [SME: 12338]
|
||||
|
||||
* Sat Sep 07 2024 BogusDateBot
|
||||
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
|
||||
by assuming the date is correct and changing the weekday.
|
||||
|
||||
* Wed Dec 07 2022 Jean-Philippe Pialasse <tests@pialasse.com> 5.0.3761-9.sme
|
||||
- fix conflict for /var/madsonic [SME: 12255]
|
||||
|
||||
* Tue Nov 22 2022 Jean-Philippe Pialasse <tests@pialasse.com> 5.0.3761-8.sme
|
||||
- remove remaining sysvinit files [SME: 12239]
|
||||
- fix few minors issues, typo and cosmetics
|
||||
|
||||
* Sat Jul 30 2022 Brian Read <brianr@bjsystems.co.uk> 5.0.3761-7.sme
|
||||
- Re-build and link to latest devtools [SME: 11997]
|
||||
|
||||
* Fri Jul 22 2022 Jean-Philippe Pialasse <tests@pialasse.com> 5.0.3761-6.sme
|
||||
- add to core backup [SME: 12014]
|
||||
- update for 6.2 neededing java-1.8.0
|
||||
- add local test webservices
|
||||
- main rpm is now using systemd [SME: 11619]
|
||||
|
||||
* Sun Jun 06 2021 Jean-Philippe Pialasse <tests@pialasse.com> 5.0.3761-5.sme
|
||||
- Re-build and link to latest devtools services not restarted on install [SME: 11280]
|
||||
|
||||
* Fri Jun 04 2021 Jean-Philippe Pialasse <tests@pialasse.com> 5.0.3761-4.sme
|
||||
- Re-build and link to latest devtools new configuration for madsonic 6 [SME: 11280]
|
||||
add update event
|
||||
- add madsonic user to audio group [SME: 10700]
|
||||
- add /var/media folders and subfolders [SME: 10701]
|
||||
|
||||
* Sun Dec 20 2020 Brian Read <brianr@bjsystems.co.uk> 5.0.3761-3.sme
|
||||
- Initial Import in SME10 [SME: 11280]
|
||||
|
||||
* Mon Jun 16 2014 JP Pialasse <tests@pialasse.com> 5.0.3761-1.sme
|
||||
- initial import to SME9 contribs
|
||||
|
||||
* Wed Nov 20 2013 CONTRIB MAKER <tests@pialasse.com> 5.0.3760-2.sme
|
||||
- initial release
|
||||
- builds from unchanged .tar.gz
|
||||
|
||||
%pre
|
||||
grep '^madsonic:' /etc/passwd > /dev/null || \
|
||||
/usr/sbin/useradd -c "madsonic" -M -d /usr/share/madsonic -s /bin/bash madsonic
|
||||
/usr/sbin/usermod -aG audio madsonic
|
||||
|
||||
%prep
|
||||
%setup
|
||||
mkdir -p root/var/media/playlists/export root/var/media/playlists/import root/var/media/incoming root/var/media/podcast root/var/media/playlists/backup
|
||||
mkdir -p root/var/madsonic/lucene30/album root/var/madsonic/conversion/audio root/var/madsonic/conversion/video
|
||||
|
||||
%build
|
||||
perl createlinks
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
|
||||
rm -f %{name}-%{version}-filelist
|
||||
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
||||
--dir /var/media/ 'attr(0755,madsonic,madsonic)' \
|
||||
--dir /var/media/playlists/ 'attr(0750,madsonic,madsonic)' \
|
||||
--dir /var/media/playlists/export/ 'attr(0750,madsonic,madsonic)' \
|
||||
--dir /var/media/playlists/import/ 'attr(0750,madsonic,madsonic)' \
|
||||
--dir /var/media/incoming/ 'attr(0750,madsonic,madsonic)' \
|
||||
--dir /var/media/podcast/ 'attr(0750,madsonic,madsonic)' \
|
||||
--dir /var/media/playlists/backup/ 'attr(0750,madsonic,madsonic)' \
|
||||
--dir /var/madsonic/lucene30 'attr(0750,madsonic,madsonic)' \
|
||||
--dir /var/madsonic/lucene30/album 'attr(0750,madsonic,madsonic)' \
|
||||
--dir /var/madsonic/conversion 'attr(0750,madsonic,madsonic)' \
|
||||
--dir /var/madsonic/conversion/video 'attr(0750,madsonic,madsonic)' \
|
||||
--dir /var/madsonic/conversion/audio 'attr(0750,madsonic,madsonic)' \
|
||||
--file /var/www/backend/validateLicense.view 'attr(0750,www,www)' \
|
||||
--dir /var/www/backend/ 'attr(0750,www,www)' \
|
||||
--ignoredir /var/madsonic \
|
||||
> %{name}-%{version}-filelist
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -f %{name}-%{version}-filelist
|
||||
%defattr(-,root,root)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user