sys-process/tini: add tini ebuild

Even though there's an upstream gentoo ebuild, it depends on cmake
(which had trouble cross-compiling for arm64).

tini is a simple enough program that writing our own makefile for it is
pretty easy, and it'll pay off in reduced buildtime and dependencies for
now since we can avoid dragging in cmake.

Note that we don't bother providing the static useflag and just make it
always static since we're packaging this for docker regardless.
This commit is contained in:
Euan Kemp 2017-04-11 19:40:01 -07:00
parent 36d2613ba5
commit c331540d2a
5 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1 @@
DIST tini-0.13.2.tar.gz 27828 SHA256 85e18a4e4089612821321d1d67c16337797c3c78e81117dea56ad75ece20d05f SHA512 117822bf2e45b7cf732bfcd2aa5ea268a189c395f189c03d0e5dcd982872cff29d50adbb1a4d1b85859db4736e932900cfb64a1c487ba271a305146e9677a1d4 WHIRLPOOL f271b592e5524a2297b5a6b8fb88371a9068f01122e7ea95c4d797d2f5da91847b65675a7b5043398b8c9553746a00e4b5fe5ecfd8a1171d3bba87ee78de9a55

View File

@ -0,0 +1 @@
SUBDIRS = src

View File

@ -0,0 +1,12 @@
AC_INIT([tini], [0.1])
AC_PROG_CC
AM_INIT_AUTOMAKE([])
AC_SUBST(tini_VERSION_MAJOR)
AC_SUBST(tini_VERSION_MINOR)
AC_SUBST(tini_VERSION_PATCH)
AC_SUBST(tini_VERSION_GIT)
AC_CONFIG_FILES([Makefile src/Makefile src/tiniConfig.h tpl/VERSION])
AC_OUTPUT

View File

@ -0,0 +1,4 @@
bin_PROGRAMS = tini
tini_SOURCES = tini.c
tini_CFLAGS = -static

View File

@ -0,0 +1,27 @@
# Copyright 2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools versionator
DESCRIPTION="A tiny but valid init for containers"
HOMEPAGE="https://github.com/krallin/tini"
SRC_URI="https://github.com/krallin/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 arm64"
src_prepare() {
for file in configure.ac Makefile.am src/Makefile.am; do
cp "${FILESDIR}/automake/${file}" "${S}/${file}"
done
eapply_user
export tini_VERSION_MAJOR=$(get_version_component_range 1)
export tini_VERSION_MINOR=$(get_version_component_range 2)
export tini_VERSION_PATCH=$(get_version_component_range 3)
eautoreconf
}