1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-18 13:23:57 +02:00
openwrt-packages/utils/tini/Makefile
Rosen Penev a31b732007 treewide: build CMake projects with Ninja
faster to compile.

A small selection of packages was tested going from:

Executed in  696.30 secs   fish           external
   usr time   82.98 mins  395.00 micros   82.98 mins
   sys time    9.02 mins    0.00 micros    9.02 mins

to:

Executed in  592.20 secs   fish           external
   usr time   84.84 mins  361.00 micros   84.84 mins
   sys time    8.85 mins   57.00 micros    8.85 mins

Tested by running make -j 12 and wiping staging/build_dir/target_x

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-03-27 21:51:50 -07:00

43 lines
1.1 KiB
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=tini
PKG_VERSION:=0.19.0
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/krallin/tini/tar.gz/v${PKG_VERSION}?
PKG_HASH:=0fd35a7030052acd9f58948d1d900fe1e432ee37103c5561554408bdac6bbf0d
PKG_SOURCE_VERSION:=de40ad007797e0dcd8b7126f27bb87401d224240
TINI_COMMIT:=de40ad0
PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../../devel/ninja/ninja-cmake.mk
define Package/tini
SECTION:=utils
CATEGORY:=Utilities
TITLE:=simplest init utility
URL:=https://github.com/krallin/tini
DEPENDS:=
endef
define Package/tini/description
A tiny but valid init process for containers.
endef
CMAKE_OPTIONS += -DTINI_VERSION_GIT='$(TINI_COMMIT)'
TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lc -lgcc_eh)
define Package/tini/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tini-static $(1)/usr/bin/docker-init
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tini $(1)/usr/bin/
endef
$(eval $(call BuildPackage,tini))