Updated TODO file, removing opensync i18n bug
[barry.git] / rpm / barry.spec
blobb3d873f5121a43d8c93f85aaa730d90f2b688a57
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.15
18 Release: 0
19 Group: Applications/Productivity
20 License: GPL
21 Source: %{name}-%{version}.tar.bz2
22 URL: http://www.netdirect.ca/downloads/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
28 %else
29 BuildRequires: libusb-devel, gcc-c++, pkgconfig, boost-devel
30 %endif
32 %define barryroot %{_builddir}/%{name}-%{version}
34 %description
35 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
36 is a registered trademark of Research in Motion Limited.)
39 %package -n libbarry0
40 Summary: BlackBerry(tm) Desktop for Linux - libbarry libraries
41 Group: Development/Libraries
42 Requires: libusb boost
44 %description -n libbarry0
45 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
46 is a registered trademark of Research in Motion Limited.)
48 This package contains the library files, license agreement, README file,
49 and most other assorted documentation common to all sub-packages. You most
50 likely want to also install barry-util and barry-gui.
53 %package -n libbarry-devel
54 Summary: BlackBerry(tm) Desktop for Linux - libbarry libraries
55 Group: Development/Libraries
56 %if 0%{?suse_version}
57 Requires: libbarry0 libusb boost-devel
58 %else
59 Requires: libbarry0 libusb-devel boost-devel
60 %endif
62 %description -n libbarry-devel
63 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
64 is a registered trademark of Research in Motion Limited.)
66 This package contains the development library files for Barry, libbarry.
69 %package util
70 Summary: BlackBerry(tm) Desktop for Linux - bcharge, btool, breset and others
71 Group: Applications/Productivity
72 Requires: libbarry0
73 Conflicts: barry-bcharge
75 %description util
76 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
77 is a registered trademark of Research in Motion Limited.)
79 This package contains the commandline tools bcharge, btool, breset and others
80 which will enable you to charge your device with a proper 500mA and be able
81 to access the data on the device in many ways.
84 %if %{with_gui}
85 %package gui
86 Summary: BlackBerry(tm) Desktop for Linux - bcharge, btool, breset and others
87 Group: Applications/Productivity
88 %if 0%{?suse_version}
89 Requires: libbarry0 gtkmm2 libglademm libtar
90 BuildRequires: gtkmm2-devel libglademm-devel libtar-devel
91 %else
92 Requires: libbarry0 gtkmm24 libglademm24 libtar
93 BuildRequires: gtkmm24-devel libglademm24-devel libtar-devel
94 %endif
96 %description gui
97 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
98 is a registered trademark of Research in Motion Limited.)
100 This package contains the GUI applications built on top of libbarry.
101 %endif
104 %if %{with_opensync}
105 %package opensync
106 Summary: BlackBerry(tm) Desktop for Linux - opensync plugin
107 Group: Applications/Productivity
108 Requires: libbarry0, libopensync >= 0.22
109 BuildRequires: libopensync-devel
111 %description opensync
112 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
113 is a registered trademark of Research in Motion Limited.)
115 This package contains the opensync plugin.
116 %endif
118 %prep
119 %setup -q
121 %build
122 # main tree
123 %{configure} --with-boost
124 %{__make} %{?_smp_mflags}
126 # gui tree
127 %if %{with_gui}
128 cd gui/
129 %{configure} PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
130 %{__make} %{?_smp_mflags}
131 cd ../
132 %endif
134 # opensync tree
135 %if %{with_opensync}
136 cd opensync-plugin/
137 %{configure} PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
138 %{__make} %{?_smp_mflags}
139 cd ../
140 %endif
142 %install
143 # main tree
144 %{__make} DESTDIR=%{buildroot} install
145 %{__mkdir_p} %{buildroot}%{_sysconfdir}/udev/rules.d
146 %{__cp} udev/10-blackberry.rules %{buildroot}%{_sysconfdir}/udev/rules.d/
147 %{__mkdir_p} %{buildroot}%{_sysconfdir}/security/console.perms.d
148 %{__cp} udev/10-blackberry.perms %{buildroot}%{_sysconfdir}/security/console.perms.d/
149 %{__mkdir_p} %{buildroot}%{_sysconfdir}/modprobe.d
150 %{__cp} modprobe/blacklist-berry_charge %{buildroot}%{_sysconfdir}/modprobe.d/
151 %{__mkdir_p} %{buildroot}%{_sysconfdir}/ppp/peers
152 %{__cp} ppp/barry-rogers %{buildroot}%{_sysconfdir}/ppp/peers/
153 %{__cp} ppp/barry-verizon %{buildroot}%{_sysconfdir}/ppp/peers/
154 %{__cp} ppp/barry-sprint %{buildroot}%{_sysconfdir}/ppp/peers/
155 %{__cp} ppp/barry-o2ireland %{buildroot}%{_sysconfdir}/ppp/peers/
156 %{__cp} ppp/barry-tmobileus %{buildroot}%{_sysconfdir}/ppp/peers/
157 %{__mkdir_p} %{buildroot}%{_sysconfdir}/chatscripts
158 %{__cp} ppp/barry-rogers.chat %{buildroot}%{_sysconfdir}/chatscripts/
159 %{__cp} ppp/barry-verizon.chat %{buildroot}%{_sysconfdir}/chatscripts/
160 %{__cp} ppp/barry-sprint.chat %{buildroot}%{_sysconfdir}/chatscripts/
161 %{__cp} ppp/barry-o2ireland.chat %{buildroot}%{_sysconfdir}/chatscripts/
162 %{__cp} ppp/barry-tmobileus.chat %{buildroot}%{_sysconfdir}/chatscripts/
163 # Install hal fdi config
164 %{__mkdir_p} %{buildroot}%{_datadir}/hal/fdi/information/10freedesktop
165 %{__cp} hal/10-blackberry.fdi %{buildroot}%{_datadir}/hal/fdi/information/10freedesktop
166 # Install hal support script
167 %{__mkdir_p} %{buildroot}%{_bindir}
168 %{__cp} hal/hal-blackberry %{buildroot}%{_bindir}
170 # gui tree
171 %if %{with_gui}
172 cd gui/
173 %{__make} DESTDIR=%{buildroot} install
174 cd ../
175 %endif
177 # opensync tree
178 %if %{with_opensync}
179 cd opensync-plugin/
180 %{__make} DESTDIR=%{buildroot} install
181 cd ../
182 %endif
184 %files -n libbarry0
185 %defattr(-,root,root)
186 %attr(-,root,root) %{_libdir}/*.so*
187 %doc AUTHORS ChangeLog COPYING NEWS README
189 %files -n libbarry-devel
190 %defattr(-,root,root)
191 %doc examples/*.cc examples/*.am
192 %attr(0644,root,root) %{_includedir}/barry/*
193 %attr(0644,root,root) %{_libdir}/*.a
194 %attr(0755,root,root) %{_libdir}/*.la
195 %attr(0644,root,root) %{_libdir}/pkgconfig/*.pc
196 %doc COPYING TODO doc/*
198 %files util
199 %defattr(-,root,root)
200 %attr(0755,root,root) %{_sbindir}/bcharge
201 %attr(0755,root,root) %{_sbindir}/breset
202 %attr(0755,root,root) %{_sbindir}/pppob
203 %attr(0755,root,root) %{_bindir}/btool
204 %attr(0755,root,root) %{_bindir}/bs11nread
205 %attr(0755,root,root) %{_bindir}/bidentify
206 %attr(0755,root,root) %{_bindir}/brecsum
207 %attr(0755,root,root) %{_bindir}/upldif
208 %attr(0755,root,root) %{_bindir}/bktrans
209 %attr(0755,root,root) %{_bindir}/btranslate
210 %attr(0755,root,root) %{_bindir}/hal-blackberry
211 %attr(0644,root,root) %{_mandir}/man1/btool*
212 %attr(0644,root,root) %{_mandir}/man1/bs11nread*
213 %attr(0644,root,root) %{_mandir}/man1/bidentify*
214 %attr(0644,root,root) %{_mandir}/man1/bcharge*
215 %attr(0644,root,root) %{_mandir}/man1/pppob*
216 %attr(0644,root,root) %{_mandir}/man1/brecsum*
217 %attr(0644,root,root) %{_mandir}/man1/breset*
218 %attr(0644,root,root) %{_mandir}/man1/upldif*
219 %attr(0644,root,root) %{_datadir}/hal/fdi/information/10freedesktop/10-blackberry.fdi
220 %attr(0644,root,root) %config %{_sysconfdir}/udev/rules.d/*
221 %attr(0644,root,root) %config %{_sysconfdir}/security/console.perms.d/*
222 %attr(0644,root,root) %config %{_sysconfdir}/modprobe.d/blacklist-berry_charge
223 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-rogers
224 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-verizon
225 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-sprint
226 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-o2ireland
227 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-tmobileus
228 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-rogers.chat
229 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-verizon.chat
230 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-sprint.chat
231 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-o2ireland.chat
232 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-tmobileus.chat
233 %doc COPYING
235 %if %{with_gui}
236 %files gui
237 %defattr(-,root,root)
238 %attr(0755,root,root) %{_bindir}/barrybackup
239 %attr(0644,root,root) %{_datadir}/barry/glade/*.glade
240 %attr(0644,root,root) %{_mandir}/man1/barrybackup*
241 %doc COPYING
242 %endif
244 %if %{with_opensync}
245 %files opensync
246 %defattr(-,root,root)
247 %attr(0755,root,root) %{_libdir}/opensync/plugins/*
248 %attr(0644,root,root) %{_datadir}/opensync/defaults/*
249 %doc COPYING
250 %endif
252 %clean
253 [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
254 [ "%{barryroot}" != "/" ] && %{__rm} -rf %{barryroot}
256 %post -n libbarry0
257 /sbin/ldconfig
259 %postun -n libbarry0
260 /sbin/ldconfig
262 %changelog
263 * Fri Oct 31 2008 Chris Frey <cdfrey@foursquare.net> 0.15-0
264 - version bump
265 - added HAL FDI scripts
267 * Wed Sep 24 2008 Chris Frey <cdfrey@foursquare.net> 0.14-0
268 - version bump
269 - added new ppp chat script for T-Mobile US
270 - renamed libbarry to libbarry0
272 * Thu May 29 2008 Chris Frey <cdfrey@foursquare.net> 0.13-1
273 - version bump
274 - added brecsum
275 - added ppp options and chat scripts
276 - added manpages for pppob, brecsum, breset, upldif, barrybackup
277 - spec file now assumes gui and opensync, with conditional checks depending on host
279 * Fri Dec 07 2007 Chris Frey <cdfrey@foursquare.net> 0.12-1
280 - version bump
282 * Fri Nov 30 2007 Chris Frey <cdfrey@foursquare.net> 0.11-1
283 - version bump
285 * Fri Nov 30 2007 Chris Frey <cdfrey@foursquare.net> 0.10-1
286 - version bump
287 - removed ktrans and translate from rpm package
288 - added bidentify
290 * Thu Aug 09 2007 Chris Frey <cdfrey@foursquare.net> 0.9-1
291 - version bump
293 * Fri Aug 03 2007 Chris Frey <cdfrey@foursquare.net> 0.8-1
294 - version bump
295 - changed tarball to bz2
297 * Tue May 01 2007 Chris Frey <cdfrey@foursquare.net> 0.7-2
298 - added pppob to utils
300 * Thu Mar 08 2007 Chris Frey <cdfrey@foursquare.net> 0.7-1
301 - removed barry base package that only contained docs, and put docs in libbarry*
302 - changed barrybackup reference to barry-gui
303 - removed the patch step, as version 0.7 shouldn't need it
304 - added license file to each package
306 * Sun Mar 04 2007 Troy Engel <tengel@users.sourceforge.net> 0.6-1
307 - initial build
308 - adding udev and console perms patch for raw 0.6