You are not logged in.
I have two questions:
1. when we should put a package in /opt instead of /usr tree
2. is there a pre_install function, so we can do something before installing package. I tried install Leafnode on my fresh installed Arch Linux and I realised there is no user news (no group news either). If we have pre_install pacman could make this user and group or at least informs admin that a package needs them... I'm sure there are more things that coud be done by this function.
"Real Men Use Telnet on port 80" (el bid)
Offline
I dont know if we have a specific rule, but usally it would only apply to a rather large package, like if we packaged America's Army (a game), it is rather large so that would most likely go in /opt but a program like nmap or abiword would go in /usr.
Good Luck
Offline
...but large doesn't mean in this case lots of kb but lots of files so the application files can be "groupped" in some place (/opt/subdir) which makes them easier to be found. I think that's the idea (right? :-))
Offline
oh and about pre_install - just read man makepkg - post_install should be what you are looking for.
EDIT: an alternative is to put pre installation commands inside build function in PKGBUILD just before make install.
Offline
Putting commands in PKGBUILD is not an alternative to pre_install because a) it won't be running on the machines that you install the package on and b) it messes with things outside of $startdir when building. The latter should never be the case.
Pacman currently doesn't have a pre_install function, but that's proabably because you shouldn't need it. I can't think of anything you would do in pre_install that you can't do in post_install, and it would be dangerous because things would be performed even if the package install was aborted later.
You can add groups using post_install. The files in the package will have user and group set to fixed numbers anyway - the tar.gz archive doesn't use names for the ownerships.
All of your mips are belong to us!!
Offline