In short, a full standard Slackware Installation should be able to run makepack to install any software described with a makepack rule.
The Makefile itself of makepack needs a few tools:Variable | Default value | Description |
---|---|---|
PREFIX | /usr/local | Prefered path for software installation. Be aware that not all rule files will care about this variable. Some software like python packages might install into a hardcoded path like /usr/lib/python2.3/site-packages/. |
SOURCE_DIR | source | Where downloaded source packages shall be placed. |
BUILD_DIR | build | Which directory to use for compiling software. Depending on the setting of CLEAN_BUILD this directory might be considered a directory for temporary files. |
PACKAGE_DIR | packages | Where the created Slackware packages will be placed. |
LOG_DIR | /var/log/packages | Where Slackware keeps its logs of installed software. You are not supposed to change this variable unless you have done something strange to your Slackware installation. |
ARCH | i486 | The arch part of the package name. It might also affect the compilation flags variable CFLAGS. As this variable is set with ?= the setting can be overriden by setting an environment variable before running make. |
PKG_RELEASE | mp | The build number part of the package name. |
CLEAN_BUILD | True | If this variable is set the build directory with the compiled sources will be removed after software installation. This is the default and is a good choice as it saves disk space. If you are creating your own rule files and want to debug the compilation you it might help to comment out this variable from Settings.mk. |
CFLAGS | -O2 | Optimization flags for C programs. This variable might be altered by the ARCH variable and it might also be overridden by some rule files. |
CREATE_PKG | sudo checkinstall $(CHECKINSTALL_FLAGS) | How to create a Slackware package during software installation. The default is to use sudo to avoid having to run all the steps of makepack as root. |
INSTALL_PKG | sudo installpkg | How to install a Slackware package. The default is to use sudo to avoid having to run all the steps of makepack as root. |
ARCH |
These environment variable can be used to override the value
in Settings.mk. Example for how to set a variable:
|
||||
---|---|---|---|---|---|
PREFIX |
The use of the root account should be minimized to avoid bad consequences from mistakes and security issues. However, installing software system wide usually needs root privileges. It would be possible to run the makepack Makefile as root, but as root privileges are not needed to download and compile software it is recomended to run makepack as a normal user. By configuring sudo to allow that normal user to run checkinstall and installpkg makepack gets root privileges only when needed.
It is important to note that a user given root privileges to run checkinstall and installpkg really should be a trusted user. The programs checkinstall and installpkg are able to overwrite any file and to run any command.
If you have a trusted user who has the username "spock" you should add the following two lines to /etc/sudoers by using the visudo command:
spock ALL=(ALL) NOPASSWD: /usr/sbin/checkinstall spock ALL=(ALL) NOPASSWD: /sbin/installpkgUsing visudo is like using the vi editor. If you haven't used vi before you should do some reading first. For a beginner it can even be hard to get out of vi. You will find many good texts about vi at Google.
Target | Description |
---|---|
make help | Shows this help about targets |
make list | Will list the software of all rule files |
make program download | Will download the source of program all all its dependencies without compiling or installing anything. |
make program install | Will check if program is already installed. Otherwise its source will be downloaded if necessary and program will be unpacked, compiled and installed. |
make program check | Will check if program or any of its dependencies are already installed. |
make all download | Will download the source of all software described by rule files. |
make all install | Will install all software described by rule files which are not already installed. |
make clean | Will remove any files in the build directory. However, downloaded source archives or created packages are not removed. By default, it is not necessary to do "make clean" as CLEAN_BUILD is set in Settings.mk. |