The Autopackage API

Table of Contents / Public library / Checking and Installation

Checking and Installation

Checking and installation functions.

Subcategories

Functions in this category

checkDiskSpace<NEEDED> <LOCATION>
testForLib[-v] LibraryName
scanLDLibPathLibrary
installBinFILES
installLibLIBRARIES
installDesktop<CATEGORY> <FILES>
installInfoFILES
installManSECTION FILES
installIcon<FILES>
installIconTheme<NAME> <FILES>
installSound<FILES>


Details

checkDiskSpace
Syntax: checkDiskSpace <NEEDED> <LOCATION>
Check for free diskspace in LOCATION.
NEEDED: The needed disk space in bytes.
LOCATION: The directory to check for disk space.
Returns: 0 if there is at least NEEDED byes of free disk space, or 1 if there isn't.
Example:
# Check whether /tmp has at least 1392003 bytes of free disk space
checkDiskSpace 1392003 "/tmp"


testForLib
Syntax: testForLib [-v] LibraryName
Check for the existance of a library.
LibraryName: The library to check for.
-v: Verbose mode. Print each version number out on stdout.
Outputs: If -v is specified, a list of found library version numbers.
Returns: 0 = passed, 1 = library not present.


scanLDLibPath
Syntax: scanLDLibPath Library
Scan $LD_LIBRARY_PATH for Library.
Library: The library to search for (expected as libname.so)
Outputs: A list of found libraries, seperated by newline.
Example:
export LD_LIBRARY_PATH=/home/mike/garnome/lib
scanLDLibPath libglib.so
# Outputs matches for example:
#  /home/mike/garnome/lib/libglib-2.0.so
#  /home/mike/garnome/lib/libglib-2.0.so.0
#  /home/mike/garnome/lib/libglib-2.0.so.0.200.0


installBin
Syntax: installBin FILES
Install binaries. $PATH will be automatically updated.
FILES: The binaries to install.


installLib
Syntax: installLib LIBRARIES
Install shared libraries (.so). The linker search path will be automatically updated.
LIBRARIES: The libraries to install.


installDesktop
Syntax: installDesktop <CATEGORY> <FILES>
Install a desktop entry (.desktop file). This function will automatically detect GNOME and KDE and will copy the desktop entires to the proper locations.
CATEGORY: The category the desktop entries belong to.
FILES: The desktop entries to install.


installInfo
Syntax: installInfo FILES
Install .info files.
FILES: The .info file(s) to install.


installMan
Syntax: installMan SECTION FILES
Install Unix manual pages. The manpage search path will be automatically updated.
SECTION: The section these manpages belong to.
FILES: The manpages to install.


installIcon
Syntax: installIcon <FILES>
Install files to proper desktop icon directory.
FILES: The icon files to install.


installIconTheme
Syntax: installIconTheme <NAME> <FILES>
Install files to proper desktop icon theme directory.
NAME: The name of the icon theme.
FILES: The icon theme files to install.
Example:
installIconTheme "artdeco" ./share/icons/artdeco


installSound
Syntax: installSound <FILES>
Install files to proper desktop sound directory.
FILES: The sound files to install.
Example:
installSound ./share/sounds


Last update: 27/3/2003