diff options
Diffstat (limited to 'trisquel-etiona-x86_64/PKGBUILD')
-rw-r--r-- | trisquel-etiona-x86_64/PKGBUILD | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/trisquel-etiona-x86_64/PKGBUILD b/trisquel-etiona-x86_64/PKGBUILD new file mode 100644 index 0000000..86afdc8 --- /dev/null +++ b/trisquel-etiona-x86_64/PKGBUILD @@ -0,0 +1,75 @@ +# 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> + +_distro=trisquel +_suite=etiona +_arch=x86_64 + +pkgname="${_distro}-${_suite}-${_arch}" +pkgver=9.0 +pkgrel=3 +pkgdesc="Trisquel docker image(s)" +arch=('x86_64') +url='https://trisquel.info' +license=('FSDG') +depends=('debuerreotype' + 'trisquel-keyring') +# This docker image follows the Free System Distribution Guidelines (GNU FSDG) +# The FSDG itself is under the CC-BY-ND-4.0 +source=('free-system-distribution-guidelines.html' + 'CC-BY-ND-4.0.txt' + "https://gitlab.trisquel.org/trisquel/package-helpers/-/raw/${_suite}/helpers/DATA/apt/trisquel/sources.list.in" + "${pkgname}.tar.xz.sha512") +sha512sums=('SKIP' + 'SKIP' + '6650ab124609b42235145c247dbf496cc1e8d2e5dad4ba9105f42f0042d343851a09055def03edf06ad5553daf8285b956885fbba17b88afbb4b66d2030f6703' + 'SKIP') + +build(){ + # Generate sources.list without ${_suite}-security and ${_suite}-updates + # to make sure that the image is reproducible + sed "s/&trisquel-codename;/${_suite}/" sources.list.in | \ + grep " ${_suite} " > sources.list + + install -d rootfs + + # debuerreotype really requires root, see the following bug report for + # more details: + # https://github.com/debuerreotype/debuerreotype/issues/66 + sudo debuerreotype-init --non-debian rootfs "${_suite}" https://archive.trisquel.info/trisquel + sudo debuerreotype-minimizing-config rootfs + + # Add /etc/apt/sources.list + sudo install -m644 \ + --owner=root --group=root \ + -t rootfs/etc/apt sources.list + + sudo debuerreotype-apt-get rootfs update + sudo debuerreotype-apt-get rootfs install -y dpkg-dev # for dpkg-source + + sudo debuerreotype-apt-get rootfs source -y \ + $(dpkg --root rootfs --get-selections | cut -f 1) + + sudo debuerreotype-tar rootfs "${pkgname}.tar" + + # docker import ${_pkgname}.tar.xz works, so it's better to have the + # smallest file possible as xz compresses quite well and we will at + # least have one docker image per FSDG distribution if possible. + sudo xz -9e --verbose -T 0 "${pkgname}.tar" +} + +package(){ + install -d "${pkgdir}/usr/share/docker-images/${pkgname}/" + install "${pkgname}.tar.xz" -t "${pkgdir}/usr/share/docker-images/${pkgname}/" + + install -d "${pkgdir}/usr/share/licenses/${pkgname}/" + install free-system-distribution-guidelines.html -t "${pkgdir}/usr/share/licenses/${pkgname}/" + install CC-BY-ND-4.0.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/" +} + +check(){ + sudo sha512sum -c "${pkgname}.tar.xz.sha512" +} + |