Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Sep 2008 13:48:57 +0300
From:      Manolis Kiagias <sonic2000gr@gmail.com>
To:        Matias Surdi <matiassurdi@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: pkg_create
Message-ID:  <48BE6B99.6090609@gmail.com>
In-Reply-To: <g9loua$782$1@ger.gmane.org>
References:  <g9loua$782$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Matias Surdi wrote:
> I've a directory tree structure in /usr/local from wich I'd like to 
> create a package.
>
> How are pkg_create arguments supposed to be?
>
> Where can I find an example?
>
> I've read the manpage, but an example would be really usefull.
>
> Thanks for your help again.
>

pkg_create can create packages from your installed ports (or packages), 
it will not create a mega-package of all your system, if thats is what 
you are looking for. Of course, you can instruct pkg_create to create 
packages for *all* your installed programs.

Typical use is something like:

pkg_create -Rb foo-1.2.3_4

(get the exact package version for foo by running pkg_info -Ix foo)

The -R flag will cause packages to be created for all dependencies of 
foo as well.  If you wish to create packages for everything you got 
installed, you may try something like the following simple script (run 
as root to avoid weird permission errors in some cases):

for i in `pkg_info -Ea`; do
  pkg_create -b "$i"
done

(no need for -R here, since you are doing all packages anyway)

Bear in mind some ports can not be packaged due to licensing issues and 
some others may behave erratically (i.e. sysutils/screen).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48BE6B99.6090609>