/[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.1 - (hide annotations) (download)
Thu Jun 3 15:20:24 2021 UTC (3 years, 5 months ago) by jpp
Branch: MAIN
Initial import

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

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