Updated Debian binary package: manpages, ppp, warnings
[barry/pauldeden.git] / rpm / barry.spec
blob166cb2c4a7d180c99521a47a160b15f0ecdc95ef
1 ## pass in '--with gui' to build the GUI tools
2 # ex.: rpmbuild -ba barry.spec --with gui
4 ## pass in '--with opensync' to build the opensync plugin
5 # ex.: rpmbuild -ba barry.spec --with opensync
8 # When building on SuSE, remove the "-devel" on the following packages:
9 # libusb-devel
10 # gtkmm24-devel
12 # SuSE also seems to name libglademm24 differently:
13 # libglademm
16 # newer bcond_with() macros are not available on RHEL4/CentOS4 and below
17 %{?_with_gui: %define with_gui 1}
18 %{!?_with_gui: %define with_gui 0}
19 %{?_with_opensync: %define with_opensync 1}
20 %{!?_with_opensync: %define with_opensync 0}
22 Summary: BlackBerry(tm) Desktop for Linux
23 Name: barry
24 Version: 0.13
25 Release: 1
26 Group: Applications/Productivity
27 License: GPL
28 Source: %{name}-%{version}.tar.bz2
29 URL: http://www.netdirect.ca/downloads/barry
30 Vendor: Net Direct Inc.
31 BuildRoot: %{_tmppath}/%{name}-%{release}-%{version}-root
32 BuildRequires: libusb-devel, gcc-c++, pkgconfig, boost-devel, openssl-devel
34 %define barryroot %{_builddir}/%{name}-%{version}
36 %description
37 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
38 is a registered trademark of Research in Motion Limited.)
41 %package -n libbarry
42 Summary: BlackBerry(tm) Desktop for Linux - libbarry libraries
43 Group: Development/Libraries
44 Requires: libusb openssl boost
46 %description -n libbarry
47 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
48 is a registered trademark of Research in Motion Limited.)
50 This package contains the library files, license agreement, README file,
51 and most other assorted documentation common to all sub-packages. You most
52 likely want to also install barry-util and barry-gui.
55 %package -n libbarry-devel
56 Summary: BlackBerry(tm) Desktop for Linux - libbarry libraries
57 Group: Development/Libraries
58 Requires: libbarry libusb-devel openssl-devel boost-devel
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 Requires: libbarry gtkmm24 libglademm24 libtar
87 BuildRequires: gtkmm24-devel libglademm24-devel libtar-devel
89 %description gui
90 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
91 is a registered trademark of Research in Motion Limited.)
93 This package contains the GUI applications built on top of libbarry.
94 %endif
97 %if %{with_opensync}
98 %package opensync
99 Summary: BlackBerry(tm) Desktop for Linux - opensync plugin
100 Group: Applications/Productivity
101 Requires: libbarry, libopensync >= 0.22
102 BuildRequires: libopensync-devel
104 %description opensync
105 Barry is a desktop toolset for managing your BlackBerry(tm) device. (BlackBerry
106 is a registered trademark of Research in Motion Limited.)
108 This package contains the opensync plugin.
109 %endif
111 %prep
112 %setup -q
114 %build
115 # main tree
116 %{configure} --with-boost
117 %{__make} %{?_smp_mflags}
119 # gui tree
120 %if %{with_gui}
121 cd gui/
122 %{configure} PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
123 %{__make} %{?_smp_mflags}
124 cd ../
125 %endif
127 # opensync tree
128 %if %{with_opensync}
129 cd opensync-plugin/
130 %{configure} PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
131 %{__make} %{?_smp_mflags}
132 cd ../
133 %endif
135 %install
136 # main tree
137 %{__make} DESTDIR=%{buildroot} install
138 %{__mkdir_p} %{buildroot}%{_sysconfdir}/udev/rules.d
139 %{__cp} udev/10-blackberry.rules %{buildroot}%{_sysconfdir}/udev/rules.d/
140 %{__mkdir_p} %{buildroot}%{_sysconfdir}/security/console.perms.d
141 %{__cp} udev/10-blackberry.perms %{buildroot}%{_sysconfdir}/security/console.perms.d/
142 %{__mkdir_p} %{buildroot}%{_sysconfdir}/modprobe.d
143 %{__cp} modprobe/blacklist-berry_charge %{buildroot}%{_sysconfdir}/modprobe.d/
144 %{__mkdir_p} %{buildroot}%{_sysconfdir}/ppp/peers
145 %{__cp} ppp/barry-rogers %{buildroot}%{_sysconfdir}/ppp/peers/
146 %{__cp} ppp/barry-verizon %{buildroot}%{_sysconfdir}/ppp/peers/
147 %{__mkdir_p} %{buildroot}%{_sysconfdir}/chatscripts
148 %{__cp} ppp/barry-rogers.chat %{buildroot}%{_sysconfdir}/chatscripts/
149 %{__cp} ppp/barry-verizon.chat %{buildroot}%{_sysconfdir}/chatscripts/
151 # gui tree
152 %if %{with_gui}
153 cd gui/
154 %{__make} DESTDIR=%{buildroot} install
155 cd ../
156 %endif
158 # opensync tree
159 %if %{with_opensync}
160 cd opensync-plugin/
161 %{__make} DESTDIR=%{buildroot} install
162 cd ../
163 %endif
165 %files -n libbarry
166 %defattr(-,root,root)
167 %attr(-,root,root) %{_libdir}/*.so*
168 %doc AUTHORS ChangeLog COPYING NEWS README
170 %files -n libbarry-devel
171 %defattr(-,root,root)
172 %doc examples/*.cc examples/*.am
173 %attr(0644,root,root) %{_includedir}/barry/*
174 %attr(0644,root,root) %{_libdir}/*.a
175 %attr(0755,root,root) %{_libdir}/*.la
176 %attr(0644,root,root) %{_libdir}/pkgconfig/*.pc
177 %doc COPYING TODO doc/*
179 %files util
180 %defattr(-,root,root)
181 %attr(0755,root,root) %{_sbindir}/bcharge
182 %attr(0755,root,root) %{_sbindir}/breset
183 %attr(0755,root,root) %{_sbindir}/pppob
184 %attr(0755,root,root) %{_bindir}/btool
185 %attr(0755,root,root) %{_bindir}/bs11nread
186 %attr(0755,root,root) %{_bindir}/bidentify
187 %attr(0755,root,root) %{_bindir}/brecsum
188 %attr(0755,root,root) %{_bindir}/upldif
189 %attr(0755,root,root) %{_bindir}/bktrans
190 %attr(0755,root,root) %{_bindir}/btranslate
191 %attr(0644,root,root) %{_mandir}/man1/btool*
192 %attr(0644,root,root) %{_mandir}/man1/bs11nread*
193 %attr(0644,root,root) %{_mandir}/man1/bidentify*
194 %attr(0644,root,root) %{_mandir}/man1/bcharge*
195 %attr(0644,root,root) %{_mandir}/man1/pppob*
196 %attr(0644,root,root) %{_mandir}/man1/brecsum*
197 %attr(0644,root,root) %{_mandir}/man1/breset*
198 %attr(0644,root,root) %{_mandir}/man1/upldif*
199 %attr(0644,root,root) %config %{_sysconfdir}/udev/rules.d/*
200 %attr(0644,root,root) %config %{_sysconfdir}/security/console.perms.d/*
201 %attr(0644,root,root) %config %{_sysconfdir}/modprobe.d/blacklist-berry_charge
202 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-rogers
203 %attr(0644,root,root) %config %{_sysconfdir}/ppp/peers/barry-verizon
204 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-rogers.chat
205 %attr(0640,root,root) %config %{_sysconfdir}/chatscripts/barry-verizon.chat
206 %doc COPYING
208 %if %{with_gui}
209 %files gui
210 %defattr(-,root,root)
211 %attr(0755,root,root) %{_bindir}/barrybackup
212 %attr(0644,root,root) %{_datadir}/barry/glade/*.glade
213 %attr(0644,root,root) %{_mandir}/man1/barrybackup*
214 %doc COPYING
215 %endif
217 %if %{with_opensync}
218 %files opensync
219 %defattr(-,root,root)
220 %attr(0755,root,root) %{_libdir}/opensync/plugins/*
221 %attr(0644,root,root) %{_datadir}/opensync/defaults/*
222 %doc COPYING
223 %endif
225 %clean
226 [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
227 [ "%{barryroot}" != "/" ] && %{__rm} -rf %{barryroot}
229 %post -n libbarry
230 /sbin/ldconfig
232 %postun -n libbarry
233 /sbin/ldconfig
235 %changelog
236 * Thu May 29 2008 Chris Frey <cdfrey@foursquare.net> 0.13-1
237 - version bump
238 - added brecsum
239 - added ppp options and chat scripts
240 - added manpages for pppob, brecsum, breset, upldif, barrybackup
242 * Fri Dec 07 2007 Chris Frey <cdfrey@foursquare.net> 0.12-1
243 - version bump
245 * Fri Nov 30 2007 Chris Frey <cdfrey@foursquare.net> 0.11-1
246 - version bump
248 * Fri Nov 30 2007 Chris Frey <cdfrey@foursquare.net> 0.10-1
249 - version bump
250 - removed ktrans and translate from rpm package
251 - added bidentify
253 * Thu Aug 09 2007 Chris Frey <cdfrey@foursquare.net> 0.9-1
254 - version bump
256 * Fri Aug 03 2007 Chris Frey <cdfrey@foursquare.net> 0.8-1
257 - version bump
258 - changed tarball to bz2
260 * Tue May 01 2007 Chris Frey <cdfrey@foursquare.net> 0.7-2
261 - added pppob to utils
263 * Thu Mar 08 2007 Chris Frey <cdfrey@foursquare.net> 0.7-1
264 - removed barry base package that only contained docs, and put docs in libbarry*
265 - changed barrybackup reference to barry-gui
266 - removed the patch step, as version 0.7 shouldn't need it
267 - added license file to each package
269 * Sun Mar 04 2007 Troy Engel <tengel@users.sourceforge.net> 0.6-1
270 - initial build
271 - adding udev and console perms patch for raw 0.6