diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-08 12:54:21 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-08 12:55:56 +0300 |
commit | 5dd552d949c03059557f3cc3c6f7a320a0bf9e01 (patch) | |
tree | aba85ca9dc5fef85be8c8f7df923313b6600db92 | |
parent | aur: 0.0.2-1 (diff) | |
download | linux-status-5dd552d949c03059557f3cc3c6f7a320a0bf9e01.tar.gz linux-status-5dd552d949c03059557f3cc3c6f7a320a0bf9e01.zip |
aur: add Vagrantfile, Makefile, etc.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 31 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | README.Arch | 19 | ||||
-rw-r--r-- | Vagrantfile | 32 |
6 files changed, 91 insertions, 3 deletions
@@ -1,7 +1,7 @@ pkgbase = linux-status pkgdesc = Simple Linux status web page pkgver = 0.0.2 - pkgrel = 1 + pkgrel = 2 url = https://github.com/egor-tensin/linux-status install = linux-status.install arch = any @@ -1,2 +1,4 @@ *.tar.zst *.tar.gz + +.vagrant/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3ba30d0 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +MAKEFLAGS += --warn-undefined-variables +.DEFAULT_GOAL := all +.DELETE_ON_ERROR: +.SUFFIXES: +SHELL := bash +.SHELLFLAGS := -e -o pipefail -c + +escape = $(subst ','\'',$(1)) + +PKG_NAME := linux-status + +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 @@ -1,7 +1,7 @@ # Maintainer: Egor Tensin <Egor.Tensin@gmail.com> pkgname=linux-status pkgver=0.0.2 -pkgrel=1 +pkgrel=2 pkgdesc='Simple Linux status web page' arch=(any) url='https://github.com/egor-tensin/linux-status' @@ -12,7 +12,11 @@ source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") md5sums=(SKIP) package() { - cd "$srcdir/$pkgname-$pkgver" + cd "$srcdir" + + install -D -m 0644 -t "$pkgdir/usr/share/doc/linux-status" "../README.Arch" + + cd "$pkgname-$pkgver" install -D -m 0644 -t "$pkgdir/usr/share/linux-status" LICENSE.txt 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 |