rpm/barry.spec file now assumes gui and opensync, with conditional checks
[barry/pauldeden.git] / rpm / barry.spec
blob3e241ef8ce1013e5d619a3e0f7bdfbfc18af050e
1 # always build with GUI
2 %define with_gui 1
4 # Fedora 9 doesn't support opensync 0.22
5 %if 0%{?fc9}
6 %define with_opensync 0
7 %else
8 %define with_opensync 1
9 %endif
13 Summary: BlackBerry(tm) Desktop for Linux
14 Name: barry
15 Version: 0.13
16 Release: 1
17 Group: Applications/Productivity
18 License: GPL
19 Source: %{name}-%{version}.tar.bz2
20 URL: http://www.netdirect.ca/downloads/barry
21 Vendor: Net Direct Inc.
22 BuildRoot: %{_tmppath}/%{name}-%{release}-%{version}-root
24 %if 0%{?suse_version}
25 BuildRequires: libusb, gcc-c++, pkgconfig, boost-devel
26 %else
27 BuildRequires: libusb-devel, gcc-c++, pkgconfig, boost-devel
28 %endif
30 %define barryroot %{_builddir}/%{name}-%{version}
32 %description
33 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
34 is a registered trademark of Research in Motion Limited.)
37 %package -n libbarry
38 Summary: BlackBerry(tm) Desktop for Linux - libbarry libraries
39 Group: Development/Libraries
40 Requires: libusb boost
42 %description -n libbarry
43 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
44 is a registered trademark of Research in Motion Limited.)
46 This package contains the library files, license agreement, README file,
47 and most other assorted documentation common to all sub-packages. You most
48 likely want to also install barry-util and barry-gui.
51 %package -n libbarry-devel
52 Summary: BlackBerry(tm) Desktop for Linux - libbarry libraries
53 Group: Development/Libraries
54 %if 0%{?suse_version}
55 Requires: libbarry libusb boost-devel
56 %else
57 Requires: libbarry libusb-devel boost-devel
58 %endif
60 %description -n libbarry-devel
61 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
62 is a registered trademark of Research in Motion Limited.)
64 This package contains the development library files for Barry, libbarry.
67 %package util
68 Summary: BlackBerry(tm) Desktop for Linux - bcharge, btool, breset and others
69 Group: Applications/Productivity
70 Requires: libbarry
71 Conflicts: barry-bcharge
73 %description util
74 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
75 is a registered trademark of Research in Motion Limited.)
77 This package contains the commandline tools bcharge, btool, breset and others
78 which will enable you to charge your device with a proper 500mA and be able
79 to access the data on the device in many ways.
82 %if %{with_gui}
83 %package gui
84 Summary: BlackBerry(tm) Desktop for Linux - bcharge, btool, breset and others
85 Group: Applications/Productivity
86 %if 0%{?suse_version}
87 Requires: libbarry gtkmm2 libglademm libtar
88 BuildRequires: gtkmm2-devel libglademm-devel libtar-devel
89 %else
90 Requires: libbarry gtkmm24 libglademm24 libtar
91 BuildRequires: gtkmm24-devel libglademm24-devel libtar-devel
92 %endif
94 %description gui
95 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
96 is a registered trademark of Research in Motion Limited.)
98 This package contains the GUI applications built on top of libbarry.
99 %endif
102 %if %{with_opensync}
103 %package opensync
104 Summary: BlackBerry(tm) Desktop for Linux - opensync plugin
105 Group: Applications/Productivity
106 Requires: libbarry, libopensync >= 0.22
107 BuildRequires: libopensync-devel
109 %description opensync
110 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
111 is a registered trademark of Research in Motion Limited.)
113 This package contains the opensync plugin.
114 %endif
116 %prep
117 %setup -q
119 %build
120 # main tree
121 %{configure} --with-boost
122 %{__make} %{?_smp_mflags}
124 # gui tree
125 %if %{with_gui}
126 cd gui/
127 %{configure} PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
128 %{__make} %{?_smp_mflags}
129 cd ../
130 %endif
132 # opensync tree
133 %if %{with_opensync}
134 cd opensync-plugin/
135 %{configure} PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
136 %{__make} %{?_smp_mflags}
137 cd ../
138 %endif
140 %install
141 # main tree
142 %{__make} DESTDIR=%{buildroot} install
143 %{__mkdir_p} %{buildroot}%{_sysconfdir}/udev/rules.d
144 %{__cp} udev/10-blackberry.rules %{buildroot}%{_sysconfdir}/udev/rules.d/
145 %{__mkdir_p} %{buildroot}%{_sysconfdir}/security/console.perms.d
146 %{__cp} udev/10-blackberry.perms %{buildroot}%{_sysconfdir}/security/console.perms.d/
147 %{__mkdir_p} %{buildroot}%{_sysconfdir}/modprobe.d
148 %{__cp} modprobe/blacklist-berry_charge %{buildroot}%{_sysconfdir}/modprobe.d/
149 %{__mkdir_p} %{buildroot}%{_sysconfdir}/ppp/peers
150 %{__cp} ppp/barry-rogers %{buildroot}%{_sysconfdir}/ppp/peers/
151 %{__cp} ppp/barry-verizon %{buildroot}%{_sysconfdir}/ppp/peers/
152 %{__cp} ppp/barry-sprint %{buildroot}%{_sysconfdir}/ppp/peers/
153 %{__mkdir_p} %{buildroot}%{_sysconfdir}/chatscripts
154 %{__cp} ppp/barry-rogers.chat %{buildroot}%{_sysconfdir}/chatscripts/
155 %{__cp} ppp/barry-verizon.chat %{buildroot}%{_sysconfdir}/chatscripts/
156 %{__cp} ppp/barry-sprint.chat %{buildroot}%{_sysconfdir}/chatscripts/
158 # gui tree
159 %if %{with_gui}
160 cd gui/
161 %{__make} DESTDIR=%{buildroot} install
162 cd ../
163 %endif
165 # opensync tree
166 %if %{with_opensync}
167 cd opensync-plugin/
168 %{__make} DESTDIR=%{buildroot} install
169 cd ../
170 %endif
172 %files -n libbarry
173 %defattr(-,root,root)
174 %attr(-,root,root) %{_libdir}/*.so*
175 %doc AUTHORS ChangeLog COPYING NEWS README
177 %files -n libbarry-devel
178 %defattr(-,root,root)
179 %doc examples/*.cc examples/*.am
180 %attr(0644,root,root) %{_includedir}/barry/*
181 %attr(0644,root,root) %{_libdir}/*.a
182 %attr(0755,root,root) %{_libdir}/*.la
183 %attr(0644,root,root) %{_libdir}/pkgconfig/*.pc
184 %doc COPYING TODO doc/*
186 %files util
187 %defattr(-,root,root)
188 %attr(0755,root,root) %{_sbindir}/bcharge
189 %attr(0755,root,root) %{_sbindir}/breset
190 %attr(0755,root,root) %{_sbindir}/pppob
191 %attr(0755,root,root) %{_bindir}/btool
192 %attr(0755,root,root) %{_bindir}/bs11nread
193 %attr(0755,root,root) %{_bindir}/bidentify
194 %attr(0755,root,root) %{_bindir}/brecsum
195 %attr(0755,root,root) %{_bindir}/upldif
196 %attr(0755,root,root) %{_bindir}/bktrans
197 %attr(0755,root,root) %{_bindir}/btranslate
198 %attr(0644,root,root) %{_mandir}/man1/btool*
199 %attr(0644,root,root) %{_mandir}/man1/bs11nread*
200 %attr(0644,root,root) %{_mandir}/man1/bidentify*
201 %attr(0644,root,root) %{_mandir}/man1/bcharge*
202 %attr(0644,root,root) %{_mandir}/man1/pppob*
203 %attr(0644,root,root) %{_mandir}/man1/brecsum*
204 %attr(0644,root,root) %{_mandir}/man1/breset*
205 %attr(0644,root,root) %{_mandir}/man1/upldif*
206 %attr(0644,root,root) %config %{_sysconfdir}/udev/rules.d/*
207 %attr(0644,root,root) %config %{_sysconfdir}/security/console.perms.d/*
208 %attr(0644,root,root) %config %{_sysconfdir}/modprobe.d/blacklist-berry_charge
209 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-rogers
210 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-verizon
211 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-sprint
212 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-rogers.chat
213 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-verizon.chat
214 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-sprint.chat
215 %doc COPYING
217 %if %{with_gui}
218 %files gui
219 %defattr(-,root,root)
220 %attr(0755,root,root) %{_bindir}/barrybackup
221 %attr(0644,root,root) %{_datadir}/barry/glade/*.glade
222 %attr(0644,root,root) %{_mandir}/man1/barrybackup*
223 %doc COPYING
224 %endif
226 %if %{with_opensync}
227 %files opensync
228 %defattr(-,root,root)
229 %attr(0755,root,root) %{_libdir}/opensync/plugins/*
230 %attr(0644,root,root) %{_datadir}/opensync/defaults/*
231 %doc COPYING
232 %endif
234 %clean
235 [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
236 [ "%{barryroot}" != "/" ] && %{__rm} -rf %{barryroot}
238 %post -n libbarry
239 /sbin/ldconfig
241 %postun -n libbarry
242 /sbin/ldconfig
244 %changelog
245 * Thu May 29 2008 Chris Frey <cdfrey@foursquare.net> 0.13-1
246 - version bump
247 - added brecsum
248 - added ppp options and chat scripts
249 - added manpages for pppob, brecsum, breset, upldif, barrybackup
250 - spec file now assumes gui and opensync, with conditional checks depending on host
252 * Fri Dec 07 2007 Chris Frey <cdfrey@foursquare.net> 0.12-1
253 - version bump
255 * Fri Nov 30 2007 Chris Frey <cdfrey@foursquare.net> 0.11-1
256 - version bump
258 * Fri Nov 30 2007 Chris Frey <cdfrey@foursquare.net> 0.10-1
259 - version bump
260 - removed ktrans and translate from rpm package
261 - added bidentify
263 * Thu Aug 09 2007 Chris Frey <cdfrey@foursquare.net> 0.9-1
264 - version bump
266 * Fri Aug 03 2007 Chris Frey <cdfrey@foursquare.net> 0.8-1
267 - version bump
268 - changed tarball to bz2
270 * Tue May 01 2007 Chris Frey <cdfrey@foursquare.net> 0.7-2
271 - added pppob to utils
273 * Thu Mar 08 2007 Chris Frey <cdfrey@foursquare.net> 0.7-1
274 - removed barry base package that only contained docs, and put docs in libbarry*
275 - changed barrybackup reference to barry-gui
276 - removed the patch step, as version 0.7 shouldn't need it
277 - added license file to each package
279 * Sun Mar 04 2007 Troy Engel <tengel@users.sourceforge.net> 0.6-1
280 - initial build
281 - adding udev and console perms patch for raw 0.6