Re: install script to detemine Linux or FreeBSD environment?
From: Alan Hicks (alan_at_lizella.netWORK)
Date: 03/30/04
- Previous message: SayWhat: "Apache install"
- In reply to: Frank Shute: "Re: install script to detemine Linux or FreeBSD environment?"
- Next in thread: Frank Shute: "Re: install script to detemine Linux or FreeBSD environment?"
- Reply: Frank Shute: "Re: install script to detemine Linux or FreeBSD environment?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Mar 2004 22:20:18 -0600
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
In comp.unix.bsd.freebsd.misc, Frank Shute dared to utter,
> What I remember as happening is that most source had something like:
>
> DESTDIR= /usr/local/bin
>
> defined in the Makefile and instructions in the README for the user to
> edit it if they didn't want it there. RPMs and the like would use
> /bin or /usr/bin on RedHat.
Sorta. There are variables in the Makefile in most source code for
determining where the different pieces of a program will go. Most
source now comes with gnu autoconf configure scripts. Pretty much
every one I've used has the following options. (Note, squid is the
rebel in the regaurd. By default it wants to install everything into
/usr/local/squid.)
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]
This gives you really tight control over where you want individual
files to go. For most things compiled from source, you don't need to
change anything. "make install" will dump all the files into
directories under /usr/local in pretty much the same way FreeBSD does
with the ports system. The above options are really only used by people
who are making a binary package to install on multiple machines as a
regular addition to their OS, or to include as a part of the OS.
> There have been attempts to standardise a Linux filesystem hierarchy
> but I don't know if much has come of it and my guess is that the
> different distributions still go their own way. ie. Lindows is
> unlikely to be the same as Debian or Slackware or Gentoo...and Linux
> developers probably go their own way too.
>
> They're badly in need of a manpage like hier(7) but then there is no
> such thing as a core set of manpages on Linux either :(
It's really not that bad. Once you get out of the big commercial
distributions and look at say Debian, Gentoo, and Slackware, things are
pretty much the same across the board. Everyone puts their config files
under /etc, all variable things go into /var. Documentation goes into
/usr/doc/$PROGRAM_NAME, etc. /bin and /sbin get statically compiled
binaries that are just enough to get a system up and running. All other
binaries go into /usr/bin and /usr/sbin. There's /opt and /usr/man,
just like in FreeBSD, and /root and /home.
The linux standards base pretty much states that nothing should go into
/usr/local except directories like /usr/local/bin and /usr/local/etc.
/usr/local is a local /usr, meaning it has the same things you'd find
in /usr, but it will vary from machine to machine as to what is
included inside it. If you can find your way around one unix you can
find your way around another.
- --
It is better to hear the rebuke of the wise,
Than for a man to hear the song of fools.
Ecclesiastes 7:5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFAaPV/L3KiNGOqr6ERAtc6AKDVJV3tAAKVFNzIY21azs5i0hD3uACeOT9i
Ef8d1f0EP5T/+B1fIVl+aTU=
=yTj0
-----END PGP SIGNATURE-----
- Previous message: SayWhat: "Apache install"
- In reply to: Frank Shute: "Re: install script to detemine Linux or FreeBSD environment?"
- Next in thread: Frank Shute: "Re: install script to detemine Linux or FreeBSD environment?"
- Reply: Frank Shute: "Re: install script to detemine Linux or FreeBSD environment?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|