20
20
# The build will then automatically link to the static .a files
21
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
23
Summary: Gnomad 2 is a Linux/BSD GNOME 2.0 client for the Creative Nomad/Zen Jukeboxes and Dell DJs
25
25
Version: %{version}
26
26
Release: %{release}
28
28
URL: http://gnomad2.sourceforge.net
29
29
Group: Applications/Multimedia
30
30
Source0: %{name}-%{version}.tar.gz
31
31
Packager: Linus Walleij <triad@df.lth.se>
32
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
37
Requires: libusb >= 0.1.5
38
38
Requires: libstdc++
40
BuildRequires: glib2-devel >= @GLIB_REQUIRED@
41
BuildRequires: gtk2-devel >= @GTK_REQUIRED@
42
BuildRequires: libgnome-devel >= @LIBGNOME_REQUIRED@
43
BuildRequires: libgnomeui-devel >= @LIBGNOMEUI_REQUIRED@
40
Requires: libnjb >= 2.2
41
# Comment out the following line when linking statically.
42
Requires: libid3tag >= 0.15.1
43
BuildRequires: glib2-devel
44
BuildRequires: gtk2-devel
45
BuildRequires: libgnome-devel
46
BuildRequires: libgnomeui-devel
44
47
BuildRequires: libusb-devel >= 0.1.5
45
#BuildRequires: libnjb
46
#BuildRequires: id3lib-devel >= 3.8.0
48
# Comment out the following line when linking statically.
49
BuildRequires: libid3tag-devel >= 0.15.1
47
50
Docdir: %{prefix}/share/doc
51
Gnomad 2 is a client for the Nomad Jukebox utilizing the
54
Gnomad 2 is a client for the Creative Nomad Jukeboxes,
55
Zen, Zen USB 2.0, NX, Xtra, Touch and Micro, plus the
56
Dell DJs utilizing the
52
57
libnjb library for jukebox communication. It is used for
53
58
storing MP3 (and WAV, WMA) files on the jukebox and
54
59
retrieving them again, it also handles data file storage
66
71
rm -rf $RPM_BUILD_ROOT
67
mkdir -p $RPM_BUILD_ROOT/etc/hotplug/usb
68
72
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
75
rm -rf $RPM_BUILD_ROOT
194
78
%defattr(-,root,root)
195
79
%{_bindir}/gnomad2
80
%{_datadir}/man/man1/gnomad2.1.gz
196
81
%{_datadir}/applications/gnomad2.desktop
197
82
%{_datadir}/locale/*/LC_MESSAGES/gnomad2.mo
198
83
%{_datadir}/application-registry/gnomad2.applications
199
84
%{_datadir}/pixmaps/gnomad2-logo.png
200
%dir /etc/hotplug/usb
201
%config(noreplace) /etc/hotplug/usb/*
202
85
%doc AUTHORS NEWS README COPYING
88
* Thu Jun 30 2005 Linus Walleij <triad@df.lth.se> 2.8.0-1
89
- New release with many fixes and new libnjb stuff.
90
* Sat Jun 4 2005 Linus Walleij <triad@df.lth.se> 2.7.0-1
91
- New release with many fixes.
92
* Wed Feb 9 2005 Linus Walleij <triad@df.lth.se> 2.6.3-1
93
- Incremental update to sync with libnjb.
94
* Thu Jan 20 2005 Linus Walleij <triad@df.lth.se> 2.6.1-1
95
- Fixed Dell Pocket DJ and some more things.
96
* Fri Dec 10 2004 Linus Walleij <triad@df.lth.se> 2.6.1-1
97
- Fixed Dell DJ 2 and NJB1 issues
98
* Tue Nov 30 2004 Linus Walleij <triad@df.lth.se> 2.6.0-1
99
- File system folders and Zen Micro support, libnjb 1.3 CVS needed
205
100
* Wed Sep 29 2004 Linus Walleij <triad@df.lth.se> 2.5.0-1
206
101
- Lots of cool features, libnjb 1.2 CVS version needed
207
102
* Thu Apr 29 2004 Linus Walleij <triad@df.lth.se> 2.4.4-1