Nick,
I've had a moment to verify the debian stuff to ensure I didn't lie to you
last week: :) The default prefix directory used by configure is /usr/local,
so all products get installed in this manner:
/
L-- usr
L-- local
+-- bin
│ L-- slptool
+-- etc
│ +-- slp.conf
│ +-- slp.reg
│ L-- slp.spi
+-- include
│ L-- slp.h
+-- lib
│ +-- libslp.a
│ +-- libslp.la
│ +-- libslp.so -> libslp.so.1.0.0
│ +-- libslp.so.1 -> libslp.so.1.0.0
│ L-- libslp.so.1.0.0
+-- sbin
│ L-- slpd
L-- var
L-- log
But this is dumb, because neither /usr nor /usr/local have either an etc or
a var directory beneath them. I don't know why the autotools folks did this
- probably because they needed *some* root location to put things, and
/usr/local was as good as anywhere else, and it turns out that most things
should be installed relative to $prefix anyway. Additionally, developers
might not want to mix their dev package's etc entries with the system
entries when installing dev packages. Programs should be written to access
the $prefix variable as a command-line #define within source code, so they
know where to look for files normally found in /etc and /var.
However, system packages *do* want their version of packages' etc (or var)
contents mixed together in /etc (and /var), so they usually use a special
configure command that looks (for openslp anyway) something like this:
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
Which leaves the installed files in a tree like this:
/
+-- etc
│ +-- slp.conf
│ +-- slp.reg
│ L-- slp.spi
+-- usr
│ +-- bin
│ │ L-- slptool
│ +-- include
│ │ L-- slp.h
│ +-- lib
│ │ +-- libslp.a
│ │ +-- libslp.la
│ │ +-- libslp.so -> libslp.so.1.0.0
│ │ +-- libslp.so.1 -> libslp.so.1.0.0
│ │ L-- libslp.so.1.0.0
│ L-- sbin
│ L-- slpd
L-- var
L-- log
Thus, the debian or redhat init scripts can refer to slpd as /usr/sbin/slpd.
Although it's still much better to generate the init scripts from the
configure variables at configure or make time so they get changed
appropriately if different arguments are used. We don't actually supply a
debian init script in our package, so the init script is coming from
elsewhere (some system packager, perhaps?).
John
From: Nick Wagner [mailto:ne...@wingedbeast.org]
Sent: Thursday, October 25, 2012 10:17 AM
To: openslp-devel@lists.sourceforge.net
Subject: [Openslp-devel] Has anyone built a debian package before?
I took a quick look at the Debian start-stop script, and it does need to use
the -p option when running slpd. But then I noticed that it was still
referring to /usr/sbin/slpd, when I believe we now install to
/usr/local/bin. Do we need to make the start-stop script use the new
directory? do we need to change the whole debian subdirectory in
openslp.misc?
--Nick
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Openslp-devel mailing list
Openslp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openslp-devel