My first SlackBuild

2022-10-23

Today, I contributed to SBo with my first SlackBuild, which can be found here.

Come again?

A SlackBuild is a package for Slackware, almost analog to deb of Debian and rpm of Red Hat. One big difference, however, is that SlackBuild does not provide a compiled binary, but is more like a recipe for (automatically) compiling the source code and carrying out all other steps that you otherwise would do manually, when you install software not provided in the official repositories. Jusk like other packages, it helps keeping the system clean and standardized, and it makes it easier to install, upgrade and remove software, without the need to remember all the build steps taken.

crow-translate

The application that I made such a SlackBuild for is crow-translate, which according to its README is:

[…] a simple and lightweight translator written in C++ / Qt that allows you to translate and speak text using Google, Yandex, Bing, LibreTranslate and Lingva translate API. […]

The background is that I was reading an article that I only managed to find in german, and I wanted a lightweight tool that could translate single words or sentences for me. I found this Github project, and somehow ended up creating a SlackBuild instead of trying to understand the article.

Resources

While researching the ways of creating a SlackBuild script, I found some great resources, and the reason for the blog post is actually for myself to remember those:

Basically, I took the template above and adjusted it based on the building instructions in the README of crow-translate. As I noticed that the latest (v2.10.0) release of crow-translate includes a submodule (fluent-icon-theme) with lots of broken symbolic links, I had to add a step of deleting those (using find . -xtype l -delete). Perhaps it would have been better to have the issue fixed upstream, but although not as elegant, this quick remedy works.

Another note: I was a bit confused about what build TAG to use in the script. It turns out, however, that ALL packages to be hosted by SlackBuilds.org should have the same tag, _SBo.

Now I’ll just have to wait and see whether my contribution will be approved!

Update 2022-10-29:

I got an answer with some requirements needed to be fulfilled. As it turns out, there is a sbo-maintainer-tools package which include two “lint” scripts – sbolint and sbopkglint – that carries out some tests on the SlackBuild files and the finished tgz respectively, and some of these tests failed.

I fixed this today and ran the lint scripts which now passed. Then I reuploaded the package.

Update 2022-11-05:

The contribution is accepted and can be found here.