Results 1 to 6 of 6

Thread: installing to opt

  1. #1
    Join Date
    Jun 2007
    Beans
    5
    Distro
    Ubuntu 8.04 Hardy Heron

    Question installing to opt

    I've been using linux for a few years now, yet i'm still not sure how to configure my environment. If a makefile has path variables, how do i set these correctly so that my compiled software is put in the opt directory?

    relevant makefile portion for make install:
    Code:
    install:
    	$(MAKE) -C src $(@)
    	install -m 755 $(SCRIPTS) $(DESTDIR)$(sbindir)
    	install -d $(DESTDIR)$(mandir)
    	install -m 644 ./manpages/* $(DESTDIR)$(mandir)
    A more general question relates to the general usage of opt. Should all the necessary libraries also be installed to the opt directory, say in opt/lib? I wanted opt to have all the source i needed to build non package software.

    -Dave

  2. #2
    Join Date
    Mar 2006
    Beans
    8,346

    Re: installing to opt


  3. #3
    Join Date
    Jun 2007
    Beans
    5
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: installing to opt

    I've built and installed software before. I've compiled even the software in question yet I've never put things in opt.

    The problem is that there is no configure script. Does the configure script check for dependencies and set variables? When running it in the past to build software i remember that it outputs a whole lot of information regarding dependencies and environment variables.

    So running ./configure --PREFIX=/opt changes these?

  4. #4
    Join Date
    Mar 2006
    Beans
    8,346

    Re: installing to opt

    Yes ./configure is checking that you have all you need to compile,but adding prefix /opt you are telling where you want to install package. What install file say?

  5. #5
    Join Date
    Jun 2007
    Beans
    5
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: installing to opt

    The README and the INSTALL files just say to run make and then make install.

  6. #6
    Join Date
    Jun 2007
    Beans
    5
    Distro
    Ubuntu 8.04 Hardy Heron

    Post Re: installing to opt

    Ok, some stuff i didn't realize about using make. Apparently variales may be set to use in the Makefile from the command line.
    So, running:
    Code:
     sudo make install DESTDIR=/opt
    will set the install directory to opt. You would add variable assignments for sbindir and mandir ...

    NOTE:
    After reading some more, I changed my mind about installing to /opt/local/ and i think I'd rather not have to change paths to make things work correctly.
    The default directory for compiled (non-distro package) software is /usr/local/. There is where paths default for that stuff. So there is an sbin, a man, a share, a bin, .... in the /usr/local. Opt is generally used for packages (including compiled packages) that don't follow a standard unix filesystem structure.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •