1 |
%define name madsonic |
%define name madsonic |
2 |
%define version 6.2.9084 |
%define version 6.2.9092 |
3 |
%define release 2 |
%define release 1 |
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 |
BuildRoot: /var/tmp/%{name}-%{version}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-buildroot |
19 |
BuildArch: noarch |
BuildArch: noarch |
20 |
BuildRequires: e-smith-devtools |
BuildRequires: e-smith-devtools |
24 |
URL: http://madsonic.org |
URL: http://madsonic.org |
25 |
|
|
26 |
%changelog |
%changelog |
27 |
|
* Fri Jul 22 2022 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9092-1.sme |
28 |
|
- update with log4j fixes and more |
29 |
|
- systemd capable |
30 |
|
- add mediasonic.test |
31 |
|
|
32 |
* 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 |
33 |
- fix permissions [SME: 10699] |
- fix permissions [SME: 10699] |
34 |
- fix noise on start with initial install [SME: 8016] |
- fix noise on start with initial install [SME: 8016] |
35 |
|
|
|
|
|
36 |
* Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9084-1.sme |
* Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9084-1.sme |
37 |
- update to 6.2.9084 |
- update to 6.2.9084 |
38 |
- first build for SME10 |
- first build for SME10 |
50 |
|
|
51 |
Apps for Android, iPhone and Windows Phone are also available. |
Apps for Android, iPhone and Windows Phone are also available. |
52 |
|
|
53 |
Java 1.6 or higher is required to run Madsonic. |
Java 1.8 or higher is required to run Madsonic.>= 6.2 |
54 |
|
|
55 |
%prep |
%prep |
56 |
%setup |
%setup |
57 |
|
%patch0 -p1 |
58 |
|
%patch1 -p1 |
59 |
|
mkdir -p root/usr/lib/systemd/system |
60 |
|
cp %{SOURCE1} root/usr/lib/systemd/system |
61 |
|
mkdir -p root/run/madsonic |
62 |
|
mkdir -p root/usr/lib/tmpfiles.d/ |
63 |
|
mkdir -p root/usr/bin |
64 |
|
echo "d /run/madsonic 0755 madsonic madsonic" > root/usr/lib/tmpfiles.d/madsonic.conf |
65 |
|
rm root/etc/init.d/madsonic |
66 |
|
|
67 |
|
pushd root/usr/bin/ |
68 |
|
ln -sf /usr/share/madsonic/madsonic.sh madsonic |
69 |
|
popd |
70 |
|
|
71 |
|
|
72 |
%install |
%install |
76 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
77 |
--dir /usr/share/madsonic 'attr(0750,madsonic,madsonic)' \ |
--dir /usr/share/madsonic 'attr(0750,madsonic,madsonic)' \ |
78 |
--dir /var/madsonic 'attr(0750,madsonic,madsonic)' \ |
--dir /var/madsonic 'attr(0750,madsonic,madsonic)' \ |
79 |
| grep -v "/etc/sysconfig/madsonic" \ |
--file /usr/lib/tmpfiles.d/madsonic.conf 'attr(0750,root,root)' \ |
80 |
| grep -v "/etc/init.d$" \ |
--file /usr/lib/systemd/system/madsonic.service 'attr(0544,root,root)' \ |
81 |
| grep -v "/etc/sysconfig$"\ |
--dir /run/madsonic 'attr(0755,madsonic,madsonic)' \ |
82 |
|
--ignoredir /run \ |
83 |
|
--ignoredir "/etc/sysconfig/madsonic" \ |
84 |
|
--ignoredir "/etc/init.d" \ |
85 |
|
--ignoredir "/etc/sysconfig"\ |
86 |
> %{name}-%{version}-filelist |
> %{name}-%{version}-filelist |
87 |
|
|
88 |
%clean |
%clean |
101 |
if [ -e /etc/init.d/madsonic ]; then |
if [ -e /etc/init.d/madsonic ]; then |
102 |
service madsonic stop |
service madsonic stop |
103 |
fi |
fi |
104 |
|
[ -e /usr/lib/systemd/system/madsonic.service ] && systemctl stop madsonic |
105 |
|
|
106 |
# Backup database. |
# Backup database. |
107 |
if [ -e /var/madsonic/db ]; then |
if [ -e /var/madsonic/db ]; then |
112 |
exit 0 |
exit 0 |
113 |
|
|
114 |
%post |
%post |
115 |
ln -sf /usr/share/madsonic/madsonic.sh /usr/bin/madsonic |
#ln -sf /usr/share/madsonic/madsonic.sh /usr/bin/madsonic |
116 |
chmod 750 /var/madsonic |
#chmod 750 /var/madsonic |
117 |
|
|
118 |
# Clear jetty cache. |
# Clear jetty cache. |
119 |
rm -rf /var/madsonic/jetty |
rm -rf /var/madsonic/jetty |
132 |
|
|
133 |
# Stop the service. |
# Stop the service. |
134 |
[ -e /etc/init.d/madsonic ] && service madsonic stop |
[ -e /etc/init.d/madsonic ] && service madsonic stop |
135 |
|
[ -e /usr/lib/systemd/system/madsonic.service ] && systemctl stop madsonic |
136 |
|
|
137 |
# Remove symlink. |
# Remove symlink. |
138 |
rm -f /usr/bin/madsonic |
rm -f /usr/bin/madsonic |