Installing Barry
Dependencies

See the software dependencies page for detailed information on the software that Barry needs.

Getting the Source

There are 2 ways to get the source code:

- download the release tarball from the download page
- download the development tree using git

Using The Tarball Release

There are multiple source packages available on the Sourceforge download page. The main tarball is always the tar.bz2 package. This contains everything in git, including pre-built configure scripts and website documentation.

As an alternative, the tar.gz packages are Debian-specific. This comes as an "orig" tarball, with the debian/ subdirectory contained in the diff.gz file. A .dsc file is included as well, for ease of Debian package building. These files can be expanded into a Debian style source tree with the following command, for example:

    	dpkg-source -x barry_0.15-0.dsc

Once the tar.gz and diff.gz files are combined, you will have a tree identical to what comes with the tar.bz2 package.

See Building the Source below for instructions on building the resulting tree.

Alternatively, there are rpm source packages, in the form of src.rpm files. These packages can be installed and built as usual, using the rpm and rpmbuild commands.

Using git

The same development tree is also available via git, and can be browsed on the web at the Barry git page. You can clone the repository like this:

    	git clone git://repo.or.cz/barry.git barry

This will place the Barry sources in the barry directory. To update your source tree periodically, do the following:

    	cd barry
    	./buildgen.sh cleanall      (optional)
    	git checkout master
    	git pull origin

Preparing Development Sources for Configure

If you're using a development tree, you'll need to build the usual ./configure script before you can proceed. To do this, you will need autoconf, automake, and libtool as stated on the dependencies page. The correct sequence of commands to build ./configure is already stored in the ./buildgen.sh shell script in the root level directory of the Barry tree.

    	cd barry
    	./buildgen.sh

Building the Source

At this point, or if you are using a source tarball, building Barry is a matter of the common set of commands:

    	./configure
    	make
    	make install          (possibly as root)

The top level configure script has two sub-package options:

- --enable-gui
- --enable-opensync-plugin

Each option will recurse into the gui/ (Backup application) and opensync-plugin/ directories respectively, and build the subprojects located there automatically. Make sure you have the needed software dependencies installed beforehand.

If you want to generate doxygen documentation, run 'doxygen' from the root source directory. The resulting files will be in doc/www/doxygen/html/. Doxygen 1.5.6 has been used to do this, but presumably more recent versions will work as well.

Build Everything!

An example that will build everything, including the Boost features in btool:

    	cd barry
    	./buildgen.sh cleanall         (this will make a pristine tree)
    	./buildgen.sh                  (this creates configure)
    	./configure --enable-boost --enable-gui --enable-opensync-plugin
    	make
    	make install
    	doxygen

This will give you a set of command line tools (bcharge, btool, breset, bidentify, bjavaloader, pppob), as well as the backup GUI (barrybackup), and will install the opensync plugin into the system directory for opensync plugins (usually /usr/lib/opensync/plugins). Available man pages are also installed.

You can use 'btool' to explore your device from the command line. Use the -h switch for help on its command line options. Some good ones to start with are `-l` to list the devices found, and `-t` to list the Database Database.

Configure udev to Run bcharge Automatically

The makefiles do not install udev rules automatically. There are sample udev rules files in the udev/ directory. For a Debian system, copy the udev/debian/10-blackberry.rules file to /etc/udev/rules.d/10-blackberry.rules, and copy the file modprobe/blacklist-berry_charge to /etc/modprobe.d/blacklist-berry_charge.

    	cd barry
    	(become root)
    	cp udev/debian/10-blackberry.rules /etc/udev/rules.d/10-blackberry.rules
    	cp modprobe/blacklist-berry_charge /etc/modprobe.d/blacklist-berry_charge

Make sure that bcharge was installed to /usr/sbin. If you used a different --prefix option on the ./configure command line, you will need to update your 10-blackberry.rules file to match.

Configure PPP chat scripts for your system

The source tree comes with sample PPP chat scripts for using your Blackberry as a modem. These sample scripts are located under ppp/ in your source directory. The binary packages install all the ppp options files under /etc/ppp/peers/ and all the chat scripts (with the *.chat extensions) under /etc/chatscripts/. These directories are important, since the pppd program expects to find options files under peers/ and the options files reference the chatscripts.

Copy the above samples to their appropriate directories to install modem support for your system. Make sure you have pppd installed as well.

If you install Barry in a location other than /usr, you will need to edit the options files to correct the hard coded paths in these files. The files assume that pppob is located in /usr/sbin/pppob.

See the modem usage page for more information on using your Blackberry as a modem.

Building Barry RPMs from git

Paul Dugas reports on the mailing list that he uses the following steps for building RPMs from git:

    	$ cd ~/work
    	$ git clone...
    	$ cd barry
    	$ ./buildgen.sh
    	$ ./configure --enable-gui --enable-opensync-plugin
    	$ make dist
    	$ rpmbuild -tb barry-0.13.tar.gz

    	I prefer running rpmbuild from the tarball as it's typically the way
    	non-developers would build them.  I have ~/.rpmmacros setting %_topdir
    	to %(echo $HOME)/.rpmbuild so the RPM building can run as me and not
    	root.  The resulting RPMs end up in ~/.rpmbuild/RPMS/x86_64.

On an RPM based system, install rpm-build and rpmdevtools, then run rpmdev-setuptree to create an "rpmbuild" directory in your home directory.

Building Barry DEBs from Source

Once you have ./configure generated as detailed above, you can create Debian-style binary packages for your system by running the following:

    	cd barry
    	fakeroot -- debian/rules binary

Copyright © 2012 - Net Direct Inc.