diff options
Diffstat (limited to 'hello/PKGBUILD')
-rw-r--r-- | hello/PKGBUILD | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/hello/PKGBUILD b/hello/PKGBUILD new file mode 100644 index 0000000..c3ccdc0 --- /dev/null +++ b/hello/PKGBUILD @@ -0,0 +1,58 @@ +# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> +# This program is free software: you can redistribute it and/or modify +# it under the terms of the CC0 1.0 License. +# Maintainer: Parabola Hackers <dev@lists.parabola.nu> +pkgname="hello" +pkgver=2.12.1 +pkgrel=1 +pkgdesc="GNU Hello (example GNU package)" +arch=('x86_64') +url='https://www.gnu.org/software/hello/' +# We use static linking, so it includes the Glibc (GPL, LGPL) as well. +license=('GPL' 'LGPL' 'GPL3') +source=("https://ftp.gnu.org/gnu/hello/${pkgname}-${pkgver}.tar.gz"{,.sig} + 'Dockerfile' + 'GPL.txt' + 'LGPL.txt') +# Reuben Thomas <rrt@sc3d.org> +validpgpkeys=('24093F016FFE8602EF449BB84C8EF3DA3FD37230') +sha512sums=('f871e5f8f64b0633ee45855c886ddf37565ae7a13d68a2d7d2df007e508355fcc85736b93c0274c4fed5e628a94d8a3f699925c7f44857dcd0aba78b747749e2' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') + +prepare(){ + install -m644 "${srcdir}/Dockerfile" -t "${pkgname}-${pkgver}" +} + +build(){ + cd "${pkgname}-${pkgver}" + + ./configure --prefix=/ LDFLAGS=-static + make + sudo docker buildx build --output type=tar,dest=hello.tar . + sudo xz -f -9e --verbose -T 0 hello.tar +} + +check(){ + cd "${pkgname}-${pkgver}" + make check +} + +package(){ + cd "${pkgname}-${pkgver}" + + install \ + -d "${pkgdir}/usr/share/licenses/${pkgname}/" + install COPYING \ + -t "${pkgdir}/usr/share/licenses/${pkgname}/" + install "${srcdir}/GPL.txt" \ + -t "${pkgdir}/usr/share/licenses/${pkgname}/" + install "${srcdir}/LGPL.txt" \ + -t "${pkgdir}/usr/share/licenses/${pkgname}/" + install \ + -d "${pkgdir}/usr/share/docker-images/${pkgname}/" + install -o root -g root -m 644 hello.tar.xz \ + -t "${pkgdir}/usr/share/docker-images/${pkgname}/" +} |