Blob Blame History Raw
# Fedora 9/10/11 don't support opensync 0.22
%define with_opensync 1
%if %{?fedora} > 8
    %define with_opensync 0
%endif

Name:           barry
Version:        0.15
Release:        0.5.20090109git%{?dist}
Summary:        BlackBerry Desktop for Linux

Group:          Applications/Productivity
License:        GPLv2+
URL:            http://www.netdirect.ca/downloads/barry
# The source for this package was pulled from upstream's git.  Use the following
# commands to generate the tarball:
# git clone git://repo.or.cz/barry.git
# cd barry/maintainer
# ./git-extract.sh 0 15 master
# (cd build/barry* && ../../tar-prepare.sh)
# (cd build && ../tar-create.sh 0 15)
Source0:        %{name}-%{version}-20090109.tar.bz2
Source1:        %{name}.desktop
# ip_modem password patch for the Blackberry Bold 9000
# http://sourceforge.net/mailarchive/forum.php?thread_name=4968F513.1050909%40comcast.net&forum_name=barry-devel
Patch0:         barry-ipmodem.patch
Patch1:         barry-includes.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  libusb-devel boost-devel desktop-file-utils gtkmm24-devel
BuildRequires:  libglademm24-devel libglade2-devel libtar-devel libtool
BuildRequires:  fuse-devel
Requires:       initscripts

%description
Barry is a desktop toolset for managing your BlackBerry device.

This package contains commandline tools which will enable you to charge your
device with a proper 500mA and be able to access data on the device.  It also
includes a GUI application to backup your BlackBerry.


%package libs
Summary: BlackBerry Desktop for Linux - barry libraries
Group: System Environment/Libraries
Requires: udev pam module-init-tools

%description libs
Barry is a desktop toolset for managing your BlackBerry device.

This package contains the library files, license agreement, README file,
and most other assorted documentation common to all sub-packages.


%package devel
Summary: BlackBerry Desktop for Linux - barry development libraries
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
Requires: libusb-devel boost-devel pkgconfig

%description devel
Barry is a desktop toolset for managing your BlackBerry device.

This package contains the development library files for Barry, barry-libs.


%if %{with_opensync}
%package opensync
Summary: BlackBerry Desktop for Linux - opensync plugin
Group: Applications/Productivity
BuildRequires: libopensync-devel
Requires: libopensync == 0.22

%description opensync
Barry is a desktop toolset for managing your BlackBerry device.

This package contains the opensync plugin.
%endif

%prep
%setup -q
%{__rm} -rf ./doc/www/*.php
%{__rm} -rf ./doc/www/*.sh
%{__rm} -rf ./doc/www/doxygen/html/scoped__lock_8h__incl.map
%{__rm} -rf ./doc/www/doxygen/html/classBarry_1_1ZeroPacket__inherit__graph.map
%{__rm} -rf ./doc/www/doxygen/html/dataqueue_8h__incl.map
%{__rm} -rf ./doc/www/doxygen/html/classBarry_1_1ZeroPacket__coll__graph.map
%{__rm} -rf ./doc/www/doxygen/html/protostructs_8h__incl.map
%{__rm} -rf ./doc/www/doxygen/html/classBarry_1_1DBPacket__inherit__graph.map
%{__rm} -rf ./doc/www/doxygen/html/bcharge_8cc__incl.map
%{__rm} -rf ./doc/www/doxygen/html/bidentify_8cc__incl.map
%{__rm} -rf ./doc/www/doxygen/html/packet_8h__incl.map
%{__rm} -rf ./doc/www/doxygen/html/strnlen_8h__incl.map
%{__rm} -rf ./doc/www/doxygen/html/bs11nread_8cc__incl.map
%{__rm} -rf ./doc/www/doxygen/html/bfuse_8cc__incl.map
%{__rm} -rf ./doc/www/doxygen/html/btool_8cc__incl.map
%{__rm} -rf ./doc/www/doxygen/html/pppob_8cc__incl.map
%{__rm} -rf ./doc/www/doxygen/html/upldif_8cc__incl.map
%{__rm} -rf ./doc/www/doxygen/html/brecsum_8cc__incl.map
%{__rm} -rf ./doc/www/doxygen/html/breset_8cc__incl.map
%{__rm} -rf ./doc/www/doxygen/html/endian_8h__incl.map
%patch0 -p1
%patch1 -p1


%build
# main tree
%{configure} --with-boost
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%{__make} %{?_smp_mflags}

# gui tree
cd gui/
%{configure} PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
# Touch-magic to prevent auto* from running.  Thank you Andreas Metzler.
touch -r Makefile ./src/Makefile ./src/Makefile.am ./src/Makefile.in \
  ./man/Makefile.am ./man/Makefile.in config.h config.h.in Makefile.am \
  Makefile.in configure.ac aclocal.m4 configure
%{__make} %{?_smp_mflags}
cd ../

# opensync tree
%if %{with_opensync}
cd opensync-plugin/
%{configure} PKG_CONFIG_PATH="..:$PKG_CONFIG_PATH" CXXFLAGS="-I../.." LDFLAGS="-L../../src"
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
cd ../
%endif

%install
# main tree
%{__rm} -rf %{buildroot}
%{__make} DESTDIR=%{buildroot} install
%{__mkdir_p} %{buildroot}%{_sysconfdir}/udev/rules.d
%{__cp} udev/10-blackberry.rules %{buildroot}%{_sysconfdir}/udev/rules.d/
%{__mkdir_p} %{buildroot}%{_sysconfdir}/security/console.perms.d
%{__cp} udev/10-blackberry.perms %{buildroot}%{_sysconfdir}/security/console.perms.d/
%{__mkdir_p} %{buildroot}%{_sysconfdir}/modprobe.d
%{__cp} modprobe/blacklist-berry_charge %{buildroot}%{_sysconfdir}/modprobe.d/
%{__mkdir_p} %{buildroot}%{_sysconfdir}/ppp/peers
%{__cp} ppp/barry-* %{buildroot}%{_sysconfdir}/ppp/peers/
%{__mkdir_p} %{buildroot}%{_sysconfdir}/chatscripts
%{__cp} ppp/barry-*.chat %{buildroot}%{_sysconfdir}/chatscripts/

# gui tree
cd gui/
%{__make} DESTDIR=%{buildroot} install
desktop-file-install --vendor="" --dir=%{buildroot}%{_datadir}/applications/ %{SOURCE1} 
cd ../

# opensync tree
%if %{with_opensync}
cd opensync-plugin/
%{__make} DESTDIR=%{buildroot} install
cd ../
%endif

%{__rm} -rf %{buildroot}%{_libdir}/*.la
%{__rm} -rf %{buildroot}%{_libdir}/*.a

%files
%defattr(-,root,root)
%{_sbindir}/*
%{_bindir}/*
%{_datadir}/barry/
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/*
%config(noreplace) %{_sysconfdir}/ppp/peers/*
%config(noreplace) %{_sysconfdir}/chatscripts/

%files libs
%defattr(-,root,root)
%{_libdir}/*.so.*
%config(noreplace) %{_sysconfdir}/udev/rules.d/*
%config(noreplace) %{_sysconfdir}/security/console.perms.d/*
%config(noreplace) %{_sysconfdir}/modprobe.d/blacklist-berry_charge
%doc AUTHORS ChangeLog COPYING NEWS README

%files devel
%defattr(-,root,root)
%doc examples/*.cc examples/*.am
%{_includedir}/barry/
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%doc TODO doc/*

%if %{with_opensync}
%files opensync
%defattr(-,root,root)
%{_libdir}/opensync/plugins/*
%{_datadir}/opensync/defaults/*
%endif

%clean
%{__rm} -rf %{buildroot}

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%changelog
* Tue Mar 03 2009 Caolán McNamara <caolanm@redhat.com> - 0.15-0.5.20090109git
- include stdio.h for EOF

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-0.4.20090109git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Jan 12 2009 Christopher D. Stover <quantumburnz@hotmail.com> 0.15-0.3.20090109git
- version bump for proper patch name

* Mon Jan 12 2009 Christopher D. Stover <quantumburnz@hotmail.com> 0.15-0.2.20090109git
- enable fuse module during build
- include ip_modem password patch for the Blackberry Bold 9000

* Mon Jan 12 2009 Christopher D. Stover <quantumburnz@hotmail.com> 0.15-0.1.20090109git
- version/git bump

* Thu Dec 18 2008 Petr Machata <pmachata@redhat.com> - 0.14-6
- rebuild for new boost

* Mon Nov 12 2008 Christopher D. Stover <quantumburnz@hotmail.com> 0.14-5
- removed opensync support for F11

* Mon Nov 10 2008 Christopher D. Stover <quantumburnz@hotmail.com> 0.14-4
- merged gui with the main package

* Mon Nov 10 2008 Christopher D. Stover <quantumburnz@hotmail.com> 0.14-3
- fixed Requires and BuildRequires
- modified gui package summary
- moved some config files to the libs package
- removed static libraries

* Sun Nov 09 2008 Christopher D. Stover <quantumburnz@hotmail.com> 0.14-2
- updated license to GPLv2+
- fixed directory ownership issues
- created separate libs package and moved *.so to devel package
- cleaned up /doc/www
- removed Rpaths

* Sat Oct 28 2008 Christopher D. Stover <quantumburnz@hotmail.com> 0.14-1
- initial package for fedora

* Wed Sep 24 2008 Chris Frey <cdfrey@foursquare.net> 0.14-0
- version bump
- added new ppp chat script for T-Mobile US
- renamed libbarry to libbarry0

* Thu May 29 2008 Chris Frey <cdfrey@foursquare.net> 0.13-1
- version bump
- added brecsum
- added ppp options and chat scripts
- added manpages for pppob, brecsum, breset, upldif, barrybackup
- spec file now assumes gui and opensync, with conditional checks depending on host

* Fri Dec 07 2007 Chris Frey <cdfrey@foursquare.net> 0.12-1
- version bump

* Fri Nov 30 2007 Chris Frey <cdfrey@foursquare.net> 0.11-1
- version bump

* Fri Nov 30 2007 Chris Frey <cdfrey@foursquare.net> 0.10-1
- version bump
- removed ktrans and translate from rpm package
- added bidentify

* Thu Aug 09 2007 Chris Frey <cdfrey@foursquare.net> 0.9-1
- version bump

* Fri Aug 03 2007 Chris Frey <cdfrey@foursquare.net> 0.8-1
- version bump
- changed tarball to bz2

* Tue May 01 2007 Chris Frey <cdfrey@foursquare.net> 0.7-2
- added pppob to utils

* Thu Mar 08 2007 Chris Frey <cdfrey@foursquare.net> 0.7-1
- removed barry base package that only contained docs, and put docs in libbarry*
- changed barrybackup reference to barry-gui
- removed the patch step, as version 0.7 shouldn't need it
- added license file to each package

* Sun Mar 04 2007 Troy Engel <tengel@users.sourceforge.net> 0.6-1
- initial build
- adding udev and console perms patch for raw 0.6