From 3224d1149681a87922858ee5b7ecf9e03ce3dfc3 Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Wed, 9 Oct 2019 00:19:53 +0300 Subject: [PATCH] add a PKGBUILD for installing Arch system files --- system/arch/.gitignore | 3 ++ system/arch/PKGBUILD | 28 +++++++++++++++++++ {etc => system/files/etc}/bootmsg | 0 system/files/etc/consolecolors | 1 + .../files/etc}/initcpio/hooks/bootmsg | 0 .../files/etc}/initcpio/hooks/consolecolors | 0 .../files/etc}/initcpio/install/bootmsg | 0 .../files/etc}/initcpio/install/consolecolors | 0 {etc => system/files/etc}/locale.conf | 0 .../files/etc}/sudoers.d/99_dmitmel_dotfiles | 0 10 files changed, 32 insertions(+) create mode 100644 system/arch/.gitignore create mode 100644 system/arch/PKGBUILD rename {etc => system/files/etc}/bootmsg (100%) create mode 120000 system/files/etc/consolecolors rename {etc => system/files/etc}/initcpio/hooks/bootmsg (100%) rename {etc => system/files/etc}/initcpio/hooks/consolecolors (100%) rename {etc => system/files/etc}/initcpio/install/bootmsg (100%) rename {etc => system/files/etc}/initcpio/install/consolecolors (100%) rename {etc => system/files/etc}/locale.conf (100%) rename {etc => system/files/etc}/sudoers.d/99_dmitmel_dotfiles (100%) diff --git a/system/arch/.gitignore b/system/arch/.gitignore new file mode 100644 index 0000000..43d261a --- /dev/null +++ b/system/arch/.gitignore @@ -0,0 +1,3 @@ +pkg +src +*.pkg.tar.xz diff --git a/system/arch/PKGBUILD b/system/arch/PKGBUILD new file mode 100644 index 0000000..ebe243e --- /dev/null +++ b/system/arch/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: Dmytro Meleshko +pkgname=dmitmel-dotfiles +pkgver=0 +pkgrel=1 +pkgdesc="dmitmel's dotfiles" +arch=('any') +url="https://github.com/dmitmel/dotfiles" +license=('MIT') +backup=() + +package() { + cd "$(dirname "${BASH_SOURCE[0]}")/../files" + install -Dm644 ../../LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" + _install_files * +} + +_install_files() { + local path real_path mode; for path in "$@"; do + real_path="$(realpath "$path")" + mode="$(stat --format "%a" "$real_path")" + if [[ -d "$path" ]]; then + install --directory --mode "$mode" "$pkgdir/$path" + _install_files "$path"/* + else + install --mode "$mode" "$real_path" "$pkgdir/$path" + fi + done +} diff --git a/etc/bootmsg b/system/files/etc/bootmsg similarity index 100% rename from etc/bootmsg rename to system/files/etc/bootmsg diff --git a/system/files/etc/consolecolors b/system/files/etc/consolecolors new file mode 120000 index 0000000..88086d3 --- /dev/null +++ b/system/files/etc/consolecolors @@ -0,0 +1 @@ +../../../colorschemes/out/setvtrgb.txt \ No newline at end of file diff --git a/etc/initcpio/hooks/bootmsg b/system/files/etc/initcpio/hooks/bootmsg similarity index 100% rename from etc/initcpio/hooks/bootmsg rename to system/files/etc/initcpio/hooks/bootmsg diff --git a/etc/initcpio/hooks/consolecolors b/system/files/etc/initcpio/hooks/consolecolors similarity index 100% rename from etc/initcpio/hooks/consolecolors rename to system/files/etc/initcpio/hooks/consolecolors diff --git a/etc/initcpio/install/bootmsg b/system/files/etc/initcpio/install/bootmsg similarity index 100% rename from etc/initcpio/install/bootmsg rename to system/files/etc/initcpio/install/bootmsg diff --git a/etc/initcpio/install/consolecolors b/system/files/etc/initcpio/install/consolecolors similarity index 100% rename from etc/initcpio/install/consolecolors rename to system/files/etc/initcpio/install/consolecolors diff --git a/etc/locale.conf b/system/files/etc/locale.conf similarity index 100% rename from etc/locale.conf rename to system/files/etc/locale.conf diff --git a/etc/sudoers.d/99_dmitmel_dotfiles b/system/files/etc/sudoers.d/99_dmitmel_dotfiles similarity index 100% rename from etc/sudoers.d/99_dmitmel_dotfiles rename to system/files/etc/sudoers.d/99_dmitmel_dotfiles