View Single Post
  #4   (View Single Post)  
Old 18th June 2008
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

It is possible to make many ports at once but they should not be installed
simultaneously as parallel running processes.
To install many ports at once create the subdirectory /usr/ports/myports
in which you will list the names of all ports you want to install and their flavours.

For instance

Code:
graphics/gimp
editors/emacs,no_x11
print/texlive
Then

Code:
# make  BUILD=yes SUBDIRLIST=/usr/ports/myports install
Do not forget to clean after yourself.

Code:
# make  BUILD=yes SUBDIRLIST=/usr/ports/myports clean
# make  BUILD=yes SUBDIRLIST=/usr/ports/myports clean=depends
If your list is long make sure you have enough disk space on /usr since you will create
lots of garbage before you clean. For instance when I build all my desktop ports automatically (which is usually about 20 ports) I need at least 12 GB to do it. Once when I clean it they are no more than 2-3GB in total.
Be also smart about making many ports at once. It is enough to list xsane and sane-backends will be installed as dependences. I have a careful choice of 15-20 ports which in turn will install all other ports I use as dependence.

The above process might take a very long time. In the spirit of OpenBSD project you should actually try to use packages
instead of ports whenever possible. The question is how to you install many packages at once.
You can make a simple very crude script

Code:
#!/bin/sh
pkg_add gimp(full name of the package)
pkg_add emacs21
pkg_add texlive
which you can execute as a root or with sudo. Good thing is that you do not have to worry about the space now necessary for build. The better thing would be to create a file with the packages you want to install and then write a small awk or perl program which will accomplish installation.
Many packages do come with OpenBSD specific messages and they require some post installation actions. For instance if you install CUPS you need to execute the script which will replace LPD spooling system with CUPS, alter some permissions, edit /etc/rc.local and /etc/group files. Those can be automatized as well.

Last edited by Oko; 18th June 2008 at 04:17 AM.
Reply With Quote