Blob Blame History Raw
# Fedora <= 8 & ==11 currently supports opensync 0.22
%if 0%{?fc9}%{?fc10}
     %define with_opensync 0
%else
     %define with_opensync 1
%endif

Name:           barry
Version:        0.15
Release:        0.10.20090630git%{?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 OR git pull barry
# 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}-20090630.tar.bz2
Source1:        %{name}.desktop
Source2:        barrybackup24.png
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 gettext-devel doxygen autoconf zlib-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 - libraries
Group: System Environment/Libraries
Requires: udev pam module-init-tools

%description libs
This package contains the library files, license agreement and README file.

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

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

%package devel-docs
Summary: BlackBerry Desktop for Linux - development libraries documentation
Group: Development/Libraries
%if 0%{?fedora} >= 10
BuildArch: noarch
%endif

%description devel-docs
This package contains the documentation for the development library files for
Barry.

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

%description opensync
This package contains the opensync plugin to synchronize your BlackBerry.
%endif

%prep
%setup -q
%{__rm} -rf ./doc/www/*.php
%{__rm} -rf ./doc/www/*.sh
find ./doc/www/doxygen/html -type f -size 0 -name \*.map -exec rm '{}' \;

%build
# main tree
%{configure} --enable-boost --with-zlib
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
%{__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
%{__make} %{?_smp_mflags}
cd ../
%endif

%install
# main tree
%{__rm} -rf %{buildroot}
%{__make} DESTDIR=%{buildroot} install
%{__mkdir_p} %{buildroot}%{_sysconfdir}/udev/rules.d
%{__mkdir_p} %{buildroot}%{_sysconfdir}/security/console.perms.d
%{__cp} udev/fedora/10-blackberry.rules %{buildroot}%{_sysconfdir}/udev/rules.d/
%{__cp} udev/fedora/10-blackberry.perms %{buildroot}%{_sysconfdir}/security/console.perms.d/
%{__mkdir_p} %{buildroot}%{_sysconfdir}/modprobe.d
%{__cp} modprobe/blacklist-berry_charge.conf %{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/
# Install hal fdi config
%{__mkdir_p} %{buildroot}%{_datadir}/hal/fdi/information/10freedesktop
%{__mkdir_p} %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor
%{__cp} hal/fdi/information/10freedesktop/10-blackberry.fdi %{buildroot}%{_datadir}/hal/fdi/information/10freedesktop
%{__cp} hal/fdi/policy/10osvendor/19-blackberry-acl.fdi %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor
# Install hal support script
%{__mkdir_p} %{buildroot}%{_bindir}
%{__cp} hal/hal-blackberry %{buildroot}%{_bindir}

# gui tree
cd gui/
%{__make} DESTDIR=%{buildroot} install
desktop-file-install --vendor="" --dir=%{buildroot}%{_datadir}/applications/ %{SOURCE1}
%{__mkdir_p} %{buildroot}%{_datadir}/icons/hicolor/24x24/apps

install -p -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/barrybackup.png
cd ../

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

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

%files
%defattr(-,root,root)
%{_sbindir}/*
%{_bindir}/*
%{_mandir}/man1/*
%{_datadir}/hal/fdi/information/10freedesktop/10-blackberry.fdi
%{_datadir}/hal/fdi/policy/10osvendor/19-blackberry-acl.fdi
%{_datadir}/barry/glade/*.glade
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/barrybackup*.png

%config(noreplace) %{_sysconfdir}/ppp/peers/*
%config(noreplace) %{_sysconfdir}/chatscripts/*.chat

%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.conf
%doc AUTHORS ChangeLog COPYING NEWS README

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

%files devel-docs
%defattr(-,root,root)
%doc COPYING doc/*

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

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

%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%post libs -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%changelog
* Fri Jan 22 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 0.1.5-0.10.200963git
- Rebuild for Boost soname bump

* Thu Sep 17 2009 Peter Lemenkov <lemenkov@gmail.com> - 0.15-0.9.20090630git
- Rebuilt with new fuse

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-0.8.20090630git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Jun 30 2009 Christopher D. Stover <quantumburnz@hotmail.com> 0.15-0.7.20090630git
- version/git bump
- create separate doc package; BZ#508462
- fixed opensync build issue; BZ#506609
- incorporated hal changes to fix permission issues; BZ#478851
- add icon for BarryBackup; BZ#483151

* Wed Jun 23 2009 Christopher D. Stover <quantumburnz@hotmail.com> 0.15-0.6.20090623git
- version/git bump
- added configure --with-zlib

* 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