rpm: barry-util now installs the 69 udev rules file for Fedora 12
[barry.git] / rpm / barry.spec
blob6a821f03008fdeef5571831405535c8cb0034175
1 %dump
3 # always build with GUI
4 %define with_gui 1
6 # Fedora 9 doesn't support opensync 0.22
7 %if 0%{?fc9}
8 %define with_opensync 0
9 %else
10 %define with_opensync 1
11 %endif
15 Summary: BlackBerry(tm) Desktop for Linux
16 Name: barry
17 Version: 0.17
18 Release: 0
19 Group: Applications/Productivity
20 License: GPLv2+
21 Source: %{name}-%{version}.tar.bz2
22 URL: http://www.netdirect.ca/software/packages/barry
23 Vendor: Net Direct Inc.
24 BuildRoot: %{_tmppath}/%{name}-%{release}-%{version}-root
26 %if 0%{?suse_version}
27 BuildRequires: libusb, gcc-c++, pkgconfig, boost-devel, fuse-devel, zlib-devel
28 %else
29 BuildRequires: libusb-devel, gcc-c++, pkgconfig, boost-devel, fuse-devel, zlib-devel
30 %endif
32 %if %{with_gui}
33 BuildRequires: desktop-file-utils
34 %endif
36 %define barryroot %{_builddir}/%{name}-%{version}
38 %description
39 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
40 is a registered trademark of Research in Motion Limited.)
43 %package -n libbarry0
44 Summary: BlackBerry(tm) Desktop for Linux - libbarry libraries
45 Group: Development/Libraries
46 Requires: libusb boost
48 %description -n libbarry0
49 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
50 is a registered trademark of Research in Motion Limited.)
52 This package contains the library files, license agreement, README file,
53 and most other assorted documentation common to all sub-packages. You most
54 likely want to also install barry-util and barry-gui.
57 %package -n libbarry-devel
58 Summary: BlackBerry(tm) Desktop for Linux - libbarry libraries
59 Group: Development/Libraries
60 %if 0%{?suse_version}
61 Requires: libbarry0 libusb boost-devel
62 %else
63 Requires: libbarry0 libusb-devel boost-devel
64 %endif
66 %description -n libbarry-devel
67 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
68 is a registered trademark of Research in Motion Limited.)
70 This package contains the development library files for Barry, libbarry.
73 %package util
74 Summary: BlackBerry(tm) Desktop for Linux - bcharge, btool, breset and others
75 Group: Applications/Productivity
76 Requires: libbarry0 fuse
77 Conflicts: barry-bcharge
79 %description util
80 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
81 is a registered trademark of Research in Motion Limited.)
83 This package contains the commandline tools bcharge, btool, breset and others
84 which will enable you to charge your device with a proper 500mA and be able
85 to access the data on the device in many ways.
88 %if %{with_gui}
89 %package gui
90 Summary: BlackBerry(tm) Desktop for Linux - bcharge, btool, breset and others
91 Group: Applications/Productivity
92 %if 0%{?suse_version}
93 Requires: libbarry0 gtkmm2 libglademm libtar
94 BuildRequires: gtkmm2-devel libglademm-devel libtar-devel
95 %else
96 Requires: libbarry0 gtkmm24 libglademm24 libtar
97 BuildRequires: gtkmm24-devel libglademm24-devel libtar-devel
98 %endif
100 %description gui
101 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
102 is a registered trademark of Research in Motion Limited.)
104 This package contains the GUI applications built on top of libbarry.
105 %endif
108 %if %{with_opensync}
109 %package opensync
110 Summary: BlackBerry(tm) Desktop for Linux - opensync plugin
111 Group: Applications/Productivity
112 Requires: libbarry0, libopensync >= 0.22
113 BuildRequires: libopensync-devel
115 %description opensync
116 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
117 is a registered trademark of Research in Motion Limited.)
119 This package contains the opensync plugin.
120 %endif
122 %prep
123 %setup -q
125 %build
126 # main tree
127 %{configure} --enable-boost --enable-nls --with-zlib
128 %{__make} %{?_smp_mflags}
130 # gui tree
131 %if %{with_gui}
132 cd gui/
133 %{configure} PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src" --enable-nls
134 %{__make} %{?_smp_mflags}
135 cd ../
136 %endif
138 # opensync tree
139 %if %{with_opensync}
140 cd opensync-plugin/
141 %{configure} PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src" --enable-nls
142 %{__make} %{?_smp_mflags}
143 cd ../
144 %endif
146 %install
147 # main tree
148 %{__make} DESTDIR=%{buildroot} install
149 # delete some test-only programs
150 %{__rm} -f %{buildroot}%{_bindir}/bdptest
151 %{__rm} -f %{buildroot}%{_bindir}/bjvmdebug
152 # proceed as usual...
153 %{__mkdir_p} %{buildroot}%{_sysconfdir}/udev/rules.d
154 %{__cp} udev/10-blackberry.rules %{buildroot}%{_sysconfdir}/udev/rules.d/
155 %if 0%{?fc12}
156 %{__cp} udev/69-blackberry.rules %{buildroot}%{_sysconfdir}/udev/rules.d/
157 %else
158 %{__cp} udev/99-blackberry-perms.rules %{buildroot}%{_sysconfdir}/udev/rules.d/
159 %endif
160 %{__mkdir_p} %{buildroot}%{_sysconfdir}/modprobe.d
161 %{__cp} modprobe/blacklist-berry_charge.conf %{buildroot}%{_sysconfdir}/modprobe.d/
162 %{__mkdir_p} %{buildroot}%{_sysconfdir}/ppp/peers
163 %{__cp} ppp/barry-rogers %{buildroot}%{_sysconfdir}/ppp/peers/
164 %{__cp} ppp/barry-verizon %{buildroot}%{_sysconfdir}/ppp/peers/
165 %{__cp} ppp/barry-sprint %{buildroot}%{_sysconfdir}/ppp/peers/
166 %{__cp} ppp/barry-o2ireland %{buildroot}%{_sysconfdir}/ppp/peers/
167 %{__cp} ppp/barry-tmobileus %{buildroot}%{_sysconfdir}/ppp/peers/
168 %{__cp} ppp/barry-att_cingular %{buildroot}%{_sysconfdir}/ppp/peers/
169 %{__cp} ppp/barry-chinamobile %{buildroot}%{_sysconfdir}/ppp/peers/
170 %{__cp} ppp/barry-kpn %{buildroot}%{_sysconfdir}/ppp/peers/
171 %{__mkdir_p} %{buildroot}%{_sysconfdir}/chatscripts
172 %{__cp} ppp/barry-rogers.chat %{buildroot}%{_sysconfdir}/chatscripts/
173 %{__cp} ppp/barry-verizon.chat %{buildroot}%{_sysconfdir}/chatscripts/
174 %{__cp} ppp/barry-sprint.chat %{buildroot}%{_sysconfdir}/chatscripts/
175 %{__cp} ppp/barry-o2ireland.chat %{buildroot}%{_sysconfdir}/chatscripts/
176 %{__cp} ppp/barry-tmobileus.chat %{buildroot}%{_sysconfdir}/chatscripts/
177 %{__cp} ppp/barry-att_cingular.chat %{buildroot}%{_sysconfdir}/chatscripts/
178 %{__cp} ppp/barry-chinamobile.chat %{buildroot}%{_sysconfdir}/chatscripts/
179 %{__cp} ppp/barry-kpn.chat %{buildroot}%{_sysconfdir}/chatscripts/
180 # Install hal fdi config
181 %{__mkdir_p} %{buildroot}%{_datadir}/hal/fdi/information/10freedesktop
182 %{__mkdir_p} %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor
183 %{__cp} hal/fdi/information/10freedesktop/10-blackberry.fdi %{buildroot}%{_datadir}/hal/fdi/information/10freedesktop
184 %{__cp} hal/fdi/policy/10osvendor/19-blackberry-acl.fdi %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor
185 # Install hal support script
186 %{__mkdir_p} %{buildroot}%{_bindir}
187 %{__cp} hal/hal-blackberry %{buildroot}%{_bindir}
188 # Install bash completion scripts
189 %{__mkdir_p} %{buildroot}%{_sysconfdir}/bash_completion.d
190 %{__cp} bash/bjavaloader %{buildroot}%{_sysconfdir}/bash_completion.d
191 %{__cp} bash/btool %{buildroot}%{_sysconfdir}/bash_completion.d
193 # gui tree
194 %if %{with_gui}
195 cd gui/
196 %{__make} DESTDIR=%{buildroot} install
197 # Install barry logo icon
198 cd ../
199 %{__mkdir_p} %{buildroot}%{_datadir}/pixmaps
200 %{__cp} logo/barry_logo_icon.png %{buildroot}%{_datadir}/pixmaps
201 desktop-file-install --vendor netdirect \
202 --dir %{buildroot}%{_datadir}/applications \
203 rpm/barrybackup.desktop
204 %endif
206 # opensync tree
207 %if %{with_opensync}
208 cd opensync-plugin/
209 %{__make} DESTDIR=%{buildroot} install
210 cd ../
211 %endif
213 %files -n libbarry0
214 %defattr(-,root,root)
215 %attr(-,root,root) %{_libdir}/*.so*
216 %doc AUTHORS ChangeLog COPYING NEWS README
218 %files -n libbarry-devel
219 %defattr(-,root,root)
220 %doc examples/*.cc examples/*.am
221 %attr(0644,root,root) %{_includedir}/barry/*
222 %attr(0644,root,root) %{_libdir}/*.a
223 %attr(0755,root,root) %{_libdir}/*.la
224 %attr(0644,root,root) %{_libdir}/pkgconfig/*.pc
225 %doc COPYING TODO doc/*
227 %files util
228 %defattr(-,root,root)
229 %attr(0755,root,root) %{_sbindir}/bcharge
230 %attr(0755,root,root) %{_sbindir}/breset
231 %attr(0755,root,root) %{_sbindir}/pppob
232 %attr(0755,root,root) %{_bindir}/btool
233 %attr(0755,root,root) %{_bindir}/bfuse
234 %attr(0755,root,root) %{_bindir}/bjavaloader
235 %attr(0755,root,root) %{_bindir}/bjdwp
236 %attr(0755,root,root) %{_bindir}/bs11nread
237 %attr(0755,root,root) %{_bindir}/bidentify
238 %attr(0755,root,root) %{_bindir}/brecsum
239 %attr(0755,root,root) %{_bindir}/upldif
240 %attr(0755,root,root) %{_bindir}/bktrans
241 %attr(0755,root,root) %{_bindir}/btranslate
242 %attr(0755,root,root) %{_bindir}/brimtrans
243 %attr(0755,root,root) %{_bindir}/hal-blackberry
244 %attr(0644,root,root) %{_mandir}/man1/btool*
245 %attr(0644,root,root) %{_mandir}/man1/bfuse*
246 %attr(0644,root,root) %{_mandir}/man1/bjavaloader*
247 %attr(0644,root,root) %{_mandir}/man1/bjdwp*
248 %attr(0644,root,root) %{_mandir}/man1/bs11nread*
249 %attr(0644,root,root) %{_mandir}/man1/bidentify*
250 %attr(0644,root,root) %{_mandir}/man1/bcharge*
251 %attr(0644,root,root) %{_mandir}/man1/pppob*
252 %attr(0644,root,root) %{_mandir}/man1/brecsum*
253 %attr(0644,root,root) %{_mandir}/man1/breset*
254 %attr(0644,root,root) %{_mandir}/man1/upldif*
255 %attr(0644,root,root) %{_datadir}/locale/*
256 %attr(0644,root,root) %{_datadir}/hal/fdi/information/10freedesktop/10-blackberry.fdi
257 %attr(0644,root,root) %{_datadir}/hal/fdi/policy/10osvendor/19-blackberry-acl.fdi
258 %attr(0644,root,root) %config %{_sysconfdir}/udev/rules.d/*
259 %attr(0644,root,root) %config %{_sysconfdir}/modprobe.d/blacklist-berry_charge.conf
260 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-rogers
261 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-verizon
262 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-sprint
263 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-o2ireland
264 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-tmobileus
265 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-att_cingular
266 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-chinamobile
267 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-kpn
268 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-rogers.chat
269 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-verizon.chat
270 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-sprint.chat
271 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-o2ireland.chat
272 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-tmobileus.chat
273 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-att_cingular.chat
274 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-chinamobile.chat
275 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-kpn.chat
276 %attr(0640,root,root) %config %{_sysconfdir}/bash_completion.d/bjavaloader
277 %attr(0640,root,root) %config %{_sysconfdir}/bash_completion.d/btool
278 %doc COPYING
279 %doc zsh
281 %if %{with_gui}
282 %files gui
283 %defattr(-,root,root)
284 %attr(0755,root,root) %{_bindir}/barrybackup
285 %attr(0644,root,root) %{_datadir}/barry/glade/*.glade
286 %attr(0644,root,root) %{_datadir}/pixmaps/barry_logo_icon.png
287 %attr(0644,root,root) %{_datadir}/applications/*barrybackup*.desktop
288 %attr(0644,root,root) %{_mandir}/man1/barrybackup*
289 %doc COPYING
290 %endif
292 %if %{with_opensync}
293 %files opensync
294 %defattr(-,root,root)
295 %attr(0755,root,root) %{_libdir}/opensync/plugins/*
296 %attr(0644,root,root) %{_datadir}/opensync/defaults/*
297 %doc COPYING
298 %endif
300 %clean
301 [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
302 [ "%{barryroot}" != "/" ] && %{__rm} -rf %{barryroot}
304 %post -n libbarry0
305 /sbin/ldconfig
307 %postun -n libbarry0
308 /sbin/ldconfig
310 %changelog
311 * Thu Oct 01 2009 Chris Frey <cdfrey@foursquare.net> 0.17-0
312 - version bump
313 - added NLS support
315 * Sat Sep 29 2009 Chris Frey <cdfrey@foursquare.net> 0.16-0
316 - version bump
317 - added new ppp chat script for KPN Nederland
318 - using new udev rules set
319 - added bjdwp and manpage, and removed some test-only programs
320 - added bash and zsh completion scripts
321 - added .desktop file and icon for barrybackup
323 * Fri Apr 10 2009 Chris Frey <cdfrey@foursquare.net> 0.15-0
324 - version bump
325 - added HAL FDI scripts
326 - added bjavaloader and bfuse
327 - updated for udev directory reorganization in Barry source tree
328 - added zlib-devel to BuildRequires list
329 - added brimtrans
331 * Wed Sep 24 2008 Chris Frey <cdfrey@foursquare.net> 0.14-0
332 - version bump
333 - added new ppp chat script for T-Mobile US
334 - renamed libbarry to libbarry0
336 * Thu May 29 2008 Chris Frey <cdfrey@foursquare.net> 0.13-1
337 - version bump
338 - added brecsum
339 - added ppp options and chat scripts
340 - added manpages for pppob, brecsum, breset, upldif, barrybackup
341 - spec file now assumes gui and opensync, with conditional checks depending on host
343 * Fri Dec 07 2007 Chris Frey <cdfrey@foursquare.net> 0.12-1
344 - version bump
346 * Fri Nov 30 2007 Chris Frey <cdfrey@foursquare.net> 0.11-1
347 - version bump
349 * Fri Nov 30 2007 Chris Frey <cdfrey@foursquare.net> 0.10-1
350 - version bump
351 - removed ktrans and translate from rpm package
352 - added bidentify
354 * Thu Aug 09 2007 Chris Frey <cdfrey@foursquare.net> 0.9-1
355 - version bump
357 * Fri Aug 03 2007 Chris Frey <cdfrey@foursquare.net> 0.8-1
358 - version bump
359 - changed tarball to bz2
361 * Tue May 01 2007 Chris Frey <cdfrey@foursquare.net> 0.7-2
362 - added pppob to utils
364 * Thu Mar 08 2007 Chris Frey <cdfrey@foursquare.net> 0.7-1
365 - removed barry base package that only contained docs, and put docs in libbarry*
366 - changed barrybackup reference to barry-gui
367 - removed the patch step, as version 0.7 shouldn't need it
368 - added license file to each package
370 * Sun Mar 04 2007 Troy Engel <tengel@users.sourceforge.net> 0.6-1
371 - initial build
372 - adding udev and console perms patch for raw 0.6