skalibs
Software
www.skarnet.org
How to install skalibs
Like any other piece of software (and information generally),
skalibs comes with NO WARRANTY.
Starting with release 1.0.0, skalibs is available under the terms of the
ISC license; see the
included package/COPYING file.
Requirements
System
Build-time
- A standard C development environment
Run-time
No dependencies. skalibs does not run per se; it's used in
making other software run.
Installation
skalibs follows the
slashpackage convention.
If you do not know why it is a good thing, read
this page.
- Create a /package directory:
mkdir -p /package
chmod 1755 /package
cd /package
- Download the latest version of skalibs,
skalibs-1.2.7.tar.gz,
into /package.
- Unpack the skalibs package:
tar -zxpvf skalibs-1.2.7.tar.gz
# if you do not have GNU tar, check with your gunzip and tar manual pages.
rm skalibs-1.2.7.tar.gz
cd prog/skalibs-1.2.7
- If you're trying to build skalibs in a cross-compilation environment,
then read that page.
The following instructions assume that you are installing skalibs as a native
standalone package.
- Configure the package by editing the files in conf-compile/
following these
instructions.
- Be aware that if you want to link skarnet.org software with a
different libc than the default (for instance if you're a Linux user
and want to use the uClibc or the
diet libc to make static
executables), you will have to also compile skalibs with your chosen
libc, so you need to modify conf-compile/conf-cc,
conf-compile/conf-dynld and conf-compile/conf-ld
accordingly.
- If you want to change the default executable search path for the
pathexec_run() function when the PATH environment variable is empty,
also edit conf-defaultpath.
- If you want EGD support for pseudorandom number generation,
also edit conf-compile/conf-egd.
- If you want global configuration files to go elsewhere than /etc,
also edit conf-compile/conf-etc.
- skalibs is now customizable via a set of compilation flags.
Make sure to read this page to understand what
they do and set the flags you need for your system.
- Then compile and set up skalibs:
make
sudo make install
Assuming that $prefix is the contents of conf-compile/conf-sp_root
(i.e. empty for a default slashpackage installation):
- you must have unzipped the skalibs tarball in $prefix/package
- the libraries will be available under $prefix/package/prog/skalibs/library/
- the shared libraries (if any) will be available under $prefix/package/prog/skalibs/library.so
- the header files will be available under $prefix/package/prog/skalibs/include/
- system-dependent files that other packages may use to automatically configure themselves
for your system can be found under $prefix/package/prog/skalibs/sysdeps/
-
You can move those files to wherever you want them. However,
if you're going to move away from the default installation:
- Please read this page about
slashpackage again, and try and follow the convention as much as
your policy allows you to. If you can comply with your policy by just
having a non-empty $prefix, please do so:
/usr/lib/slashpackage/package/prog/skalibs/library/libstddjb.a
is better than /usr/lib/libstddjb.a, because it makes it easier
for slashpackage-aware software to find the library. Of course, I am just
as happy if /usr/lib/slashpackage/package/prog/skalibs/library/libstddjb.a
is a symlink to /usr/lib/libstddjb.a.
- Be aware that system-critical binaries may depend on skalibs and
particularly libstddjb, so if your policy is to dynamically link
everything anyway (as is the case for instance with GNU distributions),
make sure that at least libstddjb.so, and if possible other
.so files, are always on the root filesystem, i.e. in in
/lib as opposed to /usr/lib.
- You can then delete the compilation temporary files:
make clean