/[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.3 - (hide annotations) (download)
Fri Jun 4 06:40:40 2021 UTC (3 years, 5 months ago) by jpp
Branch: MAIN
CVS Tags: madsonic-6_2_9084-2_el7_sme
Changes since 1.2: +14 -3 lines
* Fri Jun 04 2021 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9084-2.sme
- fix permissions [SME: 10699]
- fix noise on start with initial install [SME: 8016]

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

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