summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam2021-08-11 00:15:31 +0000
committerSam2021-08-11 00:15:31 +0000
commite23f6f130e0e3a33bd9148e0220086e4a0f118d0 (patch)
treeb0b065c3cd6841ccd10cf8c0fc6840ecff8010a8
downloadaur-e23f6f130e0e3a33bd9148e0220086e4a0f118d0.tar.gz
wip
-rw-r--r--.SRCINFO33
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD120
-rw-r--r--mounts.conf2
4 files changed, 160 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5370436d8e6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = containers-common-git
+ pkgdesc = Configuration files and manpages for containers (git)
+ pkgver = 0.43.0_dev.r1264.ga5b706b
+ pkgrel = 1
+ url = https://github.com/containers/common.git
+ arch = any
+ license = Apache
+ makedepends = go-md2man
+ makedepends = git
+ makedepends = libgpgme.so
+ provides = containers-common
+ conflicts = containers-common
+ options = emptydirs
+ backup = etc/containers/containers.conf
+ backup = etc/containers/mounts.conf
+ backup = etc/containers/policy.json
+ backup = etc/containers/registries.conf
+ backup = etc/containers/seccomp.json
+ backup = etc/containers/storage.conf
+ source = git+https://github.com/containers/common.git
+ source = git+https://github.com/containers/image.git
+ source = git+https://github.com/containers/podman.git
+ source = git+https://github.com/containers/skopeo.git
+ source = git+https://github.com/containers/storage.git
+ source = mounts.conf
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = ae96bbb4a2a3e10759b1506754724bff0fa05feaf16958d19c73124e6b3fed45
+
+pkgname = containers-common-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..4c5f8429137
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/*
+!PKGBUILD
+!.SRCINFO
+!.gitignore
+!mounts.conf
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..72a2f37e366
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,120 @@
+# Maintainer: samarthj <dev@samarthj.com>
+
+# shellcheck disable=2034,2148,2154
+
+pkgname=containers-common-git
+_pkgname=containers-common
+_gitpkgname=common
+pkgver=0.43.0_dev.r1264.ga5b706b
+pkgrel=1
+pkgdesc="Configuration files and manpages for containers (git)"
+arch=('any')
+makedepends=('go-md2man' 'git' 'libgpgme.so')
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+_baseurl="https://github.com/containers"
+url="$_baseurl/$_gitpkgname.git"
+license=(Apache)
+backup=(
+ 'etc/containers/containers.conf'
+ 'etc/containers/mounts.conf'
+ 'etc/containers/policy.json'
+ 'etc/containers/registries.conf'
+ 'etc/containers/seccomp.json'
+ 'etc/containers/storage.conf'
+)
+options=('emptydirs')
+source=("git+$url"
+ "git+$_baseurl/image.git"
+ "git+$_baseurl/podman.git"
+ "git+$_baseurl/skopeo.git"
+ "git+$_baseurl/storage.git"
+ 'mounts.conf'
+)
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'ae96bbb4a2a3e10759b1506754724bff0fa05feaf16958d19c73124e6b3fed45')
+
+pkgver() {
+ cd "$srcdir/$_gitpkgname" || exit 1
+ commit=$(printf "r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)")
+ ver=$(grep const version/version.go | sed -re 's|.*"(.*)"$|\1|g')
+ echo "${ver//-/_}.${commit}"
+}
+
+build() {
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+
+ (
+ cd "common" || exit 1
+ make docs
+ )
+ (
+ cd "image" || exit 1
+ make docs
+ )
+ (
+ cd "podman" || exit 1
+ go-md2man -in pkg/hooks/docs/oci-hooks.5.md \
+ -out oci-hooks.5
+ )
+ (
+ cd "storage" || exit 1
+ sed -r 's/(GOMD2MAN = ).*/\1 go-md2man/' -i docs/Makefile
+ make docs
+ )
+}
+
+package() {
+ # directories
+ install -vdm 755 "${pkgdir}/etc/containers/oci/hooks.d/"
+ install -vdm 755 "${pkgdir}/etc/containers/registries.conf.d/"
+ install -vdm 755 "${pkgdir}/usr/share/containers/oci/hooks.d/"
+ install -vdm 755 "${pkgdir}/var/lib/containers/"
+
+ # configs
+ install -vDm 644 mounts.conf -t "${pkgdir}/etc/containers/"
+
+ (
+ cd "common" || exit 1
+ # man pages and configs
+ make install PREFIX="$pkgdir"/usr
+ # copy configs to other locations
+ install -vDm 644 pkg/config/containers.conf -t "${pkgdir}/etc/containers/"
+ install -vDm 644 pkg/seccomp/seccomp.json -t "${pkgdir}/etc/containers/"
+ install -vDm 644 pkg/seccomp/seccomp.json -t "${pkgdir}/usr/share/containers/"
+ # license
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ )
+ (
+ cd "image" || exit 1
+ # configs
+ install -vDm 644 registries.conf -t "${pkgdir}/etc/containers/"
+ # man pages (the makefile has a bug can't use the install target)
+ install -vDm 644 docs/*.5 -t "${pkgdir}/usr/share/man/man5/"
+ )
+ (
+ cd "podman" || exit 1
+ install -vDm 644 ./*.5 -t "${pkgdir}/usr/share/man/man5/"
+ )
+ (
+ cd "skopeo" || exit 1
+ # configs
+ install -vDm 644 default-policy.json "${pkgdir}/etc/containers/policy.json"
+ install -vDm 644 default.yaml -t "${pkgdir}/etc/containers/registries.d/"
+ )
+ (
+ cd "storage" || exit 1
+ # configs
+ install -vDm 644 storage.conf -t "${pkgdir}/etc/containers/"
+ install -vDm 644 storage.conf -t "${pkgdir}/usr/share/containers/"
+ # man pages
+ make install PREFIX="$pkgdir"/usr
+ )
+}
diff --git a/mounts.conf b/mounts.conf
new file mode 100644
index 00000000000..c3ae13c8105
--- /dev/null
+++ b/mounts.conf
@@ -0,0 +1,2 @@
+# Configuration file for default mounts in containers (see man 5
+# containers-mounts.conf for further information)