[Dev] [Packaging Request] GNU units

Wael Karram wael at waelk.tech
Sat Apr 22 09:40:49 GMT 2023


Hello,
It seems as though upstream arch has dropped the GNU units package, and arch32
is on the way to do so too.
I've repackaged it from the PKGBUILD available on the AUR.

Attached to this email are the required files, tested with libremakepkg.

-- 
Kind Regards,
Wael Karram.


-------------- next part --------------
# Maintainer (AUR): tarball <bootctl at gmail.com>
# Contributor (AUR): Kyle Keen <keenerd at gmail.com>
# Contributor (AUR): Sergej Pupykin <pupykin.s+arch at gmail.com>
# Contributor (AUR): Jeff Mickey <jeff at archlinux.org>
# Contributor (AUR): Steve Sansom <snsansom at gmail.com>
# Maintainer (Parabola): Wael Karram <wael at waelk.tech>

# Parabola Changes and Rationale:
# Add i686 and armv7h targets.

pkgname=units
pkgver=2.22
pkgrel=2
pkgdesc="converts between different units"
arch=('x86_64')
arch+=('i686' 'armv7h')
url="https://www.gnu.org/software/units/units.html"
depends=('readline')
optdepends=('python-unidecode: for live currency rates'
            'python-requests: for live currency rates')
makedepends=('python-unidecode' 'python-requests')
license=("GPL")
options=('!makeflags')
validpgpkeys=('9AD8FC4162D7937CF64F972E1889D5F0E0636F49')
source=(https://ftp.gnu.org/gnu/units/$pkgname-$pkgver.tar.gz{,.sig}
        'units_currency.timer'
        'units_currency.service')
sha256sums=('5d13e1207721fe7726d906ba1d92dc0eddaa9fc26759ed22e3b8d1a793125848'
            'SKIP'
            'c1cb48a6157c850a0b7ecbf4387b82820d6e42f4a2c7ff0eb9de293bad6b128f'
            '52e8cd68110e797e3ee3737f06200505225039b18f3f9b87ae38b6c539c9ccb2')

build() {
  cd "$pkgname-$pkgver"
  ./configure --prefix=/usr --datadir=/usr/share --sharedstatedir=/var/lib

  # /usr/bin/pager seems to be a Debian-ism; it is not provided by any of the
  # packages shipped with Arch Linux. Replace it with less, which, according to
  # pkgstats, is shipped on 100% of Arch systems, and will make the 'help'
  # function work correctly on systems with an empty $PAGER env var.
  sed -i 's|DEFAULTPAGER "/usr/bin/pager"|DEFAULTPAGER "/usr/bin/less"|' units.c

  make
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
  rm "$pkgdir/usr/share/units/currency.units"
  ln -s /var/lib/units/currency.units "$pkgdir/usr/share/units/currency.units"
  install -Dm644 ../units_currency.timer "$pkgdir/usr/lib/systemd/system/units_currency.timer"
  install -Dm644 ../units_currency.service "$pkgdir/usr/lib/systemd/system/units_currency.service"
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: units_currency.service
Type: text/x-systemd-unit
Size: 165 bytes
Desc: not available
URL: <https://lists.parabola.nu/pipermail/dev/attachments/20230422/8fb63850/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: units_currency.timer
Type: text/x-systemd-unit
Size: 154 bytes
Desc: not available
URL: <https://lists.parabola.nu/pipermail/dev/attachments/20230422/8fb63850/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.parabola.nu/pipermail/dev/attachments/20230422/8fb63850/attachment-0001.sig>


More information about the Dev mailing list