2
%define version @VERSION@
4
# Release scheme for different RPM-based distributions:
5
# release = "1" for distro-independent stuff like source packages
6
# release = "1.rh9" - release 1 for Red Hat Linux 9
7
# release = "1.FC1" -release 1 for Fedora Core Linux 1
10
# Considering that there is no reliable distribution of id3lib and
11
# libnjb, I usually link these statically by commenting them out
12
# below. This involves particular building procedures:
14
# First install id3lib and libnjb from source or packages, then
15
# break your packages :-) thusly:
17
# rm /usr/local/lib/libnjb.so*
18
# rm /usr/local/lib/libid3*so*
20
# The build will then automatically link to the static .a files
21
# instead. I haven't found any better way to do this unfortunately.
23
Summary: Gnomad 2 is a Linux/BSD GNOME 2.0 client for the Nomad Jukebox
28
URL: http://gnomad2.sourceforge.net
29
Group: Applications/Multimedia
30
Source0: %{name}-%{version}.tar.gz
31
Packager: Linus Walleij <triad@df.lth.se>
32
BuildRoot: %{_builddir}/%{name}-%{version}-root
33
Requires: glib2 >= @GLIB_REQUIRED@
34
Requires: gtk2 >= @GTK_REQUIRED@
35
Requires: libgnome >= @LIBGNOME_REQUIRED@
36
Requires: libgnomeui >= @LIBGNOMEUI_REQUIRED@
37
Requires: libusb >= 0.1.5
40
BuildRequires: glib2-devel >= @GLIB_REQUIRED@
41
BuildRequires: gtk2-devel >= @GTK_REQUIRED@
42
BuildRequires: libgnome-devel >= @LIBGNOME_REQUIRED@
43
BuildRequires: libgnomeui-devel >= @LIBGNOMEUI_REQUIRED@
44
BuildRequires: libusb-devel >= 0.1.5
45
#BuildRequires: libnjb
46
#BuildRequires: id3lib-devel >= 3.8.0
47
Docdir: %{prefix}/share/doc
51
Gnomad 2 is a client for the Nomad Jukebox utilizing the
52
libnjb library for jukebox communication. It is used for
53
storing MP3 (and WAV, WMA) files on the jukebox and
54
retrieving them again, it also handles data file storage
55
and retrieval, playlists and a rudimentary player
56
with full support for the Creative EAX sound processor.
63
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
66
rm -rf $RPM_BUILD_ROOT
67
mkdir -p $RPM_BUILD_ROOT/etc/hotplug/usb
68
make DESTDIR=$RPM_BUILD_ROOT install
69
# install hotplug scripts so they are up to date
70
install -m 755 nomadjukebox $RPM_BUILD_ROOT/etc/hotplug/usb
71
install -m 644 nomad.usermap $RPM_BUILD_ROOT/etc/hotplug/usb
74
# This is much because RedHat use an old hotplug version that
75
# doesn't recognize the personalized usermap properly.
78
if [ "x${LINE}" != "x" ]; then
79
firstword=`echo ${LINE} | awk '{ print $1 }'`
80
if [ ${firstword} != "#" ]; then
82
manid=`echo ${LINE} | awk '{ print $3 }'`
83
productid=`echo ${LINE} | awk '{ print $4 }'`
84
if [ "x${script}" = "x$2" ]; then
85
if [ "x${manid}" = "x$3" ]; then
86
if [ "x${productid}" = "x$4" ]; then
98
function patchusermap {
101
if [ "x$LINE" != "x" ]; then
102
firstword=`echo ${LINE} | awk '{ print $1 }'`
103
if [ ${firstword} = "#" ]; then
107
manid=`echo ${LINE} | awk '{ print $3 }'`
108
productid=`echo ${LINE} | awk '{ print $4 }'`
109
if [ "x${manid}" != "x" ]; then
110
echo "Checking for product ${productid} in $2..."
111
if [ `inmap $2 ${script} ${manid} ${productid}` = "no" ]; then
112
echo "Not present, adding to hotplug map."
116
echo "Already installed."
123
# echo "Checking hotplugging CVS version..."
124
# echo "/etc/hotplug/usb/*.usermap support was added in august 2002"
126
CVSTAG=`grep '\$Id:' /etc/hotplug/usb.agent`
127
if [ "x${CVSTAG}" != "x" ]; then
128
DATE=`echo ${CVSTAG} | awk '{ print $5 }'`
129
# echo "Hotplug version seems to be from ${DATE}"
130
YEAR=`echo ${DATE} | awk 'BEGIN { FS="/"} {print $1; }'`
131
MONTH=`echo ${DATE} | awk 'BEGIN { FS="/"} {print $2; }'`
132
DAY=`echo ${DATE} | awk 'BEGIN { FS="/"} {print $3; }'`
133
if [ "${YEAR}" -gt "2002" ]; then
136
if [ "${YEAR}" -eq "2002" ]; then
137
if [ "${MONTH}" -ge "08" ]; then
143
if [ "x${EDITMAP}" = "xyes" ]; then
144
echo "We need to edit the ${HOTPLUGPATH}/usb.usermap if it exists..."
145
patchusermap /etc/hotplug/usb/nomad.usermap /etc/hotplug/usb.usermap
147
# echo "No need to edit the ${HOTPLUGPATH}/usb.usermap file."
151
# Remove entries from the usermap? What if someone has installed
152
# another program or from source? No way. See if the "nomadjukebox"
153
# script is still there, else remove the entries.
154
if test -f /etc/hotplug/usb/nomadjukebox
157
# echo "Nothing to remove from usb.usermap."
159
# echo "Checking hotplugging CVS version..."
160
# echo "/etc/hotplug/usb/*.usermap support was added in august 2002"
162
CVSTAG=`grep '\$Id:' /etc/hotplug/usb.agent`
163
if [ "x${CVSTAG}" != "x" ]; then
164
DATE=`echo ${CVSTAG} | awk '{ print $5 }'`
165
# echo "Hotplug version seems to be from ${DATE}"
166
YEAR=`echo ${DATE} | awk 'BEGIN { FS="/"} {print $1; }'`
167
MONTH=`echo ${DATE} | awk 'BEGIN { FS="/"} {print $2; }'`
168
DAY=`echo ${DATE} | awk 'BEGIN { FS="/"} {print $3; }'`
169
if [ "${YEAR}" -gt "2002" ]; then
172
if [ "${YEAR}" -eq "2002" ]; then
173
if [ "${MONTH}" -ge "08" ]; then
179
if [ "x${EDITMAP}" = "xyes" ]; then
180
# Remove any hotplug refs this hairy way
181
grep ^'[^n][^o][^m][^a][^d][^j][^u][^k][^e][^b][^o][^x]' /etc/hotplug/usb.usermap > /tmp/gnomad2.tmp
182
mv /tmp/gnomad2.tmp /etc/hotplug/usb.usermap
183
echo "Removed jukebox entries from usb.usermap."
185
# echo "No need to remove any usb.usermap entries."
191
rm -rf $RPM_BUILD_ROOT
194
%defattr(-,root,root)
196
%{_datadir}/applications/gnomad2.desktop
197
%{_datadir}/locale/*/LC_MESSAGES/gnomad2.mo
198
%{_datadir}/application-registry/gnomad2.applications
199
%{_datadir}/pixmaps/gnomad2-logo.png
200
%dir /etc/hotplug/usb
201
%config(noreplace) /etc/hotplug/usb/*
202
%doc AUTHORS NEWS README COPYING
205
* Wed Sep 29 2004 Linus Walleij <triad@df.lth.se> 2.5.0-1
206
- Lots of cool features, libnjb 1.2 CVS version needed
207
* Thu Apr 29 2004 Linus Walleij <triad@df.lth.se> 2.4.4-1
208
- Bug fixes, compilation on Gnome 2.5/2.6, libnjb 1.1
209
* Sat Apr 10 2004 Linus Walleij <triad@df.lth.se> 2.4.3-1
210
- Minor bug fixes, syncing up with some libnjb fixes.
211
* Mon Feb 22 2004 Linus Walleij <triad@df.lth.se> 2.4.2-1
212
- Minor bug fixes, syncing up with some libnjb fixes.
213
* Thu Jan 22 2004 Linus Walleij <triad@df.lth.se> 2.4.1-1
214
- Bug fixes, mainly NJB1 works again :-)
215
* Sat Jan 10 2004 Linus Walleij <triad@df.lth.se> 2.4.0-1
216
- Dell Digital Jukebox support, and syncs with CVS libnjb.
217
* Sat Dec 06 2003 Linus Walleij <triad@df.lth.se> 2.3.0-1
218
- Nomad Zen Xtra support, and sync to libnjb 1.0
219
* Mon Oct 27 2003 Linus Walleij <triad@df.lth.se> 2.2.0-1
220
- Nomad Zen NX support and full GTK+-2.0 migration.
221
* Sun Aug 10 2003 Linus Walleij <triad@df.lth.se> 2.1.0-2
222
- Relinking with updated version of libnjb.
223
* Sun Aug 10 2003 Linus Walleij <triad@df.lth.se> 2.1.0-1
224
- Several enhancements including stuff in libnjb.
225
* Thu May 22 2003 Linus Walleij <triad@df.lth.se> 2.0.2-1
226
- Making an RPM with minor bug fixes and some upgrade libnjb code.
227
* Sun Apr 20 2003 Linus Walleij <triad@df.lth.se> 2.0.1-2_rh9
228
- Fixing up a clean and working post script for the hotplugging
229
* Sat Apr 19 2003 Linus Walleij <triad@df.lth.se> 2.0.1-1_rh9
230
- Creating a RedHat 9 special, adding automated hotplug installation.
231
* Sun Mar 30 2003 Linus Walleij <triad@df.lth.se> 2.0.1
232
- Some fixes. Still relying on CVS version of libnjb.
233
* Thu Jan 16 2003 Linus Walleij <triad@df.lth.se> 2.0.0
234
- Skipped alpha. Going to sharp.
235
* Sun Jan 12 2003 Linus Walleij <triad@df.lth.se> 2.0.0a-1
236
- Initial alpha release of 2.0.0
237
* Mon Oct 07 2002 Linus Walleij <triad@df.lth.se> 1.1.6-1
238
- Bugfixes and preliminary NJB3 support
239
* Sat Sep 07 2002 Linus Walleij <triad@df.lth.se> 1.1.5-1
241
* Fri Jul 19 2002 Linus Walleij <triad@df.lth.se> 1.1.4-1
243
* Tue Jun 18 2002 Linus Walleij <triad@df.lth.se> 1.1.3-1
245
* Sat Jun 1 2002 Linus Walleij <triad@df.lth.se> 1.1.2-1
247
* Sat Apr 6 2002 Linus Walleij <triad@df.lth.se> 1.1.0-1
248
- First try at a GNOMAD RPM package.