/[smecontribs]/rpms/madsonic/contribs10/madsonic.spec
ViewVC logotype

Diff of /rpms/madsonic/contribs10/madsonic.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.2 by jpp, Thu Jun 3 16:04:36 2021 UTC Revision 1.6 by jpp, Sat Jul 23 14:22:31 2022 UTC
# Line 1  Line 1 
1  %define name madsonic  %define name madsonic
2  %define version 6.2.9084  %define version 6.2.9092
3  %define release 1  %define release 1
4  %define __os_install_post \  %define __os_install_post \
5         /usr/lib/rpm/brp-compress \         /usr/lib/rpm/brp-compress \
# Line 12  Version:        %{version} Line 12  Version:        %{version}
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
# Line 21  License:        GPLv3 Line 22  License:        GPLv3
22  URL:            http://madsonic.org  URL:            http://madsonic.org
23    
24  %changelog  %changelog
25    * Fri Jul 22 2022 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9092-1.sme
26    - 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
31    - fix permissions [SME: 10699]
32    - fix noise on start with initial install [SME: 8016]
33    
34  * 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
35  - update to 6.2.9084  - update to 6.2.9084
36  - first build for SME10  - first build for SME10
# Line 38  from home. Line 48  from home.
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    echo "d /run/madsonic 0755 madsonic madsonic" > root/usr/lib/tmpfiles.d/madsonic.conf
60    rm root/etc/init.d/madsonic
61    
62    pushd root/usr/bin/
63    ln -sf  root/usr/share/madsonic/madsonic.sh madsonic
64    popd
65    
66    
67  %install  %install
# Line 49  rm -rf $RPM_BUILD_ROOT Line 69  rm -rf $RPM_BUILD_ROOT
69  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)  (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
70  rm -f %{name}-%{version}-filelist  rm -f %{name}-%{version}-filelist
71  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \  /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
72  | grep -v "/etc/sysconfig/madsonic" \   --dir /usr/share/madsonic 'attr(0750,madsonic,madsonic)' \
73  | grep -v   "/etc/init.d$" \   --dir /var/madsonic 'attr(0750,madsonic,madsonic)' \
74  | grep -v   "/etc/sysconfig$"\   --file /usr/lib/tmpfiles.d/madsonic.conf 'attr(0750,root,root)' \
75     --dir /run/madsonic 'attr(0755,madsonic,madsonic)' \
76     --ignoredir /run \
77     --ignoredir "/etc/sysconfig/madsonic" \
78     --ignoredir   "/etc/init.d" \
79     --ignoredir   "/etc/sysconfig"\
80       > %{name}-%{version}-filelist       > %{name}-%{version}-filelist
81    
82  %clean  %clean
# Line 62  rm -rf $RPM_BUILD_ROOT Line 87  rm -rf $RPM_BUILD_ROOT
87  %config(noreplace) /etc/sysconfig/madsonic  %config(noreplace) /etc/sysconfig/madsonic
88    
89  %pre  %pre
90    grep '^madsonic:' /etc/passwd > /dev/null || \
91    /usr/sbin/useradd -c "madsonic" -M -d /usr/share/madsonic   -s /bin/bash madsonic
92    /usr/sbin/usermod -aG audio madsonic
93    
94  # Stop Madsonic service.  # Stop Madsonic service.
95  if [ -e /etc/init.d/madsonic ]; then  if [ -e /etc/init.d/madsonic ]; then
96    service madsonic stop    service madsonic stop
97  fi  fi
98    [ -e /usr/lib/systemd/system/madsonic.service ] && systemctl stop madsonic
99    
100  # Backup database.  # Backup database.
101  if [ -e /var/madsonic/db ]; then  if [ -e /var/madsonic/db ]; then
# Line 76  fi Line 106  fi
106  exit 0  exit 0
107    
108  %post  %post
109  ln -sf /usr/share/madsonic/madsonic.sh /usr/bin/madsonic  #ln -sf /usr/share/madsonic/madsonic.sh /usr/bin/madsonic
110  chmod 750 /var/madsonic  #chmod 750 /var/madsonic
111    
112  # Clear jetty cache.  # Clear jetty cache.
113  rm -rf /var/madsonic/jetty  rm -rf /var/madsonic/jetty
# Line 86  rm -rf /var/madsonic/jetty Line 116  rm -rf /var/madsonic/jetty
116  chcon -t java_exec_t /etc/init.d/madsonic 2>/dev/null  chcon -t java_exec_t /etc/init.d/madsonic 2>/dev/null
117    
118  # Configure and start Madsonic service.  # Configure and start Madsonic service.
119  chkconfig --add madsonic  #chkconfig --add madsonic
120  service madsonic start  #service madsonic start
121    
122  exit 0  exit 0
123  %preun  %preun
# Line 96  if [ $1 = 0 ] ; then Line 126  if [ $1 = 0 ] ; then
126    
127    # Stop the service.    # Stop the service.
128    [ -e /etc/init.d/madsonic ] && service madsonic stop    [ -e /etc/init.d/madsonic ] && service madsonic stop
129      [ -e /usr/lib/systemd/system/madsonic.service ] && systemctl stop madsonic
130    
131    # Remove symlink.    # Remove symlink.
132    rm -f /usr/bin/madsonic    rm -f /usr/bin/madsonic


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed