pavement

Ports tree

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
 
(Looking for ports: psearch)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The port tree is commonly located in "/usr/ports/". It is composed of a "two level" directory structure containg a few files. Each application has it own directory, for example, [[vim]] is located in "/editors/vim" from the root of the port directory, so commonly, "/usr/ports/editors/vim" from the root of the system.
+
The ports tree is commonly located in "/usr/ports/". It is composed of a two level directory structure containg a few files. Each application has it own directory, for example, [[vim]] is located in "/editors/vim" from the root of the port directory, so commonly, "/usr/ports/editors/vim" from the root of the system.
  
 
Each directory contains a few files:
 
Each directory contains a few files:
 
* '''Makefile''': Used for compiling [[ports]].
 
* '''Makefile''': Used for compiling [[ports]].
 
* '''distinfo''': Contains informations on the files needed to install (To check their integrity).
 
* '''distinfo''': Contains informations on the files needed to install (To check their integrity).
* '''pkg-descr''': This file tell what is the port.
+
* '''pkg-descr''': This file describes what the port is.
 
* '''pkg-plist''': This file lists the binaries installed by the port.
 
* '''pkg-plist''': This file lists the binaries installed by the port.
* An optionnal '''files''' folder: Patches applied on the source before compilation.
+
* An optional '''files''' folder: Patches the port will apply to the standard source code before compilation; may be either to add features or reconfigure the port to install itself in BSD-centric directory format.
  
Installing an application is quite simple. Just go to the application folder and type
+
== Dependencies ==
# make install clean
+
 
+
But if you are lazy, you can also use [[pkg_install]] :
+
# pkg_install vim
+
 
+
== What other commands are supported ? ==
+
 
+
* '''make''' without argument will download the source files of the port and its dependancies, extract them, patch them, and compile them.
+
* '''make fetch''' only fetch the distfiles (the port sources)
+
* '''make patch''' only patch the source files
+
* '''make install''' install all the compiled files
+
* '''make clean''' remove the compiled files (but not the installed files)
+
* '''make deinstall''' remove a port... do '''*NOT*''' use this directly (see below).
+
 
+
== Dependancies ==
+
  
 
You have nothing to do while installing: dependencies are automaticaly installed. But this is '''*NOT*''' done while uninstalling (uninstalling a port will not deinstall the other that need it), so '''you shall not deinstall port''' directly in the port tree. Instead, use [[pkg_deinstall]].
 
You have nothing to do while installing: dependencies are automaticaly installed. But this is '''*NOT*''' done while uninstalling (uninstalling a port will not deinstall the other that need it), so '''you shall not deinstall port''' directly in the port tree. Instead, use [[pkg_deinstall]].
Line 33: Line 18:
 
It you want to search a port by name, use this :
 
It you want to search a port by name, use this :
 
  # cd /usr/ports ; make search name=PortName
 
  # cd /usr/ports ; make search name=PortName
 +
 +
Another way is to install and use the package or port ''psearch''. Then the following will search for a program and optionally the options -c can be used to filter a category, or -l can be used for a long description:
 +
psearch xorg -l -c x11
 +
 +
See also [[Ports%2C_Installing]], [[Ports_Tree%2C_Updating]].
 +
 +
[[Category:FreeBSD Terminology]]

Latest revision as of 15:48, 17 December 2014

The ports tree is commonly located in "/usr/ports/". It is composed of a two level directory structure containg a few files. Each application has it own directory, for example, vim is located in "/editors/vim" from the root of the port directory, so commonly, "/usr/ports/editors/vim" from the root of the system.

Each directory contains a few files:

  • Makefile: Used for compiling ports.
  • distinfo: Contains informations on the files needed to install (To check their integrity).
  • pkg-descr: This file describes what the port is.
  • pkg-plist: This file lists the binaries installed by the port.
  • An optional files folder: Patches the port will apply to the standard source code before compilation; may be either to add features or reconfigure the port to install itself in BSD-centric directory format.

[edit] Dependencies

You have nothing to do while installing: dependencies are automaticaly installed. But this is *NOT* done while uninstalling (uninstalling a port will not deinstall the other that need it), so you shall not deinstall port directly in the port tree. Instead, use pkg_deinstall.

[edit] Looking for ports

You can browse the port tree randomly to find many interesting ports, but you can also search ports using keywords :

# cd /usr/ports ; make search key=MyKeyword

It you want to search a port by name, use this :

# cd /usr/ports ; make search name=PortName

Another way is to install and use the package or port psearch. Then the following will search for a program and optionally the options -c can be used to filter a category, or -l can be used for a long description:

psearch xorg -l -c x11

See also Ports,_Installing, Ports_Tree,_Updating.

Personal tools