forked from deepfire/xmms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxmms.spec.in
228 lines (190 loc) · 6.54 KB
/
xmms.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
%define name @PACKAGE@
%define version @VERSION@
%define release 1
%define epoch 1
%define prefix /usr
## Check to see if libGL is installed. Build xmms-gl if it is.
%define withGL %(if [ -z "`rpm -q --whatprovides libGL.so.1 2>/dev/null | grep -v '^no package provides'`" ]; then echo 0; else echo 1; fi)
## Check to see if libmikmod is installed. Build xmms-mikmod if it is.
%define withmm %(if [ -z "`rpm -q --whatprovides libmikmod.so.2 2>/dev/null | grep -v '^no package provides'`" ]; then echo 0; else echo 1; fi)
%define wmmdev %(if [ -z "`rpm -q --whatprovides $(/usr/bin/which libmikmod-config 2>/dev/null) 2>/dev/null | grep -v '^no package provides'`" ]; then echo 0; else echo 1; fi)
## Check to see if libvorbisfile is installed. Build xmms-vorbis if it is.
%define withvorbis %(if [ -z "`rpm -q --whatprovides libvorbisfile.so.3 2>/dev/null | grep -v '^no package provides'`" ]; then echo 0; else echo 1; fi)
## Check to see if libalsa is installed. Build xmms-alsa if it is.
%define withalsa %(if [ -z "`rpm -q --whatprovides libasound.so.2 2>/dev/null | grep -v '^no package provides'`" ]; then echo 0; else echo 1; fi)
## Check to see if libesd is installed. Build xmms-esd if it is.
%define withesd %(if [ -z "`rpm -q --whatprovides /usr/bin/esd-config 2>/dev/null | grep -v '^no package provides'`" ]; then echo 0; else echo 1; fi)
## Funky hack to get package names that provide libmikmod and libmikmod-config
## Becuase of the differing package names between redhat, mandrake, etc.
%if %{withmm} == 1
%define mikmod %(rpm -q --qf '%{NAME}' --whatprovides libmikmod.so.2)
%endif
%if %{withmm} && %{wmmdev}
%define mmdev %(rpm -q --qf '%{NAME}' --whatprovides $(/usr/bin/which libmikmod-config))
%endif
%if %{withmm} && ! %{wmmdev}
%define mmdev /usr/bin/libmikmod-config
%endif
Summary: XMMS - Multimedia player for the X Window System.
Name: %{name}
Version: %{version}
Release: %{release}
Epoch: %{epoch}
License: GPL
Group: Applications/Multimedia
Vendor: XMMS Development Team <[email protected]>
Url: http://www.xmms.org/
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Obsoletes: x11amp, x11amp0.7-1-1, xmms-mpg123, xmms-mp3
Requires: gtk+ >= 1:1.2.2
BuildPrereq: gtk+-devel
%description
X MultiMedia System is a sound player written from scratch. Since it
uses the WinAmp GUI, it can use WinAmp skins. It can play mp3s, mods, s3ms,
and other formats. It now has support for input, output, general, and
visualization plugins.
%package devel
Summary: XMMS - Static libraries and header files.
Group: Applications/Multimedia
Obsoletes: x11amp-devel
Requires: %{name} = %{epoch}:%{version}, glib-devel >= 1:1.2.2, gtk+-devel >= 1:1.2.2
%description devel
Static libraries and header files required for compiling xmms plugins.
%if %{withesd} == 1
%package esd
Summary: XMMS - Output plugin for use with the esound package.
Group: Applications/Multimedia
Requires: %{name} >= %{epoch}:%{version}
Obsoletes: x11amp-esd
Requires: esound >= 0.2.8
%description esd
Output plugin for xmms for use with the esound package
%endif
%if %{withmm} == 1
%package mikmod
Summary: XMMS - Input plugin to play MODs.
Group: Applications/Multimedia
Obsoletes: x11amp-mikmod
Requires: %{name} >= %{epoch}:%{version}
Requires: %{mikmod} >= 3.1.6
BuildPrereq: %{mmdev}
%description mikmod
Input plugin for XMMS to play MODs (.MOD,.XM,.S3M, etc)
%endif
%if %{withvorbis} == 1
%package vorbis
Summary: XMMS - Input plugin to play OGGs
Group: Applications/Multimedia
Requires: %{name} >= %{epoch}:%{version}
Requires: libogg >= 1.0
Requires: libvorbis >= 1.0
BuildPrereq: libogg-devel
BuildPrereq: libvorbis-devel
%description vorbis
Input plugin for XMMS to play Ogg Vorbis files (.ogg).
%endif
%if %{withGL} == 1
%package gl
Summary: XMMS - Visualization plugins that use the Mesa3d library.
Group: Applications/Multimedia
Requires: %{name} = %{epoch}:%{version}
Obsoletes: xmms-mesa
%description gl
Visualization plugins that use the Mesa3d library.
%endif
%if %{withalsa} == 1
%package alsa
Summary: XMMS - ALSA output plugin
Group: Applications/Multimedia
Requires: %{name} >= %{epoch}:%{version}
Requires: alsa-lib >= 0.9.0
%description alsa
Output plugin for XMMS to use with the Advanced Linux Sound
Architecture (ALSA).
%endif
%prep
%setup -q
%build
unset LINGUAS || :;
%configure
make
%install
[ "${RPM_BUILD_ROOT}" != "/" ] && [ -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT};
mkdir -p ${RPM_BUILD_ROOT}
make install DESTDIR=$RPM_BUILD_ROOT
# Install icons.
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/mini
install -m 644 xmms/xmms_logo.xpm \
${RPM_BUILD_ROOT}%{_datadir}/pixmaps/xmms_logo.xpm
install -m 644 xmms/xmms_mini.xpm \
${RPM_BUILD_ROOT}%{_datadir}/pixmaps/mini/xmms_mini.xpm
# Install wmconfig file
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/X11/wmconfig
install -m 644 xmms/xmms.wmconfig \
${RPM_BUILD_ROOT}%{_sysconfdir}/X11/wmconfig/xmms
# Install applnk file
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/X11/applnk/Multimedia/
install -m 644 xmms/xmms.desktop \
${RPM_BUILD_ROOT}%{_sysconfdir}/X11/applnk/Multimedia/
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
[ "${RPM_BUILD_ROOT}" != "/" ] && [ -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT};
%files
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README
%{_sysconfdir}/X11/wmconfig/xmms
%{_sysconfdir}/X11/applnk/Multimedia/xmms.desktop
%{_bindir}/xmms
%{_bindir}/wmxmms
%{_libdir}/libxmms.*
%{_libdir}/xmms/Input/libcdaudio*
%{_libdir}/xmms/Input/libmpg123*
%{_libdir}/xmms/Input/libtonegen*
%{_libdir}/xmms/Input/libwav*
%{_libdir}/xmms/Output/libOSS*
%{_libdir}/xmms/Output/libdisk_writer*
%{_libdir}/xmms/General/*
%{_libdir}/xmms/Effect/*
%{_libdir}/xmms/Visualization/libbscope*
%{_libdir}/xmms/Visualization/libsanalyzer*
%{_mandir}/man1/xmms.*
%{_mandir}/man1/wmxmms.*
%{_datadir}/xmms/*
%{_datadir}/locale/*/LC_MESSAGES/xmms.mo
%{_datadir}/pixmaps/xmms_logo.xpm
%{_datadir}/pixmaps/mini/xmms_mini.xpm
%files devel
%defattr(-, root, root)
%{_bindir}/xmms-config
%{_libdir}/lib*.so
%{_libdir}/lib*.a
%{_includedir}/*
%{_datadir}/aclocal/xmms.m4
%if %{withesd} == 1
%files esd
%defattr(-, root, root)
%{_libdir}/xmms/Output/libesdout*
%endif
%if %{withmm} == 1
%files mikmod
%defattr(-, root, root)
%{_libdir}/xmms/Input/libmikmod*
%endif
%if %{withvorbis} == 1
%files vorbis
%defattr(-, root, root)
%{_libdir}/xmms/Input/libvorbis*
%endif
%if %{withGL} == 1
%files gl
%defattr(-, root, root)
%{_libdir}/xmms/Visualization/libogl_spectrum*
%endif
%if %{withalsa} == 1
%files alsa
%defattr(-, root, root)
%{_libdir}/xmms/Output/libALSA*
%endif
%changelog