Solved

Using FreeBSD's "ports"

Posted on 2001-06-09
10
353 Views
Last Modified: 2013-12-16
Hello,

As I know "ports" works to "replace" the commom steps to install an
application to the system:

1. download the (latest) source.
2. "./configure --prefix=/usr/local/mypath"
3. "make"
4. "make install"

However, in step (2), I can always use the configuration options. But how
can it be done using "ports"? Is it sth. like

freebsd# make PREFIX=/usr/local/mypath configure

??

The documents i found in freebsd.org seems asking you to do "make install"
in the application's dir and that's all done.

Thanks for advance.

Ken
0
Comment
Question by:kenysc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
10 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 6172283
There are things that you can change when building something from the ports collection, but in general that should probably be limited to adding features to a package. The ports collection is, to some degree, a unified collection in that a number of the ports depend on other ports and that implies that the location of said dependancy must be known. Also keep in mind that ports with dependancies will automatically build and install any dependant packages. Oh yeah, any FreeBSD specific patches will also be applied when the package is built.

If you really want to significantly change a port (like changing the destination dir), I'd sugggest that you do a "make" to get any dependancies resolved and to get the sources downloaded and patched. Then go to the source-distribution subdir of "work" and do the normal "configure", "make" "make install". And of course you can always just download the source distribution and build the application in the normal manner.

The question shows the destination being changed for a port. Why would you want to do that?

0
 

Author Comment

by:kenysc
ID: 6172670
It's just an example that I use "--prefix=/usr/local/mypath" to change the path. AIK one can use "make PREFIX=/my_own_path install" to specify where the package should be installed...

However, consider if I install the Apache server using ports. Apache have many config. options like "--with-perl", "--enable-module" etc. It would be a real problem if I can't use the config. options installing this package.

Thanks.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 100 total points
ID: 6173166
For most of the ports it is possible to edit the top level Makefile to change the configure options. If you look at /usr/ports/www/apache13/Makefile, for example, you'll see the list of configure options that will be used and you can add/remove options as you see fit. The only gottcha that I know of is that a cvsup of the ports collection is likely to wipe out your changes to a Makefile. My solution to that is to always copy the Makefile to Makefile-custom after I change it so that I can refer to Makefile-custom to update the Makefile after cvsup'ing the ports collection if I decide to re-build the port.

And the same applies to some things in the /usr/src tree. I customize the build process for sendmail so that I can use SMTP AUTH with sendmail. To do that I need sendmail built with SASL support and that means that the Makefile has to change.
0
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 

Expert Comment

by:VictorZ
ID: 7090511
Hello.

Hey BTW did you know that is you where looking for something in special you can in /usr/port
make a search
yes
/C00lFreeBSDB0x/usr/ports #make search key=String of what you are looking
:=)
an example
/C00lFreeBSDB0x/usr/ports #make search key=mmr
Port:     mmr-1.5.4
Path:     /usr/ports/mail/mmr
Info:     Curses based MIME Mail Reader
Maint:     ports@FreeBSD.org
Index:     mail
B-deps:    
R-deps:    


FreeBSD Rocks
Regards
Victor


0
 

Expert Comment

by:VictorZ
ID: 7090512
Hello.

Hey BTW did you know that is you where looking for something in special you can in /usr/port
make a search
yes
/C00lFreeBSDB0x/usr/ports #make search key=String of what you are looking
:=)
an example
/C00lFreeBSDB0x/usr/ports #make search key=mmr
Port:     mmr-1.5.4
Path:     /usr/ports/mail/mmr
Info:     Curses based MIME Mail Reader
Maint:     ports@FreeBSD.org
Index:     mail
B-deps:    
R-deps:    


FreeBSD Rocks
Regards
Victor


0
 

Expert Comment

by:VictorZ
ID: 7090514
Hello.

Hey BTW did you know that is you where looking for something in special you can in /usr/port
make a search
yes
/C00lFreeBSDB0x/usr/ports #make search key=String of what you are looking
:=)
an example
/C00lFreeBSDB0x/usr/ports #make search key=mmr
Port:     mmr-1.5.4
Path:     /usr/ports/mail/mmr
Info:     Curses based MIME Mail Reader
Maint:     ports@FreeBSD.org
Index:     mail
B-deps:    
R-deps:    


FreeBSD Rocks
Regards
Victor


0
 

Author Comment

by:kenysc
ID: 7153233
Thanks for you're triple reply but I want a way to make customized configuration while using ports.

Thx your tips on search.

Regards.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 7153365
Is not editing the Makefile for some port a usable solution? That would be the normal procedure to change a config option for any of the ports.
0
 

Author Comment

by:kenysc
ID: 7153697
I'm expecting a tool or a convenient way to do a "custom make". However, it seems jlevie's comment is the answer at this time.

So thank you and get your points, jlevie.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 7154420
To the best of my knowledge there's not any other way of making custon port builds, now do I know of any effort being made in that direction. The idea behind the ports collection was to provide an easy way to build applications, without the end user having to futz around with configure scripts, compiler options, etc. So a 'canned' build process is encapsulated within the Makefile. For most things it is quite easy to modify the Makefile for local customizations, just remember that a cvsup of the ports collection will wip out your changes, so save a copy of the modifed Makefile.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question