/[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.6 - (show annotations) (download)
Thu Nov 21 14:22:42 2013 UTC (11 years ago) by unnilennium
Branch: MAIN
CVS Tags: subsonic-4_8-5_el5_sme, HEAD
Changes since 1.5: +6 -1 lines
Error occurred while calculating annotation data.
* Thu Nov 21 2013 JP Pialasse <tests@pialasse.com> 4.8-5.sme
- removed system dir from filelist

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

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