1 (edited by aloniv 2022-03-30 12:11:47)

Topic: [Hyperbola 0.4] PKGBUILDs for missing packages

Hyperbola 0.4 does not have a Hunspell dictionary to use with Claws or Icedove-UXP other than a Hebrew dictionary. The following PKGBUILD based on hunspell-nb AUR PKGBUILD provides a UK English dictionary that can be used by Icedove and Claws. By making small modifications to the PKGBUILD other dictionaries can be installed as well.

# Maintainer: Martin Sandsmark <martin.sandsmark@kde.org>

pkgname=hunspell-en_GB
_LOver=6.1.3
pkgver=6.1.3.2
pkgrel=1
pkgdesc='Spell checking support for British English'
arch=('any')
url='https://extensions.openoffice.org/en/node/3785'
license=('LGPL')
depends=('hunspell')
source=("https://download.documentfoundation.org/libreoffice/src/${_LOver}/libreoffice-dictionaries-${pkgver}.tar.xz")
sha512sums=('5ded2c03ca83cca9e49234f712c3e584509a547d28b8a2b2715388a8a69d5d5de5181c06d7b0488e6b5a9949aa98dca96b29b3cffcb7681a3>

package() {
  cd "${srcdir}/libreoffice-${pkgver}/dictionaries/en/"
  install -dm755 ${pkgdir}/usr/share/hunspell
  install -m644 en_GB.aff $pkgdir/usr/share/hunspell
  install -m644 en_GB.dic $pkgdir/usr/share/hunspell

  install -dm755 ${pkgdir}/usr/share/myspell/dicts
  ln -sv /usr/share/hunspell/en_GB.aff ${pkgdir}/usr/share/myspell/dicts/
  ln -sv /usr/share/hunspell/en_GB.dic ${pkgdir}/usr/share/myspell/dicts/
}

Other useful missing packages that are easy to install include speedtest-cli (just compile the Arch PKGBUILD), streamlink (upgrade python-lxml and python-requests PKGBUILDs from Arch, removing the check sections and dependencies, and also install python-websocket-client and python-pycountry from Arch) and mtn (use AUR PKGBUILD).

I also use the srt programme in this PKGBUILD to edit subtitle files.

# Maintainer: Maxim Andersson <thesilentboatman@gmail.com>

pkgname=python-srt
_pkgname=srt
pkgver=3.5.2
pkgrel=1
pkgdesc="A tiny but featureful Python library for parsing, modifying, and
composing SRT files"
arch=('any')
url="https://github.com/cdown/srt"
license=('MIT')
depends=('python')
makedepends=('python-setuptools')
source=("https://github.com/cdown/srt/archive/${pkgver}.tar.gz")
sha512sums=('b43408c54a27bb878c9f8926ab6a26cc0403c65b5e25f033b9521e93044e3dd5d79ce18e05b62aecfab92dc42062644daed82676b36526991e434ba4a23f8f99')

package() {
  cd "${srcdir}/${_pkgname}-${pkgver}"

  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  python setup.py install --root="${pkgdir}" --optimize=1
}

# vim:set ts=2 sw=2 et:

2

Re: [Hyperbola 0.4] PKGBUILDs for missing packages

Thanks! smile

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

3

Re: [Hyperbola 0.4] PKGBUILDs for missing packages

Another easy to install package from Arch's repo is python-html2text which is useful to produce a text file from an HTML file (which might contain non-free JavaScript).

4

Re: [Hyperbola 0.4] PKGBUILDs for missing packages

More useful easy to install packages include libinklevel and ink from AUR (to show printer's ink levels) and the package img2pdf which converts images to a PDF file (available from Arch's repo - can be compiled with an older version of python-pikepdf such as 2.16.1 which is also available from Arch's repo after removing the check section and its dependencies from img2pdf's PKGBUILD).

The package zbar-gtk from Hyperbola's repos cannot be installed - a workaround is to compile a version of zbar containing zbar-gtk such as using this PKGBUILD (this version provides both zbar-gtk and zbar-qt).

# Maintainer (Arch): Felix Yan <felixonmars@archlinux.org>
# Contributor (Arch): Marti Raudsepp <marti@juffo.org>
# Contributor (Arch): Radu Andries <admiral0@tuxfamily.org>
# Contributor (Arch): Andy Weidenbaum <archbaum@gmail.com>
# Maintainer: André Silva <emulatorman@hyperbola.info>

pkgname=zbar
pkgver=0.23.90
_debver=0.23.90
_debrel=1
pkgrel=1
pkgdesc="Application and library for reading bar codes from various sources"
arch=('i686' 'x86_64')
url="https://github.com/mchehab/zbar"
license=('LGPL-2.1')
makedepends=('gtk' 'graphicsmagick' 'libxv' 'v4l-utils' 'qt-x11extras' 'python' 'xmlto'
             'docbook-xsl' 'gobject-introspection' 'quilt')
conflicts=('zbar-gtk' 'zbar-qt' 'python-zbar')
provides=('zbar-gtk' 'zbar-qt' 'python-zbar')
replaces=('zbar-gtk' 'zbar-qt' 'python-zbar')
source=("$pkgname-$pkgver.tar.gz::https://github.com/mchehab/zbar/archive/$pkgver.tar.gz"
        "https://deb.debian.org/debian/pool/main/z/zbar/zbar_$_debver-$_debrel.debian.tar.xz")
sha512sums=('d73d71873bec68ee021997512a9edbd223f5f5fe43c66c4dd3502224ba6009be2e5e1714766cb8e1056244673e87e0939ed0319116f61d7371b5ab79fb5e04eb'
            '14992376d82dae014450b1c9e44afce71be776fc2edc3d37436330f311322b508de7f28e96409d483dd5c40fd7e31922788b6a8975480e15ed784e0c9c43e11b')

prepare() {
  cd $pkgname-$pkgver
  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    quilt push -av
  fi
  autoreconf -vfi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --with-qt --with-gtk=gtk3 --without-dbus --with-graphicsmagick --without-imagemagick CFLAGS="$CFLAGS -DNDEBUG"
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd zbar-$pkgver
  make DESTDIR="$pkgdir" install

  install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname
}

# vim:set ts=2 sw=2 et:

5

Re: [Hyperbola 0.4] PKGBUILDs for missing packages

Yes, thanks for addition. We have already made a patch for zbar being now in the queue for building and release on testing.
Same for libinklevel and ink.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

6

Re: [Hyperbola 0.4] PKGBUILDs for missing packages

Just also a reminder: We are for sure not "Arch GNU/Linux" any longer and our compatibility is and will going to vanish very soon. Even though packages like img2pdf are not included for a reason: They are impossible to build correct in a clean chroot-environment as their dependency is also not possible to be resolved (meaning therefore the dependencies). Here is a log from earlier tryouts:

 |  WARNING: The pip package is not available, falling back to EasyInstall for handling setup_requires/test_requires; this is deprecated and will be removed in a future version.
 |  Download error on https://pypi.org/simple/setuptools_scm_git_archive/: [Errno -3] Temporary failure in name resolution -- Some packages may not be found!
 |  Download error on https://pypi.org/simple/setuptools-scm-git-archive/: [Errno -3] Temporary failure in name resolution -- Some packages may not be found!
 |  Couldn't find index page for 'setuptools_scm_git_archive' (maybe misspelled?)

To explain: Even to have some stable tarball does not mean the concurrent package is respecting no further download. This is not supported within our build-environment and therefore it is not possible to include those packages, to be called for sure not clean for building. And yes: I understand absolutely the point to include more packages at a time and using the PKGBUILD-scripts back from Arch GNU/Linux at all. smile Nevertheless: The warning stays as to be seen above. Those packages and PKGBUILD-scripts can be only source for further ways from now on. Many are not designed very good or even worse just built without any clean environment and just uploaded as finished package. So there is this illusion they work in some way. They do not work and will not ever work for real!

The best way for testing is to setup libretools and use a chroot-environment. The commands makepkg and libremakepkg are not fully comparable at all, right from the beginning makepkg is absolutely tolerant for anything to be downloaded in between. But the chroot-environment is for sure not and very strict: One phase for collecting, afterwards building, checking and packaging without any further connection. Missing dependencies? Or wrong defined parameters will lead to an immediate ending of the process while makepkg stay a bit longer or tolerate them through downloading (to be seen in the log above as difference). And makepkg is using local installed files and packages, even when not defined within depends or makedepends. The result is not a clean package at all, not possible for used within chroot-environments and therefore also not possible to be included within the repositories. That's the reasoning when we exclude packages besides being incompatible, unfree, insecure or more. And with the dependency-example above: There is the deprecated-warning for everyone being alarmed that our way without python-pip is not possible for long with it. It is just rational to left out those packages as they are of no use and other applications using them the same.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

7 (edited by aloniv 2022-04-21 19:50:39)

Re: [Hyperbola 0.4] PKGBUILDs for missing packages

Cpulimit and lxsplit from the official Arch repos can also be easily installed using the Arch PKGBUILDs. I like David's Batch Processor GIMP plugin which I couldn't find anywhere so I created a PKGBUILD.

pkgname=gimp-plugin-dbp
pkgver=1.1.9
_pkgver=1-1-9
pkgrel=1
pkgdesc="David's Batch Processor GIMP plugin"
arch=('i686' 'x86_64')
url="https://sourceforge.net/projects/gimpdbpplugin/"
license=('GPL')
depends=('gimp')
source=(http://downloads.sourceforge.net/gimpdbpplugin/dbpSrc-$_pkgver.tgz)
sha512sums=('f2b05610c0edd179a394f510951147fb3362564d67cb2b48ecbd1840b97b9c3de43c718db06576a99d9a5b76384ff4b4a4cdfeddd16a015d161f338d351be925')

build() {
  cd "$srcdir/dbp-$pkgver"
  make
}

package() {
  cd "$srcdir/dbp-$pkgver"
  mkdir -p $pkgdir/usr/lib/gimp/2.0/plug-ins/
  cp dbp $pkgdir/usr/lib/gimp/2.0/plug-ins/
}

It looks like I didn't package it correctly the first time around. I fixed it now smile