1 |
%define name madsonic |
%define name madsonic |
2 |
%define version 6.2.9092 |
%define version 6.2.9092 |
3 |
%define release 1 |
%define release 3 |
4 |
%define __os_install_post \ |
%define __os_install_post \ |
5 |
/usr/lib/rpm/brp-compress \ |
/usr/lib/rpm/brp-compress \ |
6 |
/usr/lib/rpm/brp-strip \ |
/usr/lib/rpm/brp-strip \ |
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 |
|
Source1: madsonic.service |
16 |
|
Patch0: madsonic-6.2.9084-test.patch |
17 |
|
Patch1: madsonic-6.2.9084-sysconfig.patch |
18 |
|
Patch2: madsonic-6.2.9092-bz12305-failing.patch |
19 |
BuildRoot: /var/tmp/%{name}-%{version}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-buildroot |
20 |
BuildArch: noarch |
BuildArch: noarch |
21 |
BuildRequires: e-smith-devtools |
BuildRequires: e-smith-devtools |
25 |
URL: http://madsonic.org |
URL: http://madsonic.org |
26 |
|
|
27 |
%changelog |
%changelog |
28 |
|
* Sat Jan 21 2023 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9092-3.sme |
29 |
|
- fix failing service on update and few occasions [SME: 12305] |
30 |
|
|
31 |
|
* Fri Dec 30 2022 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9092-2.sme |
32 |
|
- fix madsonic fails as starting before network |
33 |
|
|
34 |
* 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 |
35 |
- update with log4j fixes and more |
- update with log4j fixes and more |
36 |
|
- systemd capable |
37 |
|
- add mediasonic.test |
38 |
|
|
39 |
* 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 |
40 |
- fix permissions [SME: 10699] |
- fix permissions [SME: 10699] |
57 |
|
|
58 |
Apps for Android, iPhone and Windows Phone are also available. |
Apps for Android, iPhone and Windows Phone are also available. |
59 |
|
|
60 |
Java 1.6 or higher is required to run Madsonic. |
Java 1.8 or higher is required to run Madsonic.>= 6.2 |
61 |
|
|
62 |
%prep |
%prep |
63 |
%setup |
%setup |
64 |
|
%patch0 -p1 |
65 |
|
%patch1 -p1 |
66 |
|
%patch2 -p1 |
67 |
|
mkdir -p root/usr/lib/systemd/system |
68 |
|
cp %{SOURCE1} root/usr/lib/systemd/system |
69 |
|
mkdir -p root/run/madsonic |
70 |
|
mkdir -p root/usr/lib/tmpfiles.d/ |
71 |
|
mkdir -p root/usr/bin |
72 |
|
echo "d /run/madsonic 0755 madsonic madsonic" > root/usr/lib/tmpfiles.d/madsonic.conf |
73 |
|
rm root/etc/init.d/madsonic |
74 |
|
|
75 |
|
pushd root/usr/bin/ |
76 |
|
ln -sf /usr/share/madsonic/madsonic.sh madsonic |
77 |
|
popd |
78 |
|
|
79 |
|
|
80 |
%install |
%install |
84 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
85 |
--dir /usr/share/madsonic 'attr(0750,madsonic,madsonic)' \ |
--dir /usr/share/madsonic 'attr(0750,madsonic,madsonic)' \ |
86 |
--dir /var/madsonic 'attr(0750,madsonic,madsonic)' \ |
--dir /var/madsonic 'attr(0750,madsonic,madsonic)' \ |
87 |
| grep -v "/etc/sysconfig/madsonic" \ |
--file /usr/lib/tmpfiles.d/madsonic.conf 'attr(0750,root,root)' \ |
88 |
| grep -v "/etc/init.d$" \ |
--file /usr/lib/systemd/system/madsonic.service 'attr(0644,root,root)' \ |
89 |
| grep -v "/etc/sysconfig$"\ |
--dir /run/madsonic 'attr(0755,madsonic,madsonic)' \ |
90 |
|
--ignoredir /run \ |
91 |
|
--ignoredir "/etc/sysconfig/madsonic" \ |
92 |
|
--ignoredir "/etc/init.d" \ |
93 |
|
--ignoredir "/etc/sysconfig"\ |
94 |
> %{name}-%{version}-filelist |
> %{name}-%{version}-filelist |
95 |
|
|
96 |
%clean |
%clean |
109 |
if [ -e /etc/init.d/madsonic ]; then |
if [ -e /etc/init.d/madsonic ]; then |
110 |
service madsonic stop |
service madsonic stop |
111 |
fi |
fi |
112 |
|
[ -e /usr/lib/systemd/system/madsonic.service ] && systemctl stop madsonic |
113 |
|
|
114 |
# Backup database. |
# Backup database. |
115 |
if [ -e /var/madsonic/db ]; then |
if [ -e /var/madsonic/db ]; then |
120 |
exit 0 |
exit 0 |
121 |
|
|
122 |
%post |
%post |
123 |
ln -sf /usr/share/madsonic/madsonic.sh /usr/bin/madsonic |
#ln -sf /usr/share/madsonic/madsonic.sh /usr/bin/madsonic |
124 |
chmod 750 /var/madsonic |
#chmod 750 /var/madsonic |
125 |
|
|
126 |
# Clear jetty cache. |
# Clear jetty cache. |
127 |
rm -rf /var/madsonic/jetty |
rm -rf /var/madsonic/jetty |
140 |
|
|
141 |
# Stop the service. |
# Stop the service. |
142 |
[ -e /etc/init.d/madsonic ] && service madsonic stop |
[ -e /etc/init.d/madsonic ] && service madsonic stop |
143 |
|
[ -e /usr/lib/systemd/system/madsonic.service ] && systemctl stop madsonic |
144 |
|
|
145 |
# Remove symlink. |
# Remove symlink. |
146 |
rm -f /usr/bin/madsonic |
rm -f /usr/bin/madsonic |