Jared <[EMAIL PROTECTED]> wrote:

> Hi. I have a package which currently creates a file outside /sw. It  
> adds a file to /etc/xinetd.d/ so your computer acts as a POP3 server so  
> you can get Hotmail in any e-mail client. The person who is looking  
> over my package isn't sure about my modifying outside /sw but in an  
> effort to keep it as easy for the end user as possible, I wanted it to  
> be automated. If I add a PostRmScript to remove the file, will this be  
> acceptable?

On my machine, inetd is running rather thatn xinetd.  So are you sure that
this would actually work?

On a more general note, Fink's daemonic package is intended to help manage
daemons that are needed for Fink packages.  Could you possibly make use
of it instead?

> 
> Also, what does "make install" do, or how can I find out what it does?  
> I'm asking because to install the software I created the package for, I  
> just need to copy the binary it makes somewhere. I don't know what a  
> "make install" will do so my install script is simply a "cp file  
> target". I don't know how to guarantee it will be installed into the  
> /sw/sbin/ folder as I want. My file I mentioned above needs to know the  
> full path so it needs to be predictable.

You could read the Makefile, or you could run "make install" and observe
what happens.

If you are making an InstallScript by hand, then you use

InstallScript: <<
  mkdir -p %i/sbin
  cp binary-file %i/sbin/
<<

What this does is to install the file into PREFIX/sbin/, where PREFIX was
the location of Fink which was chosen by the user.  For most users, this
defaults to /sw, but some users might have installed things in another
place.

Now, how do you record this location in another file?  Say the file you
want it in is called foo.config.  In foo.config you would write

  @FINK_PREFIX@/sbin/binary-file

wherever it is appropriate.  Then, use a PatchScript:

PatchScript: <<
  mv foo.config foo.config.bak
  sed "s|@FINK_PREFIX@|%p|g" < foo.config.bak > foo.config
<<

This replaces every instance of @FINK_PREFIX@ in your file by the correct
prefix (which is expanded from %p, and which will equal /sw for most
users).

  -- Dave




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to