From b48f42f55af2d71a056375f6036c6889974c757c Mon Sep 17 00:00:00 2001 From: langfingaz Date: Thu, 22 Apr 2021 13:24:47 +0200 Subject: [PATCH] add pacman (mirrorlist and custom repo) --- pkg/de-p1st-pacman/PKGBUILD | 34 ++++++++++++++++++++++ pkg/de-p1st-pacman/de-p1st-pacman.install | 35 +++++++++++++++++++++++ pkg/de-p1st-pacman/pacman.conf.holoscript | 5 ++++ pkg/de-p1st-pacman/pacman.d/de-p1st | 5 ++++ pkg/de-p1st-pacman/pacman.d/mirrorlist | 6 ++++ prototype/proto-holo.install | 35 +++++++++++++++++++++++ prototype/proto.install | 35 +++++++++++++++++++++++ 7 files changed, 155 insertions(+) create mode 100644 pkg/de-p1st-pacman/PKGBUILD create mode 100644 pkg/de-p1st-pacman/de-p1st-pacman.install create mode 100644 pkg/de-p1st-pacman/pacman.conf.holoscript create mode 100644 pkg/de-p1st-pacman/pacman.d/de-p1st create mode 100644 pkg/de-p1st-pacman/pacman.d/mirrorlist create mode 100644 prototype/proto-holo.install create mode 100644 prototype/proto.install diff --git a/pkg/de-p1st-pacman/PKGBUILD b/pkg/de-p1st-pacman/PKGBUILD new file mode 100644 index 0000000..c3053e7 --- /dev/null +++ b/pkg/de-p1st-pacman/PKGBUILD @@ -0,0 +1,34 @@ +# Maintainer: Daniel Langbein +_pkgname=pacman +_reponame=arch-pkg +pkgname="de-p1st-$_pkgname" +pkgver=0.0.1 +pkgrel=1 +pkgdesc="pacman with configuration" +arch=('any') +url="https://git.privacy1st.de/langfingaz/${_reponame}" +license=('MIT') +groups=() +depends=('pacman' 'holo') +makedepends=() +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install="${pkgname}.install" +changelog= +source=("git+${url}.git") +noextract=() +sha256sums=('SKIP') + +package() { + cd "${_reponame}/pkg/${pkgname}" + + 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 -Dm0644 pacman.conf.holoscript "$pkgdir"/usr/share/holo/files/de-p1st-pacman/etc/pacman.conf.holoscript +} diff --git a/pkg/de-p1st-pacman/de-p1st-pacman.install b/pkg/de-p1st-pacman/de-p1st-pacman.install new file mode 100644 index 0000000..8ef8a94 --- /dev/null +++ b/pkg/de-p1st-pacman/de-p1st-pacman.install @@ -0,0 +1,35 @@ +# This is a default template for a post-install scriptlet. +# Uncomment only required functions and remove any functions +# you don't need (and this header). + +## arg 1: the new package version +#pre_install() { + # do something here +#} + +## arg 1: the new package version +post_install() { + holo apply +} + +## arg 1: the new package version +## arg 2: the old package version +#pre_upgrade() { + # do something here +#} + +## arg 1: the new package version +## arg 2: the old package version +post_upgrade() { + holo apply +} + +## arg 1: the old package version +#pre_remove() { + # do something here +#} + +## arg 1: the old package version +post_remove() { + holo apply +} diff --git a/pkg/de-p1st-pacman/pacman.conf.holoscript b/pkg/de-p1st-pacman/pacman.conf.holoscript new file mode 100644 index 0000000..219924a --- /dev/null +++ b/pkg/de-p1st-pacman/pacman.conf.holoscript @@ -0,0 +1,5 @@ +#!/bin/sh +# stdin: default config +# stdout: modified config +cat +Include = /etc/pacman.d/de-p1st diff --git a/pkg/de-p1st-pacman/pacman.d/de-p1st b/pkg/de-p1st-pacman/pacman.d/de-p1st new file mode 100644 index 0000000..876ea14 --- /dev/null +++ b/pkg/de-p1st-pacman/pacman.d/de-p1st @@ -0,0 +1,5 @@ +# in /etc/pacman.conf -> Include = /path/to/this/cfg/file + +[de-p1st] +SigLevel = Optional TrustAll +Server = https://arch.p1st.de diff --git a/pkg/de-p1st-pacman/pacman.d/mirrorlist b/pkg/de-p1st-pacman/pacman.d/mirrorlist new file mode 100644 index 0000000..64185d8 --- /dev/null +++ b/pkg/de-p1st-pacman/pacman.d/mirrorlist @@ -0,0 +1,6 @@ +## +## Arch Linux repository mirrorlist +## + +Server = https://ftp.fau.de/archlinux/$repo/os/$arch +Server = https://mirror.chaoticum.net/arch/$repo/os/$arch diff --git a/prototype/proto-holo.install b/prototype/proto-holo.install new file mode 100644 index 0000000..8ef8a94 --- /dev/null +++ b/prototype/proto-holo.install @@ -0,0 +1,35 @@ +# This is a default template for a post-install scriptlet. +# Uncomment only required functions and remove any functions +# you don't need (and this header). + +## arg 1: the new package version +#pre_install() { + # do something here +#} + +## arg 1: the new package version +post_install() { + holo apply +} + +## arg 1: the new package version +## arg 2: the old package version +#pre_upgrade() { + # do something here +#} + +## arg 1: the new package version +## arg 2: the old package version +post_upgrade() { + holo apply +} + +## arg 1: the old package version +#pre_remove() { + # do something here +#} + +## arg 1: the old package version +post_remove() { + holo apply +} diff --git a/prototype/proto.install b/prototype/proto.install new file mode 100644 index 0000000..388765e --- /dev/null +++ b/prototype/proto.install @@ -0,0 +1,35 @@ +# This is a default template for a post-install scriptlet. +# Uncomment only required functions and remove any functions +# you don't need (and this header). + +## arg 1: the new package version +#pre_install() { + # do something here +#} + +## arg 1: the new package version +#post_install() { + # do something here +#} + +## arg 1: the new package version +## arg 2: the old package version +#pre_upgrade() { + # do something here +#} + +## arg 1: the new package version +## arg 2: the old package version +#post_upgrade() { + # do something here +#} + +## arg 1: the old package version +#pre_remove() { + # do something here +#} + +## arg 1: the old package version +#post_remove() { + # do something here +#} \ No newline at end of file