~ubuntu-branches/debian/wheezy/libnjb/wheezy

« back to all changes in this revision

Viewing changes to libnjb.spec

  • Committer: Bazaar Package Importer
  • Author(s): Shaun Jackman
  • Date: 2004-12-26 15:21:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041226152109-1jp8ujo260tfmybi
Tags: 1.2-2
Synopses were incorrect (closes: #287290). 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%define name    libnjb
2
 
%define version 1.0.2
 
2
%define version 1.2
3
3
# Final releases: "1" = release number of final release, version 1
4
4
# CVS releases  : "0.yyyymmdd" = prerelease from CVS at date
5
5
#                 "0.yyyymmdd.rh9" = For Redhat 9
6
 
#                 "0.yyyymmdd.fc1" = For fedora core 1
 
6
#                 "0.yyyymmdd.FC1" = For fedora core 1
7
7
# Distributions : "1.rh9" = version 1 for redhat 9, release 1
8
 
#                 "1.fc1" = version 1 for fedora core 1, release 1
9
 
%define release 0.20040421
 
8
#                 "1.FC1" = version 1 for fedora core 1, release 1
 
9
%define release 0.20040924.FC2
10
10
%define prefix  /usr
11
11
 
12
12
Name:           %{name}
55
55
%clean
56
56
if [ -d $RPM_BUILD_ROOT ]; then rm -r $RPM_BUILD_ROOT; fi
57
57
 
58
 
%post -p /sbin/ldconfig
 
58
%post
 
59
/sbin/ldconfig
59
60
# This is much because RedHat use an old hotplug version that
60
61
# doesn't recognize the personalized usermap properly.
61
62
function inmap {
105
106
        fi
106
107
    done < $1
107
108
}
108
 
patchusermap /etc/hotplug/usb/nomad.usermap /etc/hotplug/usb.usermap
 
109
echo "Checking hotplugging CVS version..."
 
110
echo "/etc/hotplug/usb/*.usermap support was added in august 2002"
 
111
EDITMAP="yes"
 
112
CVSTAG=`grep '\$Id:' /etc/hotplug/usb.agent`
 
113
if [ "x${CVSTAG}" != "x" ]; then
 
114
    DATE=`echo ${CVSTAG} | awk '{ print $5 }'`
 
115
    echo "Hotplug version seems to be from ${DATE}"
 
116
    YEAR=`echo ${DATE} | awk 'BEGIN { FS="/"} {print $1; }'`
 
117
    MONTH=`echo ${DATE} | awk 'BEGIN { FS="/"} {print $2; }'`
 
118
    DAY=`echo ${DATE} | awk 'BEGIN { FS="/"} {print $3; }'`
 
119
    if [ "${YEAR}" -gt "2002" ]; then
 
120
        EDITMAP="no"
 
121
    else
 
122
        if [ "${YEAR}" -eq "2002" ]; then
 
123
            if [ "${MONTH}" -ge "08" ]; then
 
124
                EDITMAP="no"
 
125
            fi
 
126
        fi
 
127
    fi
 
128
fi
 
129
if [ "x${EDITMAP}" = "xyes" ]; then
 
130
    echo "We need to edit the ${HOTPLUGPATH}/usb.usermap if it exists..."
 
131
    patchusermap /etc/hotplug/usb/nomad.usermap /etc/hotplug/usb.usermap
 
132
else
 
133
    echo "No need to edit the ${HOTPLUGPATH}/usb.usermap file."
 
134
fi
109
135
 
110
 
%postun -p /sbin/ldconfig
 
136
%postun
 
137
/sbin/ldconfig
111
138
# Remove entries from the usermap? What if someone has installed
112
139
# another program or from source? No way. See if the "nomadjukebox"
113
140
# script is still there, else remove the entries.
116
143
    # Nothing
117
144
    echo "Nothing to remove from usb.usermap."
118
145
else
119
 
    # Remove any hotplug refs this hairy way
120
 
    grep ^'[^n][^o][^m][^a][^d][^j][^u][^k][^e][^b][^o][^x]' /etc/hotplug/usb.usermap > /tmp/gnomad2.tmp
121
 
    mv /tmp/gnomad2.tmp /etc/hotplug/usb.usermap
122
 
    echo "Removed jukebox entries from usb.usermap."
 
146
    echo "Checking hotplugging CVS version..."
 
147
    echo "/etc/hotplug/usb/*.usermap support was added in august 2002"
 
148
    EDITMAP="yes"
 
149
    CVSTAG=`grep '\$Id:' /etc/hotplug/usb.agent`
 
150
    if [ "x${CVSTAG}" != "x" ]; then
 
151
        DATE=`echo ${CVSTAG} | awk '{ print $5 }'`
 
152
        echo "Hotplug version seems to be from ${DATE}"
 
153
        YEAR=`echo ${DATE} | awk 'BEGIN { FS="/"} {print $1; }'`
 
154
        MONTH=`echo ${DATE} | awk 'BEGIN { FS="/"} {print $2; }'`
 
155
        DAY=`echo ${DATE} | awk 'BEGIN { FS="/"} {print $3; }'`
 
156
        if [ "${YEAR}" -gt "2002" ]; then
 
157
                EDITMAP="no"
 
158
        else
 
159
                if [ "${YEAR}" -eq "2002" ]; then
 
160
                        if [ "${MONTH}" -ge "08" ]; then
 
161
                                EDITMAP="no"
 
162
                        fi
 
163
                fi
 
164
        fi
 
165
    fi
 
166
    if [ "x${EDITMAP}" = "xyes" ]; then
 
167
        # Remove any hotplug refs this hairy way
 
168
        grep ^'[^n][^o][^m][^a][^d][^j][^u][^k][^e][^b][^o][^x]' /etc/hotplug/usb.usermap > /tmp/gnomad2.tmp
 
169
        mv /tmp/gnomad2.tmp /etc/hotplug/usb.usermap
 
170
        echo "Removed jukebox entries from usb.usermap."
 
171
    else
 
172
        echo "No need to remove any usb.usermap entries."
 
173
    fi
123
174
fi
124
175
 
125
176
%files
128
179
%{prefix}/lib/*.a
129
180
%{prefix}/lib/*.la
130
181
%{prefix}/include/*.h
 
182
%dir {prefix}/lib/pkgconfig
 
183
%{prefix}/lib/pkgconfig/*.pc
131
184
%dir /etc/hotplug/usb
132
185
%config(noreplace) /etc/hotplug/usb/*
133
186
%doc AUTHORS CHANGES FAQ INSTALL LICENSE HACKING
138
191
%doc AUTHORS CHANGES FAQ INSTALL LICENSE HACKING
139
192
 
140
193
%changelog
 
194
* Fri Sep 24 2004 Linus Walleij <triad@df.lth.se> 1.2-0.20040924
 
195
- A CVS snapshot, much needed.
 
196
* Tue May 25 2004 Linus Walleij <triad@df.lth.se> 1.1-1
 
197
- Added hook to redistribute pkgconfig module
 
198
* Wed Apr 25 2004 Linus Walleij <triad@df.lth.se> 1.1-1
 
199
- Final 1.1 release!
141
200
* Wed Apr 21 2004 Linus Walleij <triad@df.lth.se> 1.0.2-0.20040421
142
201
- A new CVS snapshot.
143
202
* Fri Apr 9 2004 Linus Walleij <triad@df.lth.se> 1.0.2-0.20040409