Re: install script to detemine Linux or FreeBSD environment?

From: Alan Hicks (alan_at_lizella.netWORK)
Date: 03/30/04

  • Next message: vertigo: "jdk 1.4.2 compilation errors"
    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-----


  • Next message: vertigo: "jdk 1.4.2 compilation errors"

    Relevant Pages

    • Re: Make Error (please help i need my webcam to work)...
      ... Did you look at line 485 in the Makefile? ... There should be a README and INSTALL file in the driver source ... I'm confused as to why you needed to use a 2.4 driver for a 2.6 ... >> Looks like you have to create a soft link into the kernel source. ...
      (comp.os.linux.misc)
    • Re: Make Error (please help i need my webcam to work)...
      ... there should be a file called Makefile. ... > Looks like you have to create a soft link into the kernel source. ... > i'm having a real tough time trying to install this nw802 video driver ... > for my dark ring logitech quickcam. ...
      (comp.os.linux.misc)
    • Re: Makefiles for noweb
      ... more time than to install it more or less out of the box as an appliance. ... to be created by this part of Makefile.nw in src already exists, ... so I went into src and examined the Makefile. ... Apparently there are some scripts in Makefile.nw and I don't know what ...
      (comp.programming.literate)
    • Re: redbook examples
      ... I am pretty damn sure I have all the libraries needed installed from ... to the CXX_FLAGS variable in the makefile ... install base and nothing is mentioned in the errata. ... Now I am in the process of sorting out differences between Mesa, glut, ...
      (comp.graphics.api.opengl)
    • RE: Makefile
      ... You should be able to get it to work for your install easily enough. ... I need to construct a Makefile in Unix, ... 4GL Both Informix RDS and compiled executables are created for 4GL ... Only 4GL source files are currently supported. ...
      (comp.databases.informix)