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

Annotation of /rpms/madsonic/contribs10/madsonic.spec

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


Revision 1.4 - (hide annotations) (download)
Sat Jul 23 01:54:44 2022 UTC (2 years, 4 months ago) by jpp
Branch: MAIN
Changes since 1.3: +5 -3 lines
spec

1 jpp 1.1 %define name madsonic
2 jpp 1.4 %define version 6.2.9092
3     %define release 1
4 jpp 1.1 %define __os_install_post \
5     /usr/lib/rpm/brp-compress \
6     /usr/lib/rpm/brp-strip \
7     /usr/lib/rpm/brp-strip-static-archive \
8     echo "not /usr/lib/rpm/brp-strip-comment-note" \
9     %{nil}
10     Name: %{name}
11     Version: %{version}
12     Release: %{release}%{?dist}
13     Summary: A web-based music streamer, jukebox and Podcast receiver
14     Source: %{name}-%{version}.tar.gz
15     BuildRoot: /var/tmp/%{name}-%{version}-buildroot
16     BuildArch: noarch
17     BuildRequires: e-smith-devtools
18     AutoReqProv: no
19     Group: Applications/Multimedia
20     License: GPLv3
21     URL: http://madsonic.org
22    
23     %changelog
24 jpp 1.4 * Fri Jul 22 2022 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9092-1.sme
25     - update with log4j fixes and more
26    
27 jpp 1.3 * Fri Jun 04 2021 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9084-2.sme
28     - fix permissions [SME: 10699]
29     - fix noise on start with initial install [SME: 8016]
30    
31 jpp 1.2 * Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9084-1.sme
32     - update to 6.2.9084
33     - first build for SME10
34    
35 jpp 1.1 * Sun Nov 17 2013 JP Pialasse <tests@pialasse.com> 5.0.3760-1.sme
36     - first build for sme
37     - adding noarch
38     - adding e-smith-devtools
39    
40     %description
41     Madsonic is a web-based music streamer, fork of Subsonic, jukebox and Podcast receiver,
42     providing access to your music collection wherever you are. Use it
43     to share your music with friends, or to listen to your music while away
44     from home.
45    
46     Apps for Android, iPhone and Windows Phone are also available.
47    
48     Java 1.6 or higher is required to run Madsonic.
49    
50     %prep
51     %setup
52    
53    
54     %install
55     rm -rf $RPM_BUILD_ROOT
56     (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
57     rm -f %{name}-%{version}-filelist
58     /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
59 jpp 1.3 --dir /usr/share/madsonic 'attr(0750,madsonic,madsonic)' \
60     --dir /var/madsonic 'attr(0750,madsonic,madsonic)' \
61 jpp 1.1 | grep -v "/etc/sysconfig/madsonic" \
62     | grep -v "/etc/init.d$" \
63     | grep -v "/etc/sysconfig$"\
64     > %{name}-%{version}-filelist
65    
66     %clean
67     rm -rf $RPM_BUILD_ROOT
68    
69     %files -f %{name}-%{version}-filelist
70     %defattr(-,root,root)
71     %config(noreplace) /etc/sysconfig/madsonic
72    
73     %pre
74 jpp 1.3 grep '^madsonic:' /etc/passwd > /dev/null || \
75     /usr/sbin/useradd -c "madsonic" -M -d /usr/share/madsonic -s /bin/bash madsonic
76     /usr/sbin/usermod -aG audio madsonic
77    
78 jpp 1.1 # Stop Madsonic service.
79     if [ -e /etc/init.d/madsonic ]; then
80     service madsonic stop
81     fi
82    
83     # Backup database.
84     if [ -e /var/madsonic/db ]; then
85     rm -rf /var/madsonic/db.backup
86     cp -R /var/madsonic/db /var/madsonic/db.backup
87     fi
88    
89     exit 0
90    
91     %post
92     ln -sf /usr/share/madsonic/madsonic.sh /usr/bin/madsonic
93     chmod 750 /var/madsonic
94    
95     # Clear jetty cache.
96     rm -rf /var/madsonic/jetty
97    
98     # For SELinux: Set security context
99     chcon -t java_exec_t /etc/init.d/madsonic 2>/dev/null
100    
101     # Configure and start Madsonic service.
102 jpp 1.3 #chkconfig --add madsonic
103     #service madsonic start
104 jpp 1.1
105     exit 0
106     %preun
107     # Only do it if uninstalling, not upgrading.
108     if [ $1 = 0 ] ; then
109    
110     # Stop the service.
111     [ -e /etc/init.d/madsonic ] && service madsonic stop
112    
113     # Remove symlink.
114     rm -f /usr/bin/madsonic
115    
116     # Remove startup scripts.
117     chkconfig --del madsonic
118    
119     fi
120    
121     exit 0
122    

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