diff --git a/srcpkgs/voidnsrun-setup/INSTALL b/srcpkgs/voidnsrun-setup/INSTALL index de96675..0b9ccd2 100644 --- a/srcpkgs/voidnsrun-setup/INSTALL +++ b/srcpkgs/voidnsrun-setup/INSTALL @@ -2,6 +2,11 @@ case "$ACTION" in post) + if [ "$UPDATE" = "yes" ]; then + # Update the container + xchroot /glibc xbps-install -Syu + fi + voidnsrun-setup ;; diff --git a/srcpkgs/voidnsrun-setup/files/voidnsrun-setup b/srcpkgs/voidnsrun-setup/files/voidnsrun-setup deleted file mode 100755 index 9218810..0000000 --- a/srcpkgs/voidnsrun-setup/files/voidnsrun-setup +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash -# voidnsrun setup script - -repokeys_dir="/var/db/xbps/keys" - -# Check if base-voidstrap is installed on glibc container -function checkstrap { - xbps-query -r /glibc -m | grep base-voidstrap - exitstatus=$? - - if [ $exitstatus = 0 ]; then - strapinstalled=1 - else - strapinstalled=0 - fi -} - -# Get Void main mirror in use and adapt it to use glibc instead of musl. - function get_target_repo { - if [ ! -d /etc/xbps.d/00-repository-main.conf ]; then - mainrepofile="/usr/share/xbps.d/00-repository-main.conf" - else - mainrepofile="/etc/xbps.d/00-repository-main.conf" - fi - - cat $mainrepofile | cut -d"=" -f2 | sed 's|/musl||g' -} - -# Get Cereus main mirror in use and adapt it to use x86_64 instead of x86_64-musl - - function get_cereus_repo { - if [ ! -d "/etc/xbps.d/10-cereus-extra.conf" ]; then - cereus_extra="/usr/share/xbps.d/10-cereus-extra.conf" - else - cereus_extra="/etc/xbps.d/10-cereus-extra.conf" - fi - - cat $cereus_extra | cut -d"=" -f2 | sed 's|x86_64-musl|x86_64|g' -} - -# Create the base glibc container - function create_container { - XBPS_ARCH=x86_64 xbps-install --repository=$(get_target_repo) -r /glibc -Sy base-voidstrap -} - -# Checks if /glibc container path exists, and if it has installed the base-voidstrap package. -# Otherwise, it will create the path and configure the container. - - if [ ! -d "/glibc" ]; then - echo "==> Creating container path -" - mkdir -p /glibc/${repokeys_dir} - echo "==>Copying repositories keys... -" - cp ${repokeys_dir}/*.plist /glibc/${repokeys_dir}/ - echo "==> Creating glibc container, this will take a bit... -" - create_container - else - checkstrap - if [ $strapinstalled = 0 ]; then - echo "==> Copying repositories keys... -" - mkdir -p /glibc/${repokeys_dir} - cp ${repokeys_dir}/*.plist /glibc/${repokeys_dir}/ - echo "==> Creating glibc container, this will take a bit... -" - create_container - fi - fi - -# Install voidnsundo in container and add cereus-extra repository -echo "==> Configuring extra repository and voidnsundo -" -voidnsrun -r /glibc xbps-install -Syfv --repository=$(get_cereus_repo) voidnsundo cereus-repo-extra diff --git a/srcpkgs/voidnsrun-setup/template b/srcpkgs/voidnsrun-setup/template index 52395cf..d212fb2 100644 --- a/srcpkgs/voidnsrun-setup/template +++ b/srcpkgs/voidnsrun-setup/template @@ -1,16 +1,20 @@ # Template file for 'voidnsrun-setup' pkgname=voidnsrun-setup -version=2022.08.25 -revision=3 +version=2022.10.20 +revision=1 wrksrc=voidnsrun-setup-main +archs="x86_64-musl x86_64" +hostmakedepends="git" repository="cereus-extra" depends="voidnsrun voidnsundo xtools" short_desc="voidnsrun setup script" maintainer="Kevin F. " license="GPL-3.0" homepage="https://github.com/CereusLinuxProject/voidnsrun-setup" -distfiles="${homepage}/archive/refs/heads/main.zip" -checksum=40873a3734319d3141a389e0fade727f483ca9dc67c3b7d06e93770dcc275fdf + +do_fetch() { + git clone ${homepage} ${wrksrc} +} do_install() { vbin voidnsrun-setup