From 31acd332a3ae1fc0681f353490b558b4b293e45b Mon Sep 17 00:00:00 2001 From: langfingaz Date: Thu, 22 Apr 2021 16:02:02 +0200 Subject: [PATCH] separate mirrorlist - improvements --- pkg/de-p1st-pacman-mirrorlist/PKGBUILD | 14 ++++++++------ .../{mirrorlist => de-p1st-mirrorlist} | 0 .../pacman.conf.holoscript | 7 +++++++ pkg/de-p1st-pacman/PKGBUILD | 8 +++----- 4 files changed, 18 insertions(+), 11 deletions(-) rename pkg/de-p1st-pacman-mirrorlist/{mirrorlist => de-p1st-mirrorlist} (100%) create mode 100644 pkg/de-p1st-pacman-mirrorlist/pacman.conf.holoscript diff --git a/pkg/de-p1st-pacman-mirrorlist/PKGBUILD b/pkg/de-p1st-pacman-mirrorlist/PKGBUILD index 7b932a7..a65f9f0 100644 --- a/pkg/de-p1st-pacman-mirrorlist/PKGBUILD +++ b/pkg/de-p1st-pacman-mirrorlist/PKGBUILD @@ -2,22 +2,22 @@ _pkgname=pacman-mirrorlist _reponame=arch-pkg pkgname="de-p1st-$_pkgname" -pkgver=0.0.1 +pkgver=0.0.2 pkgrel=1 pkgdesc="selected Arch Linux mirrors" arch=('any') url="https://git.privacy1st.de/langfingaz/${_reponame}" license=('MIT') groups=() -depends=('pacman') +depends=('pacman' 'holo') makedepends=('git') optdepends=() -provides=('pacman-mirrorlist') -conflicts=('pacman-mirrorlist') +provides=() +conflicts=() replaces=() backup=() options=() -install= +install="${pkgname}.install" changelog= source=("git+${url}.git") noextract=() @@ -26,5 +26,7 @@ sha256sums=('SKIP') package() { cd "${_reponame}/pkg/${pkgname}" - install -Dm0644 mirrorlist "$pkgdir"/etc/pacman.d/mirrorlist + install -Dm0644 de-p1st-mirrorlist "$pkgdir"/etc/pacman.d/de-p1st-mirrorlist + + install -Dm0544 pacman.conf.holoscript "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/pacman.conf.holoscript } diff --git a/pkg/de-p1st-pacman-mirrorlist/mirrorlist b/pkg/de-p1st-pacman-mirrorlist/de-p1st-mirrorlist similarity index 100% rename from pkg/de-p1st-pacman-mirrorlist/mirrorlist rename to pkg/de-p1st-pacman-mirrorlist/de-p1st-mirrorlist diff --git a/pkg/de-p1st-pacman-mirrorlist/pacman.conf.holoscript b/pkg/de-p1st-pacman-mirrorlist/pacman.conf.holoscript new file mode 100644 index 0000000..80bad69 --- /dev/null +++ b/pkg/de-p1st-pacman-mirrorlist/pacman.conf.holoscript @@ -0,0 +1,7 @@ +#!/bin/sh +# stdin: default config +# stdout: modified config + +# replace all occurrences of "mirrorlist" with "de-p1st-mirrorlist" +sed 's|^Include\s*=\s*/etc/pacman.d/mirrorlist$|Include = /etc/pacman.d/de-p1st-mirrorlist|' +sed 's|^#\s*Include\s*=\s*/etc/pacman.d/mirrorlist$|#Include = /etc/pacman.d/de-p1st-mirrorlist|' diff --git a/pkg/de-p1st-pacman/PKGBUILD b/pkg/de-p1st-pacman/PKGBUILD index 8aa36f4..0f728a4 100644 --- a/pkg/de-p1st-pacman/PKGBUILD +++ b/pkg/de-p1st-pacman/PKGBUILD @@ -2,7 +2,7 @@ _pkgname=pacman _reponame=arch-pkg pkgname="de-p1st-$_pkgname" -pkgver=0.0.6 +pkgver=0.0.7 pkgrel=1 pkgdesc="pacman with configuration" arch=('any') @@ -11,7 +11,7 @@ license=('MIT') groups=() depends=('pacman' 'holo') makedepends=('git') -optdepends=() +optdepends=('de-p1st-pacman-mirrorlist') provides=() conflicts=() replaces=() @@ -28,7 +28,5 @@ package() { install -Dm0644 pacman.d/de-p1st "$pkgdir"/etc/pacman.d/de-p1st - #install -Dm0644 pacman.d/mirrorlist "$pkgdir"/usr/share/holo/files/de-p1st-pacman/etc/pacman.d/mirrorlist - - install -Dm0544 pacman.conf.holoscript "$pkgdir"/usr/share/holo/files/de-p1st-pacman/etc/pacman.conf.holoscript + install -Dm0544 pacman.conf.holoscript "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/pacman.conf.holoscript }