~ubuntu-branches/ubuntu/hardy/gnomad2/hardy

« back to all changes in this revision

Viewing changes to gnomad2.spec.in

  • Committer: Bazaar Package Importer
  • Author(s): Shaun Jackman
  • Date: 2005-08-19 16:09:28 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050819160928-l2glu227nh0algdc
Tags: 2.8.0-2
Add a versioned dependency for libnjb-dev (>> 2.2). Closes: #324036.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.
22
22
 
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
24
24
Name:           %{name}
25
25
Version:        %{version}
26
26
Release:        %{release}
27
 
Copyright:      GPL
 
27
License:        GPL
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@
 
33
Requires:       glib2
 
34
Requires:       gtk2
 
35
Requires:       libgnome
 
36
Requires:       libgnomeui
37
37
Requires:       libusb >= 0.1.5
38
38
Requires:       libstdc++
39
39
Requires:       zlib
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
48
51
Prefix:         %{_prefix}
49
52
 
50
53
%description
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
64
69
 
65
70
%install
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
72
 
 
73
 
%post
74
 
# This is much because RedHat use an old hotplug version that
75
 
# doesn't recognize the personalized usermap properly.
76
 
function inmap {
77
 
    while read LINE; do
78
 
        if [ "x${LINE}" != "x" ]; then
79
 
            firstword=`echo ${LINE} | awk '{ print $1 }'`
80
 
            if [ ${firstword} != "#" ]; then
81
 
                script=${firstword}
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
87
 
                            echo "yes"
88
 
                            return 0
89
 
                        fi
90
 
                    fi
91
 
                fi
92
 
            fi
93
 
        fi
94
 
    done < $1
95
 
    echo "no"
96
 
    return 0
97
 
}
98
 
function patchusermap {
99
 
    comment=""
100
 
    while read LINE; do
101
 
        if [ "x$LINE" != "x" ]; then
102
 
            firstword=`echo ${LINE} | awk '{ print $1 }'`
103
 
            if [ ${firstword} = "#" ]; then
104
 
                comment=${LINE}
105
 
            else
106
 
                script=${firstword}
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."
113
 
                        echo ${LINE} >> $2
114
 
                        comment=""
115
 
                    else
116
 
                        echo "Already installed."
117
 
                    fi
118
 
                fi
119
 
            fi
120
 
        fi
121
 
    done < $1
122
 
}
123
 
# echo "Checking hotplugging CVS version..."
124
 
# echo "/etc/hotplug/usb/*.usermap support was added in august 2002"
125
 
EDITMAP="yes"
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
134
 
        EDITMAP="no"
135
 
    else
136
 
        if [ "${YEAR}" -eq "2002" ]; then
137
 
            if [ "${MONTH}" -ge "08" ]; then
138
 
                EDITMAP="no"
139
 
            fi
140
 
        fi
141
 
    fi
142
 
fi
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
146
 
else
147
 
    # echo "No need to edit the ${HOTPLUGPATH}/usb.usermap file."
148
 
fi
149
 
 
150
 
%postun
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
155
 
then
156
 
    # Nothing
157
 
    # echo "Nothing to remove from usb.usermap."
158
 
else
159
 
    # echo "Checking hotplugging CVS version..."
160
 
    # echo "/etc/hotplug/usb/*.usermap support was added in august 2002"
161
 
    EDITMAP="yes"
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
170
 
                EDITMAP="no"
171
 
        else
172
 
                if [ "${YEAR}" -eq "2002" ]; then
173
 
                        if [ "${MONTH}" -ge "08" ]; then
174
 
                                EDITMAP="no"
175
 
                        fi
176
 
                fi
177
 
        fi
178
 
    fi
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."
184
 
    else
185
 
        # echo "No need to remove any usb.usermap entries."
186
 
    fi
187
 
fi
188
 
 
189
73
 
190
74
%clean
191
75
rm -rf $RPM_BUILD_ROOT
193
77
%files
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
203
86
 
204
87
%changelog
 
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