2024-03-27 20:01:08 +01:00
|
|
|
# SlackBuilder
|
|
|
|
|
|
|
|
SlackBuilder is a tool which aims to help to update Slackware packages.
|
|
|
|
It checks for the latest version of an upstream package and can modify
|
|
|
|
SlackBuild meta information accordingly.
|
|
|
|
|
2024-03-31 17:06:54 +02:00
|
|
|
## Features
|
|
|
|
|
2024-04-01 21:31:41 +02:00
|
|
|
- Querying various sources (like registries) for the latest upstream version.
|
|
|
|
Currently supported sources are:
|
|
|
|
- GitHub
|
|
|
|
- Packagist
|
|
|
|
- Remote text file containing a version number (like the LATEST file).
|
|
|
|
- Updating package version and checksum in the .info file;
|
|
|
|
Updating version variables in the .SlackBuild
|
|
|
|
- Updating packages with multiple sources. One source is assumed to be the main
|
|
|
|
source and match the version of the package. Other sources are just updated to
|
|
|
|
the latest version available for them.
|
|
|
|
- Modifying or just reuploading source tarballs to a different destination.
|
|
|
|
SlackBuilder can download the original source tarball, optionally extract and
|
|
|
|
modify its contents, and upload it to another server. It can be used for
|
|
|
|
example to download package dependencies to ship them all within a single
|
|
|
|
archive, so the package can be built offline.
|
|
|
|
|
2024-03-27 20:01:08 +01:00
|
|
|
## Build instructions
|
|
|
|
|
|
|
|
SlackBuilder is a Haskell program and can be built and run using the
|
|
|
|
Cabal build tool and package manager:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
cabal build
|
|
|
|
```
|
|
|
|
|
|
|
|
After that you can run slackbuilder using Cabal and `cabal run slackbuilder`.
|
|
|
|
Or you can install the program locally with `cabal install` and run it just
|
|
|
|
as `slackbuilder` assuming `~/.cabal/bin` is on your PATH.
|
|
|
|
|
2024-03-31 17:06:54 +02:00
|
|
|
# Usage
|
|
|
|
|
2024-03-27 20:01:08 +01:00
|
|
|
## Configuration
|
|
|
|
|
|
|
|
There is a sample configuration file under `config/config.toml.example`.
|
2024-03-31 17:06:54 +02:00
|
|
|
The sample contains comments describing each supported option.
|
2024-03-27 20:01:08 +01:00
|
|
|
Just copy this file to `config/config.toml` and modify as needed.
|
|
|
|
|
|
|
|
Each package that should be updated automatically needs a special
|
|
|
|
description which contains links to the upstream repositories and
|
|
|
|
instructions how the sources should be prepared.
|
|
|
|
|
|
|
|
Unfortunately the only format currently supported for the package
|
|
|
|
descriptions is Haskell source code. But I'm planning to make it
|
|
|
|
possible to describe the packages without recompiling the slackbuilder
|
|
|
|
itself.
|
|
|
|
|
|
|
|
For the time being `src/Main.hs` contains descriptions of my
|
|
|
|
slackbuilds, that can be used as an example and a start point.
|
2024-03-31 17:06:54 +02:00
|
|
|
|
|
|
|
## Command line options
|
|
|
|
|
|
|
|
SlackBuilder is called with a command as its first argument:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
slackbuilder COMMAND
|
|
|
|
```
|
|
|
|
|
|
|
|
Currently supported commands are listed below.
|
|
|
|
|
|
|
|
### check
|
|
|
|
|
|
|
|
`check` checks whether there are updates available. It prints the name of each
|
|
|
|
known package together with its version. If the package version is not the
|
|
|
|
latest known version, the version the package can be updated to is printed as
|
|
|
|
well.
|
|
|
|
|
|
|
|
### up2date
|
|
|
|
|
|
|
|
Performs the package updates for packages the can be updated. `up2date` accepts
|
|
|
|
an optional argument specifying the package that should be updated if only one
|
|
|
|
package should be updated and not all.
|