View Single Post
  #9   (View Single Post)  
Old 27th July 2009
teckk teckk is offline
Port Guard
 
Join Date: May 2008
Posts: 11
Default

This is slightly dated but still works. Use your own parameters.

Something like
Code:
pkg_info | grep openoffice
Which returns something like
Code:
en-openoffice.org-US-3.0.0 Integrated wordprocessor/dbase/spreadsheet/drawing/chart/br
Then
Code:
pkg_create -b en-openoffice.org-US-3.0.0
After it's done you should have a file in current directory
Code:
en-openoffice.org-US-3.0.0.tbz
Install it with
Code:
pkg_add en-openoffice.org-US-3.0.0.tbz
Make sure, of course, to specify the full path to the file, if you do not execute the "pkg_add" command from the same directory where the file is located. Also note that dependencies of the package will not be automatically downloaded, since we're installing the package from a local file. Any dependencies that cause the install to fail will need to be installed from Ports or Packages before the package we created will successfully install on another system.

As of FreeBSD 6.0-RELEASE, it is also possible to create packages of the installed application's dependencies at the same time you create a package of the installed application. This might make installing the package on another system easier.
Code:
pkg_create -Rb en-openoffice.org-US-3.0.0
After a few minutes, you should have packages of OpenOffice.org and a bunch of its dependencies in the current directory. Doing an "ls" will reveal a list, along the order of this:

Code:
ORBit2-2.12.4_1.tgz                     jpeg-6b_3.tgz
atk-1.10.3.tgz                          libIDL-0.8.6_1.tgz
bitstream-vera-1.10_2.tgz               libXft-2.1.7.tgz
cairo-1.0.2_1.tgz                       libbonobo-2.10.1_2.tgz
cdparanoia-3.9.8_7.tgz                  libiconv-1.9.2_1.tgz
en-US-openoffice.org-2.0.0.tgz          libxml2-2.6.22.tgz
expat-1.95.8_3.tgz                      linc-1.0.3_4.tgz
fam-2.6.9_6.tgz                         openldap-client-2.2.29.tgz
fontconfig-2.3.2,1.tgz                  pango-1.10.1.tgz
freetype2-2.1.10_1.tgz                  perl-5.8.7.tgz
gconf2-2.12.1.tgz                       pkgconfig-0.20.tgz
gettext-0.14.5.tgz                      png-1.2.8_2.tgz
glib-2.8.4.tgz                          popt-1.7.tgz
gnomehier-2.0_7.tgz                     samba-libsmbclient-3.0.20b_2.tgz
gnomemimedata-2.4.2.tgz                 shared-mime-info-0.16_2.tgz
gnomevfs2-2.12.2.tgz                    tiff-3.7.4.tgz
gtk-2.8.8.tgz                           xorg-fonts-encodings-6.8.2.tgz
hicolor-icon-theme-0.5.tgz              xorg-fonts-truetype-6.8.2.tgz
howl-1.0.0.tgz                          xorg-libraries-6.8.2.tgz
That's a lot of packages! Place these in the same directory on the target system, and "pkg_add en-openoffice.org-US-3.0.0.tgz" as you did with the previously created package. This time, all of the application's dependencies are present locally, so they should be added as well.

One incredibly important note about packages. If you create a package in FreeBSD 5.x and attempt to install it on a FreeBSD 6.x system, you'll probably be okay so long as the 6.x system has compat5x enabled. However, you CANNOT install a package created in 6.x on a 5.x system. There is no "compability mode" allowing the older system to run packages created on the newer one. Installing a 6.x package on 5.x will not work, and will give you nothing but headaches.

Edit:
Because of changes in xorg and directory structure you may not be able to move a package from one version to a newer one. Better off to update your ports tree, resolve all dependencies, build the app, have it working well, then make a package of it that you can use for another machine running the same version no of BSD.

Last edited by teckk; 27th July 2009 at 06:50 PM.
Reply With Quote