/[smecontribs]/rpms/subsonic/contribs8/subsonic.spec
ViewVC logotype

Contents of /rpms/subsonic/contribs8/subsonic.spec

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


Revision 1.5 - (show annotations) (download)
Wed Nov 6 22:10:53 2013 UTC (10 years, 11 months ago) by unnilennium
Branch: MAIN
CVS Tags: subsonic-4_8-4_el5_sme
Changes since 1.4: +6 -1 lines
* Wed Nov 6 2013 JP Pialasse <tests@pialasse.com> 4.8-4.sme
- dependencies corrected.

1 %define name subsonic
2 %define version 4.8
3 %define release 4
4 Name: %{name}
5 Version: %{version}
6 Release: %{release}%{?dist}
7 Summary: A web-based music streamer, jukebox and Podcast receiver
8 Source: %{name}-%{version}.tar.gz
9 BuildRoot: /var/tmp/%{name}-%{version}-buildroot
10 BuildArch: noarch
11 BuildRequires: e-smith-devtools
12 AutoReqProv: no
13
14 Group: Applications/Multimedia
15 License: GPLv3
16 URL: http://subsonic.org
17
18 %changelog
19 * Wed Nov 6 2013 JP Pialasse <tests@pialasse.com> 4.8-4.sme
20 - dependencies corrected.
21
22 * Sun Oct 27 2013 JP Pialasse <tests@pialasse.com> 4.8-3.sme
23 - first build for sme
24 - adding noarch
25 - adding e-smith-devtools
26
27 %description
28 Subsonic is a web-based music streamer, jukebox and Podcast receiver,
29 providing access to your music collection wherever you are. Use it
30 to share your music with friends, or to listen to your music while away
31 from home.
32
33 Apps for Android, iPhone and Windows Phone are also available.
34
35 Java 1.6 or higher is required to run Subsonic.
36
37 Subsonic can be found at http://subsonic.org
38 %prep
39 %setup
40
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
45 rm -f %{name}-%{version}-filelist
46 /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
47 | grep -v "/etc/sysconfig/subsonic" \
48 > %{name}-%{version}-filelist
49
50 %clean
51 rm -rf $RPM_BUILD_ROOT
52
53 %files -f %{name}-%{version}-filelist
54 %defattr(-,root,root)
55 %config(noreplace) /etc/sysconfig/subsonic
56 #%files
57 #%defattr(644,root,root,755)
58 #/usr/share/subsonic/subsonic-booter-jar-with-dependencies.jar
59 #/usr/share/subsonic/subsonic.war
60 #%attr(755,root,root) /usr/share/subsonic/subsonic.sh
61 #%attr(755,root,root) /etc/init.d/subsonic
62 #%attr(755,root,root) /var/subsonic/transcode/ffmpeg
63 #%attr(755,root,root) /var/subsonic/transcode/lame
64 #%config(noreplace) /etc/sysconfig/subsonic
65
66 %pre
67 # Stop Subsonic service.
68 if [ -e /etc/init.d/subsonic ]; then
69 service subsonic stop
70 fi
71
72 # Backup database.
73 if [ -e /var/subsonic/db ]; then
74 rm -rf /var/subsonic/db.backup
75 cp -R /var/subsonic/db /var/subsonic/db.backup
76 fi
77
78 exit 0
79
80 %post
81 ln -sf /usr/share/subsonic/subsonic.sh /usr/bin/subsonic
82 chmod 750 /var/subsonic
83
84 # Clear jetty cache.
85 rm -rf /var/subsonic/jetty
86
87 # For SELinux: Set security context
88 chcon -t java_exec_t /etc/init.d/subsonic 2>/dev/null
89
90 # Configure and start Subsonic service.
91 chkconfig --add subsonic
92 service subsonic start
93
94 exit 0
95
96 %preun
97 # Only do it if uninstalling, not upgrading.
98 if [ $1 = 0 ] ; then
99
100 # Stop the service.
101 [ -e /etc/init.d/subsonic ] && service subsonic stop
102
103 # Remove symlink.
104 rm -f /usr/bin/subsonic
105
106 # Remove startup scripts.
107 chkconfig --del subsonic
108
109 fi
110
111 exit 0
112

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