-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
Makefile
81 lines (66 loc) · 2.53 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
include $(TOPDIR)/rules.mk
PKG_NAME:=crun
PKG_VERSION:=1.4.2
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/containers/crun.git
PKG_SOURCE_DATE:=2022-03-02
PKG_SOURCE_VERSION:=c677a1cfc04f24499513a743b828a8d9db6d95ce
PKG_MIRROR_HASH:=7f5084aac03afa7685ea240e8e47551c42cfa40a33e5ced5ef40cb0c3f587fb6
PKG_BUILD_DEPENDS:=argp-standalone
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Package/crun
SECTION:=utils
CATEGORY:=Utilities
TITLE:=crun
URL:=https://github.com/containers/crun
DEPENDS:=@!arc +libseccomp +libcap
endef
define Package/crun/description
A fast and low-memory footprint OCI Container Runtime fully written in C.
endef
CONFIGURE_ARGS+= \
--disable-systemd \
--enable-embedded-yajl \
--enable-caps \
--enable-dl \
--enable-seccomp \
--enable-bpf
define Build/Prepare
$(call Build/Prepare/Default)
$(SED) '/#include <git-version.h>/d' $(PKG_BUILD_DIR)/src/crun.c
endef
define Build/Configure
$(call Build/Configure/Default)
$(SED) '/#define PACKAGE \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define VERSION \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define GIT_VERSION \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_BUGREPORT \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_NAME \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_STRING \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_TARNAME \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_VERSION \"/d' $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define VERSION \"$(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_NAME \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_VERSION \"$(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_STRING \"$(PKG_NAME) $(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_TARNAME \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_BUGREPORT \"bugs@openwrt.org\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define GIT_VERSION \"$(PKG_SOURCE_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
endef
define Package/crun/install
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/crun $(1)/usr/bin/
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrun.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,crun))