/[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.2 - (hide annotations) (download)
Thu Jun 3 16:04:36 2021 UTC (3 years, 6 months ago) by jpp
Branch: MAIN
CVS Tags: madsonic-6_2_9084-1_el7_sme
Changes since 1.1: +5 -1 lines
* Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 6.2.9084-1.sme
- update to 6.2.9084
- first build for SME10

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

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