You are not logged in.

#1 2007-02-03 03:28:02

louipc
Member
Registered: 2006-10-09
Posts: 85

Packages in /opt

Hello I'm making a package that will be installed in /opt
What's the standard way of adding the bin, include, lib, and man paths to the system?

Many thanks.

Offline

#2 2007-02-03 22:11:42

louipc
Member
Registered: 2006-10-09
Posts: 85

Re: Packages in /opt

I've figured out how I can the bin, and man directory.
I found a bunch of scripts in /etc/profile.d that set the paths for various packages.
They don't really do anything with lib or include directories.
I did notice that most of the ones that are already installed have a /opt/<package>/lib/pkgconfig with a bunch of *.pc files that look like they have make parameters.

Is there a standard method of making that profile.d script or do I just write it myself and install it manually in the PKGBUILD?

I still need to figure out how to do the lib and include directories too.

Any clues? Thanks.

Offline

#3 2007-02-03 22:27:42

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Packages in /opt

What package are you trying to build? Are you sure that it can't go in /usr?

If you want to put it in opt, create a script and, in the PKGBUILD,  install it in  /etc/profile.d
For the lib directory, you'll need to add it to  /etc/ld.so.conf with a .install file. You can check qt.install for an example.
For the include directory, you don't need to do anything. If an apps needs them to build, their PKGBUILD will need to use a configure option or Makefile patching to find them.

Offline

#4 2007-02-03 23:54:42

louipc
Member
Registered: 2006-10-09
Posts: 85

Re: Packages in /opt

I'm making a package for brlcad. It includes a bunch of other 3rd party packages that are not in the repos, or in the AUR (only one is). Yeah the default install dir is in /usr/brlcad (with subdirectories bin, lib, etc) but it seemed to me like an inappropriate place to put it since I don't have any other packages taking up their own directory there. /opt seemed like a fitting location eh?

Thanks for your help.

Last edited by louipc (2007-02-03 23:54:56)

Offline

#5 2007-02-04 01:13:48

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Packages in /opt

Did you tried to change the default install directory?   Usually it  can be changed with:
./configure --prefix=/usr --sysconfdir=/etc
so the bins will go in /usr/bin, the libs in /urs/lib and the configs in /etc. It might also help to post the current PKGBUILD.

Offline

#6 2007-02-04 02:55:16

louipc
Member
Registered: 2006-10-09
Posts: 85

Re: Packages in /opt

I changed the default to /opt because I figured that this was one of those big self-contained packages...
It even has libpng, tcl, tk and such but doesn't build them if they're present on the system so I added some of the packages it contains into the depends array. I guess this topic should now mention BRL-CAD hah. Cheers

Do you think I should just install it in /usr?

http://aur.archlinux.org/packages.php?d … =1&ID=8320

Offline

#7 2007-02-04 03:05:25

louipc
Member
Registered: 2006-10-09
Posts: 85

Re: Packages in /opt

Another reason I put it in /opt is actually a pretty important one. I was concerned that if someone installed one of those other packages themselves, then installed brlcad that brlcad would overwrite the package that they installed. /opt seems like a solution to that.

Offline

#8 2007-02-04 04:02:49

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Packages in /opt

Pacman don't allow a package to overwrite another one so you don't need to worry about that. Post the filelist here or in pastebin if it's long. That will give me a better idea whether it's self contained or not.

About the PKGBUILD, I guess that BDL is a special licence. If so, change the license field to:
license=("custom:BDL" "LGPL")
and install a copy of the BDL licence in /usr/share/licenses/custom/$pkgname/

Offline

#9 2007-02-04 04:24:09

louipc
Member
Registered: 2006-10-09
Posts: 85

Re: Packages in /opt

The BDL is the BSD Documentation License which is quite new and covers the help files.
I'll add the license to the install as well though.

http://en.wikipedia.org/wiki/BSD_Documentation_License

Here's the filelist:
http://rafb.net/p/pPSDYK57.html

A cool 2215 lines long ;D

Offline

#10 2007-02-04 06:30:58

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Packages in /opt

Just checked the filelist.  You can keep it in /opt.

Offline

Board footer

Powered by FluxBB