12 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
13 |
Summary: A web-based music streamer, jukebox and Podcast receiver |
Summary: A web-based music streamer, jukebox and Podcast receiver |
14 |
Source: %{name}-%{version}.tar.gz |
Source: %{name}-%{version}.tar.gz |
15 |
|
Patch0: madsonic-6.2.9084-test.patch |
16 |
BuildRoot: /var/tmp/%{name}-%{version}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-buildroot |
17 |
BuildArch: noarch |
BuildArch: noarch |
18 |
BuildRequires: e-smith-devtools |
BuildRequires: e-smith-devtools |
24 |
%changelog |
%changelog |
25 |
* Fri Jul 22 2022 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9092-1.sme |
* Fri Jul 22 2022 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9092-1.sme |
26 |
- update with log4j fixes and more |
- update with log4j fixes and more |
27 |
|
- systemd capable |
28 |
|
- enable mediasonic.test by default |
29 |
|
|
30 |
* Fri Jun 04 2021 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9084-2.sme |
* Fri Jun 04 2021 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9084-2.sme |
31 |
- fix permissions [SME: 10699] |
- fix permissions [SME: 10699] |
48 |
|
|
49 |
Apps for Android, iPhone and Windows Phone are also available. |
Apps for Android, iPhone and Windows Phone are also available. |
50 |
|
|
51 |
Java 1.6 or higher is required to run Madsonic. |
Java 1.8 or higher is required to run Madsonic.>= 6.2 |
52 |
|
|
53 |
%prep |
%prep |
54 |
%setup |
%setup |
55 |
|
%patch0 -p1 |
56 |
|
|
57 |
|
mkdir -p root/run/madsonic |
58 |
|
mkdir -p root/usr/lib/tmpfiles.d/ |
59 |
|
mkdir -p root/usr/bin |
60 |
|
echo "d /run/madsonic 0755 madsonic madsonic" > root/usr/lib/tmpfiles.d/madsonic.conf |
61 |
|
rm root/etc/init.d/madsonic |
62 |
|
|
63 |
|
pushd root/usr/bin/ |
64 |
|
ln -sf /usr/share/madsonic/madsonic.sh madsonic |
65 |
|
popd |
66 |
|
|
67 |
|
|
68 |
%install |
%install |
72 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
73 |
--dir /usr/share/madsonic 'attr(0750,madsonic,madsonic)' \ |
--dir /usr/share/madsonic 'attr(0750,madsonic,madsonic)' \ |
74 |
--dir /var/madsonic 'attr(0750,madsonic,madsonic)' \ |
--dir /var/madsonic 'attr(0750,madsonic,madsonic)' \ |
75 |
| grep -v "/etc/sysconfig/madsonic" \ |
--file /usr/lib/tmpfiles.d/madsonic.conf 'attr(0750,root,root)' \ |
76 |
| grep -v "/etc/init.d$" \ |
--dir /run/madsonic 'attr(0755,madsonic,madsonic)' \ |
77 |
| grep -v "/etc/sysconfig$"\ |
--ignoredir /run \ |
78 |
|
--ignoredir "/etc/sysconfig/madsonic" \ |
79 |
|
--ignoredir "/etc/init.d" \ |
80 |
|
--ignoredir "/etc/sysconfig"\ |
81 |
> %{name}-%{version}-filelist |
> %{name}-%{version}-filelist |
82 |
|
|
83 |
%clean |
%clean |
96 |
if [ -e /etc/init.d/madsonic ]; then |
if [ -e /etc/init.d/madsonic ]; then |
97 |
service madsonic stop |
service madsonic stop |
98 |
fi |
fi |
99 |
|
[ -e /usr/lib/systemd/system/madsonic.service ] && systemctl stop madsonic |
100 |
|
|
101 |
# Backup database. |
# Backup database. |
102 |
if [ -e /var/madsonic/db ]; then |
if [ -e /var/madsonic/db ]; then |
107 |
exit 0 |
exit 0 |
108 |
|
|
109 |
%post |
%post |
110 |
ln -sf /usr/share/madsonic/madsonic.sh /usr/bin/madsonic |
#ln -sf /usr/share/madsonic/madsonic.sh /usr/bin/madsonic |
111 |
chmod 750 /var/madsonic |
#chmod 750 /var/madsonic |
112 |
|
|
113 |
# Clear jetty cache. |
# Clear jetty cache. |
114 |
rm -rf /var/madsonic/jetty |
rm -rf /var/madsonic/jetty |
127 |
|
|
128 |
# Stop the service. |
# Stop the service. |
129 |
[ -e /etc/init.d/madsonic ] && service madsonic stop |
[ -e /etc/init.d/madsonic ] && service madsonic stop |
130 |
|
[ -e /usr/lib/systemd/system/madsonic.service ] && systemctl stop madsonic |
131 |
|
|
132 |
# Remove symlink. |
# Remove symlink. |
133 |
rm -f /usr/bin/madsonic |
rm -f /usr/bin/madsonic |