mirror of
https://github.com/troglobit/finit.git
synced 2026-10-27 12:20:54 +00:00
Fix installation paths and update README on building, bump version
The installation path for plugins was encoded wrong in the finit binary if *not* unset, i.e., "prefix=". Updated the README with information on all build related environment variables. Much of it is perhaps only needed for packagers and distributions. New version bump, v1.2 already. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
7542f4e199
commit
2b2fcb740c
4 files changed
+92
-8
No files matched your search
+78
@@ -66,6 +66,84 @@ Finit handles SIGUSR1 and SIGUSR2 for reboot and halt, and listens to
|
||||
/dev/initctl so standard Linux reboot and halt commands should also
|
||||
work.
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
The finit build system does not employ the GNU Configure and Build System,
|
||||
instead standard makefiles are used. The user is encouraged to make source
|
||||
code changes, using defines and conditionally building plugins instead to
|
||||
alter the behavior of finit.
|
||||
|
||||
The following environment variables are checked by the makefiles and control
|
||||
what is built and where resulting binaries are installed.
|
||||
|
||||
**ROOTDIR=**
|
||||
Top directory for building complete system, used in pretty printing
|
||||
|
||||
**PLUGINS=**
|
||||
List of stock finit plugins to build and install.
|
||||
|
||||
**PLUGIN_DIR=**
|
||||
Absolute path to where finit should look for dynamically loadable plugins
|
||||
at runtime. At installation prepended by ''DESTDIR'' and ''prefix''-
|
||||
|
||||
**VERSION=**
|
||||
Defaults to the currently released version of finit, e.g., 1.2 but can
|
||||
be overridden by packages to add a suffix or completely alter the version.
|
||||
|
||||
**CFLAGS=**
|
||||
Standard CFLAGS are inherited from the build enviornmant.
|
||||
|
||||
**CPPFLAGS=**
|
||||
Standard CPPFLAGS are inherited from the build enviornmant.
|
||||
|
||||
**LDFLAGS=**
|
||||
Standard LDFLAGS are inherited from the build enviornmant.
|
||||
|
||||
**LDLIBS=**
|
||||
Standard LIBLIBS are inherited from the build enviornmant.
|
||||
|
||||
**prefix=**
|
||||
Path to where resulting binaries should install to. Used in concert
|
||||
with the ''DESTDIR'' variable. Defaults to /usr/local
|
||||
|
||||
**sysconfdir=**
|
||||
Used after ''prefix'' to create the path to finit.conf configuration
|
||||
file. Defaults to /etc
|
||||
|
||||
**DESTDIR=**
|
||||
Used by packagers and distributions when building a relocatable
|
||||
bundle of files. Alwawys prepended to the ''prefix'' destination
|
||||
directory.
|
||||
|
||||
**Example**::
|
||||
|
||||
$ tar xfJ finit-1.2.tar.xz
|
||||
$ PLUGINS="initctl.so hwclock.so" prefix= DESTDIR=/tmp/finit/dst \
|
||||
make -C finit-1.2/ clean install
|
||||
make: Entering directory `/home/troglobit/finit-1.2'
|
||||
CC finit.o
|
||||
CC conf.o
|
||||
CC helpers.o
|
||||
CC sig.o
|
||||
CC svc.o
|
||||
CC plugin.o
|
||||
CC strlcpy.o
|
||||
LINK finit
|
||||
CC plugins/initctl.o
|
||||
PLUGIN plugins/initctl.so
|
||||
CC plugins/hwclock.o
|
||||
PLUGIN plugins/hwclock.so
|
||||
INSTALL /tmp/finit/dst/sbin/finit
|
||||
INSTALL /tmp/finit/dst/lib/finit/plugins/initctl.so
|
||||
INSTALL /tmp/finit/dst/lib/finit/plugins/hwclock.so
|
||||
make: Leaving directory `/home/troglobit/finit-1.2'
|
||||
|
||||
In this example the finit-1.2.tar.xz archive is unpacked to the user's
|
||||
home directory, built and installed to a temporary staging directory.
|
||||
The enviroment variables ''prefix'', ''DESTDIR'' and ''PLUGINS'' are all
|
||||
changed to suit this particular build.
|
||||
|
||||
|
||||
Debugging
|
||||
---------
|
||||
|
||||
Reference in new issue
Block a user