Re: program convenient install path and name in Linux
From: Roger Leigh (${roger}_at_whinlatter.uklinux.net.invalid)
Date: 04/23/04
- Next message: Måns Rullgård: "Re: program convenient install path and name in Linux"
- Previous message: Lew Pitcher: "Re: program convenient install path and name in Linux"
- In reply to: Victor Liu: "program convenient install path and name in Linux"
- Next in thread: Måns Rullgård: "Re: program convenient install path and name in Linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 23 Apr 2004 13:15:18 -0000
On 2004-04-23, Victor Liu <victor_nospam@cyberpowersystemsnospam.com.tw> wrote:
> Hi,
>
> I want porting a program which type is NT service to Linux from
> windows, but I do not know the relative convenient path:
The paths I mention below are configured by running a "configure"
script. All decent source packages use a configure script, usually
created with Autoconf. You should investigate autoconf and automake.
> 1. where program location is suitable to install, is '/usr/sbin' or
> '/usr/sbin/local' ? what difference between both ?
${sbindir}
The difference is that they are different. You don't hardcode the
paths, you let the user decide.
> 2. the program will write down the process id (pid) into a file where
> is the sutiable location?
${localstatedir}/run/${program}.pid
> 3. where to store config file ?
${sysconfdir}/${PACKAGE}/program.conf
> 4. where to place client program ?
What is a "client program"?
Run by users: ${bindir}
Run by admin: ${sbindir}
Run *only* by daemon/other programs: ${libexecdir}/${PACKAGE}
> 5. where to store the uninstall shell script ?
You don't. You package it up as a .rpm and/or .deb. "make uninstall"
from the source tree should uninstall, too.
> how to prevent the file name conflict program ? the install path seems
> not to change by user in Linux.
Could you rephrase those questions, please.
Conflicts are handled by the package manager, if you've packaged up your
program.
Programs are usually installed in standard locations, which are readable
by all users, but modifiable only by root. Users can install into a
different path ("prefix") by choosing a different prefix when they run
configure ("./configure --prefix=/usr", "./configure
--prefix=/home/roger").
Make sure you don't confuse two issues:
- the build (configuration and compilation)
- the packaging (install/uninstall/handling conffliles and conflicts)
--
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
- Next message: Måns Rullgård: "Re: program convenient install path and name in Linux"
- Previous message: Lew Pitcher: "Re: program convenient install path and name in Linux"
- In reply to: Victor Liu: "program convenient install path and name in Linux"
- Next in thread: Måns Rullgård: "Re: program convenient install path and name in Linux"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|