aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO13
-rw-r--r--.gitattributes1
-rw-r--r--.gitignore4
-rw-r--r--Makefile47
-rw-r--r--PKGBUILD35
-rw-r--r--README.Arch19
-rw-r--r--Vagrantfile32
7 files changed, 151 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 0000000..fe4d8d5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = config-links
+ pkgdesc = Config file sharing
+ pkgver = 0.2
+ pkgrel = 1
+ url = https://github.com/egor-tensin/config-links
+ arch = any
+ license = MIT
+ depends = bash
+ source = config-links-0.2.tar.gz::https://github.com/egor-tensin/config-links/archive/v0.2.tar.gz
+ md5sums = SKIP
+
+pkgname = config-links
+
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..176a458
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text=auto
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..caea8af
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.tar.zst
+*.tar.gz
+
+.vagrant/
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8aab8ca
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,47 @@
+MAKEFLAGS += --no-builtin-rules --no-builtin-variables --warn-undefined-variables
+unexport MAKEFLAGS
+.DEFAULT_GOAL := all
+.DELETE_ON_ERROR:
+.SUFFIXES:
+SHELL := bash
+.SHELLFLAGS := -eu -o pipefail -c
+
+.PHONY: DO
+DO:
+
+escape = $(subst ','\'',$(1))
+
+define noexpand
+ifeq ($$(origin $(1)),environment)
+ $(1) := $$(value $(1))
+endif
+ifeq ($$(origin $(1)),environment override)
+ $(1) := $$(value $(1))
+endif
+ifeq ($$(origin $(1)),command line)
+ override $(1) := $$(value $(1))
+endif
+endef
+
+PKG_NAME := config-links
+
+this_dir := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+.PHONY: all
+all: package
+
+.PHONY: package
+package:
+ makepkg --clean --cleanbuild --force --syncdeps && makepkg --printsrcinfo > '$(call escape,$(this_dir))/.SRCINFO'
+
+.PHONY: tag
+tag:
+ source PKGBUILD && git tag "aur/v$$pkgver-$$pkgrel"
+
+.PHONY: push
+push:
+ git push ssh://aur@aur.archlinux.org/linux-status.git "$$( git symbolic-ref HEAD ):master"
+
+.PHONY: clean
+clean:
+ find '$(call escape,$(this_dir))' -type f '-(' -name '*.tar.gz' -o -name '*.tar.zst' '-)' -delete
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..20e0112
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Egor Tensin <Egor.Tensin@gmail.com>
+pkgname=config-links
+pkgver=0.2
+pkgrel=1
+pkgdesc='Config file sharing'
+arch=(any)
+url='https://github.com/egor-tensin/config-links'
+license=(MIT)
+depends=(bash)
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+md5sums=(SKIP)
+
+package() {
+ cd "$srcdir"
+
+ install -D -m 0644 -t "$pkgdir/usr/share/doc/config-links" "../README.Arch"
+
+ cd "$pkgname-$pkgver"
+
+ install -D -m 0644 -t "$pkgdir/usr/share/config-links" LICENSE.txt
+
+ install -D -m 0644 -t "$pkgdir/usr/share/doc/config-links" README.md
+
+ install -D -m 0755 -t "$pkgdir/usr/lib/config-links" update.sh
+ install -D -m 0755 -t "$pkgdir/usr/lib/config-links" unlink.sh
+ install -D -m 0644 -t "$pkgdir/usr/lib/config-links/src" src/common.sh
+ install -D -m 0644 -t "$pkgdir/usr/lib/config-links/src" src/db.sh
+ install -D -m 0644 -t "$pkgdir/usr/lib/config-links/src" src/os.sh
+ install -D -m 0644 -t "$pkgdir/usr/lib/config-links/src" src/path.sh
+ install -D -m 0644 -t "$pkgdir/usr/lib/config-links/src" src/vars.sh
+
+ install -d "$pkgdir/usr/bin"
+ ln -s -- /usr/lib/config-links/update.sh "$pkgdir/usr/bin/links-update"
+ ln -s -- /usr/lib/config-links/unlink.sh "$pkgdir/usr/bin/links-remove"
+}
diff --git a/README.Arch b/README.Arch
new file mode 100644
index 0000000..2d8787c
--- /dev/null
+++ b/README.Arch
@@ -0,0 +1,19 @@
+linux-status on AUR
+===================
+
+There's a Vagrantfile to make maintenance easier. To start, use `vagrant up`,
+then `vagrant ssh`.
+
+There're a bunch of useful one-liners in Makefile.
+
+ * Make the package:
+
+ make package
+
+ * Tag the last commit:
+
+ make tag
+
+ * Push to the AUR repository:
+
+ make push
diff --git a/Vagrantfile b/Vagrantfile
new file mode 100644
index 0000000..e9f3b7a
--- /dev/null
+++ b/Vagrantfile
@@ -0,0 +1,32 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+NAME = 'Egor Tensin'
+EMAIL = 'Egor.Tensin@gmail.com'
+
+Vagrant.configure("2") do |config|
+ config.vm.box = "archlinux/archlinux"
+
+ config.vm.provider "libvirt" do |v|
+ v.cpus = 2
+ v.memory = 4096
+ end
+
+ # Install the required packages:
+ config.vm.provision "shell", inline: <<-SHELL
+#!/usr/bin/env bash
+set -o errexit -o nounset -o pipefail
+pacman --noconfirm -Syu base-devel git
+ SHELL
+
+ # Working with the git repository:
+ config.vm.provision "shell", privileged: false, inline: <<-SHELL
+#!/usr/bin/env bash
+set -o errexit -o nounset -o pipefail
+git config --global user.name '#{NAME}'
+git config --global user.email '#{EMAIL}'
+ SHELL
+ config.ssh.forward_agent = true
+
+ config.vm.provision :reload
+end