From owner-freebsd-questions@FreeBSD.ORG Wed Sep 3 10:49:02 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52F22106566B for ; Wed, 3 Sep 2008 10:49:02 +0000 (UTC) (envelope-from sonic2000gr@gmail.com) Received: from qb-out-0506.google.com (qb-out-0506.google.com [72.14.204.232]) by mx1.freebsd.org (Postfix) with ESMTP id 056528FC1F for ; Wed, 3 Sep 2008 10:49:01 +0000 (UTC) (envelope-from sonic2000gr@gmail.com) Received: by qb-out-0506.google.com with SMTP id e34so3437180qbe.35 for ; Wed, 03 Sep 2008 03:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=TN61ExG1H+JcHtkFvIJfi0Eq0wCunX4Jw4YeGxIpd9o=; b=HF4OvlpYnlH0EfwllPYL/pTHgL4EG7BT3XC2q2yjXfPXtea+JD2T4kJewiLMfDSRHv +9MWJD/LNCLvdSNV9/pxOv0gp0Exy89yN9Ywysqhv35TWUt+9li7fJGZoMgTfdQExlJK scYV7bHkGyXvL/MSKZKireVRWNQPuDZwuPsyg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=r2zMacKu94fi7Dw7rMbbPExYJ2S7Xyhro07XtXciOAV9oCFaso9+feF5N7fuJJtdP+ XZXtVQ+ODVHGcnKGnMijmvdWoy3E/V1Lkv4a8fgkrE4YfrRKhw4wgUoKjp7SvhRy6yz4 5I3LQDWOZz5byzG/fGQNdcupeax/ynrzmbxQo= Received: by 10.181.16.6 with SMTP id t6mr6763562bki.81.1220438940511; Wed, 03 Sep 2008 03:49:00 -0700 (PDT) Received: from atlantis.dyndns.org ( [87.202.63.170]) by mx.google.com with ESMTPS id p9sm8831218fkb.5.2008.09.03.03.48.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Sep 2008 03:48:59 -0700 (PDT) Message-ID: <48BE6B99.6090609@gmail.com> Date: Wed, 03 Sep 2008 13:48:57 +0300 From: Manolis Kiagias User-Agent: Thunderbird 2.0.0.16 (X11/20080829) MIME-Version: 1.0 To: Matias Surdi References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: pkg_create X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2008 10:49:02 -0000 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).