mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-23 01:16:04 +01:00
add de-p1st-hosts
This commit is contained in:
parent
eaf7fb138e
commit
738bc78aee
35
pkg/de-p1st-hosts/.install
Normal file
35
pkg/de-p1st-hosts/.install
Normal file
@ -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
|
||||
}
|
30
pkg/de-p1st-hosts/PKGBUILD
Normal file
30
pkg/de-p1st-hosts/PKGBUILD
Normal file
@ -0,0 +1,30 @@
|
||||
# Maintainer: Daniel Langbein <daniel@systemli.org>
|
||||
_pkgname=hosts
|
||||
_reponame=arch
|
||||
pkgname="de-p1st-$_pkgname"
|
||||
pkgver=0.0.1
|
||||
pkgrel=1
|
||||
pkgdesc="/etc/hosts file"
|
||||
arch=('any')
|
||||
url="https://codeberg.org/privacy1st/${_reponame}"
|
||||
license=('MIT')
|
||||
groups=()
|
||||
depends=('holo')
|
||||
makedepends=('git')
|
||||
optdepends=()
|
||||
provides=()
|
||||
conflicts=()
|
||||
replaces=()
|
||||
backup=()
|
||||
options=()
|
||||
install='.install'
|
||||
changelog=
|
||||
source=("git+${url}.git")
|
||||
noextract=()
|
||||
sha256sums=('SKIP')
|
||||
|
||||
package() {
|
||||
cd "${_reponame}/pkg/${pkgname}"
|
||||
|
||||
install -Dm0544 hosts.holoscript "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/hosts.holoscript
|
||||
}
|
4
pkg/de-p1st-hosts/README.md
Normal file
4
pkg/de-p1st-hosts/README.md
Normal file
@ -0,0 +1,4 @@
|
||||
# /etc/hosts
|
||||
|
||||
If the system has a permanent IP address, it should be used instead of `127.0.1.1`.
|
||||
* Archwiki: [Installation_guide#Network_configuration](https://wiki.archlinux.org/index.php/Installation_guide#Network_configuration)
|
8
pkg/de-p1st-hosts/hosts.holoscript
Normal file
8
pkg/de-p1st-hosts/hosts.holoscript
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# stdin: default config
|
||||
# stdout: modified config
|
||||
|
||||
echo "127.0.0.1 localhost
|
||||
::1 localhost
|
||||
127.0.1.1 ${HOST}.localdomain ${HOST}
|
||||
"
|
@ -162,11 +162,40 @@ function run_pacstrap() {
|
||||
# KERNEL
|
||||
# CPU_VENDOR
|
||||
|
||||
# TODO: intel/amd/none CPU_VENDOR
|
||||
PKGS=()
|
||||
|
||||
case "${KERNEL}" in
|
||||
linux)
|
||||
PKGS+=("${KERNEL}" "${KERNEL}-headers")
|
||||
;;
|
||||
linux-lts)
|
||||
PKGS+=("${KERNEL}" "${KERNEL}-headers")
|
||||
;;
|
||||
*)
|
||||
echo "Not yet implemented!"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${CPU_VENDOR}" in
|
||||
amd)
|
||||
PKGS+=("${CPU_VENDOR}-ucode")
|
||||
;;
|
||||
intel)
|
||||
PKGS+=("${CPU_VENDOR}-ucode")
|
||||
;;
|
||||
none)
|
||||
true
|
||||
;;
|
||||
*)
|
||||
echo "Not yet implemented!"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${BIOS_TYPE}" in
|
||||
uefi)
|
||||
pacstrap /mnt "${KERNEL}" "${KERNEL}-headers" de-p1st-base-efi || return $?
|
||||
PKGS+=('de-p1st-base-efi')
|
||||
;;
|
||||
bios)
|
||||
echo "Not yet implemented"
|
||||
@ -177,6 +206,8 @@ function run_pacstrap() {
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
pacstrap /mnt "${PKGS[@]}" || return $?
|
||||
}
|
||||
|
||||
function run_genfstab() {
|
||||
|
Loading…
Reference in New Issue
Block a user