
RequiredBuilder is a simple tool to help Slackware packages developers
finding dependencies of a package and in particular writing the slack-required
file for the slapt-get's dependency checking.

It scans the package directory tree and finds all the binary dependencies 
using ldd. Besides it's able to identify scripts that need perl or python,
or classes that need java. After collecting dependencies it adds them to the
slack-required file using the informations in /var/log/packages.
Of course it doesn't substitute the package developer, in fact it won't
delete any handwritten dependency in the slack-required file.

You can prevent requiredbuilder from adding any packages to the slack-required
file adding their complete name to /etc/requiredbuilder.conf

requiredbuilder tries to guess the package name by reading the slack-desc or the
build directory name: if there is no slack-desc or the directory doesn't start
with "package-" it can't guess the package name so if you have another version
of the same package you are building installed on your system, this could be
seen as a dependency and requiredbuilder isn't able to remove it.

Since version 0.16.0 there is a new quick way to manually force requiredbuilder
to add or exclude dependencies: the two environment variables ADD and EXCLUDE.
For example if you want to be sure that mysql and openldap are NOT in the list
of dependencies generated by requiredbuilder for postfix, but openssl is, you
can call requiredbuilder like this:

ADD="openssl" EXCLUDE="mysql, openldap" requiredbuilder /tmp/package-postfix

Please consider that you need a comma to separate multiple entries in both
lists. The ADD variable fully supports slack-required's syntax and its content
goes directly into the final dependency list:

ADD="openssl >= 0.9.8e-i486-1, glibc = 2.5-i486-1"

Differently the EXCLUDE variable only supports short package names, full package
names (not supported by slack-required but supported by requiredbuilder) or the
operator =:

EXCLUDE="openldap-client, sendmail-8.14.1-i486-1, mysql = 5.0.37-i486-1"

Since version 0.16.0 another important functionality has been added: recursive
checking.
With this option requiredbuilder prints the whole dependency tree required by
the package
to run properly. If the requiredbuilder.conf file is configured correctly with
an existent and correct PACKAGES.TXT file, then requiredbuilder reads that file
to find the dependencies of the dependencies of the current package. On Zenwalk
systems netpkg automatically downloads that file from the repository and keeps
it updated. On Slackware you have to manually download it from your preferred
repository with slapt-get support (for example linuxpackages.net, slacky.eu). If
that file is not provided or doesn't exist then requiredbuilder manually
calculates the whole dependency tree (it can take a very long time).

RequiredBuilder is known to slow down significantly when run on systems with the
LANG environment variable set to en_US.UTF-8. The slow down is due to grep that
can be 10 times slower on UTF-8 systems. As a workaround you can "export
LANG=en_US" before executing requiredbuilder.



EXAMPLE:
If you are building postfix and the directory of the package in your SlackBuild
is /tmp/package-postfix:

requiredbuilder /tmp/package-postfix


if you only want to see the dependencies of an already made tgz package:

requiredbuilder -n qca-sasl-1.0-i486-1stb.tgz


if you want to generate a Zenwalk style depfile:

requiredbuilder -z qca-sasl-1.0-i486-1stb.tgz > qca-sasl-1.0-i486-1stb.dep


OPTIONS:
-v		writes version controls
-c		checks every single file in the directory tree instead of following the FHS
-b		only scans binary files (no scripts at all)
-p		doesn't search for perl dependencies
-s <dir>	writes a copy of the slack-required to <dir>
-y		yes to all questions
-n		only prints to stdout, implies -y
-z		only prints to stdout a comma separated list of dependencies, implies -y
-r		enables recursive checking
-i		check for the dependencies of an installed package, implies -n -y
