[server:~] # portsnap fetch extract
[server:~] # cd /usr/ports/ [server:/usr/ports] # make fetchindex [server:/usr/ports] # make search name=asterisk ... [server:/usr/ports] # make search key=security ...
[server:~] # cd /usr/ports/net/asterisk11 [server:ports/net/asterisk11/] # make config [server:ports/net/asterisk11/] # make showconfig | grep '=on'
NCURSES=on: Console (text) interface support GSM=on: GSM codec support GCC=on: Build with modern GCC (from ports)
Для ускорения процесса можно установить требуемые для компиляции и работы порта пакеты
[server:ports/net/asterisk11/] # make run-depends-list [server:ports/net/asterisk11/] # make build-depends-list [server:ports/net/asterisk11/] # pkg install gsm sqlite3 binutils bison gmake gcc libxml2
При наличии всех зависимостей, компиляция займет, примерно, 5 минут
[server:ports/net/asterisk11/] # make install clean [server:ports/net/asterisk11/] # pkg lock asterisk11
[server:~] # cd /usr/ports/games/doom/ [server:ports/games/doom] # make fetch [server:ports/games/doom] # cat Makefile
... @cd ${WRKSRC} && ${TAR} xzf linuxdoom-1.10.src.tgz && ${TAR} xzf sndserv.tgz ...
[server:ports/games/doom] # make extract [server:ports/games/doom] # ln -s /usr/ports/games/doom/work/doom-1.10_5/linuxdoom-1.10 /usr/ports/games/doom/work/linuxdoom-1.10 [server:ports/games/doom] # ln -s /usr/ports/games/doom/work/doom-1.10_5/sndserv /usr/ports/games/doom/work/sndserv [server:ports/games/doom] # make [server:ports/games/doom] # mkdir /usr/ports/packages/ [server:ports/games/doom] # make package clean # pkg install /usr/ports/packages/All/doom-1.10_5.txz
[gate:~] # mount server.corpX.un:/usr/ports /usr/ports [gate:~] # setenv WRKDIRPREFIX /var/tmp/ [gate:~] # setenv DISTDIR /var/tmp [gate:~] # setenv BATCH
!!! Актуально для FreeBSD 9.X
# pkg_info # pkg2ng # pkg info # cat /etc/make.conf
... # For register new ports in pkgng WITH_PKGNG=yes
% fetch http://www.communigate.com/pub/CommuniGatePro/CGatePro-FreeBSD10-Intel.txz # pkg add CGatePro-FreeBSD10-Intel.txz
# pkg info
% pkg info CGatePro % pkg info -l CGatePro % pkg info -D perl5
$ cat /etc/pkg/FreeBSD.conf $ man pkg-update # pkg update -f
# pkg search '.*' | wc -l # pkg search clamav
# pkg search -R clamav-0.99.1
# pkg search -d clamav-0.98.4
# pkg install clamav
# pkg info -r curl
# pkg info -l clamav # pkg which /usr/local/bin/clamdscan
# pkg delete clamav
# pkg delete -x '.*'
# pkg autoremove