summaryrefslogtreecommitdiffstats
path: root/net/passt/Makefile
blob: b8f67ecc77656a124dadfe75b791ddcd130748b5 (plain)
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
include $(TOPDIR)/rules.mk

PKG_NAME:=passt
PKG_VERSION:=2026.09.25
PKG_REV:=df90211
PKG_REALVERSION:=$(subst .,_,$(PKG_VERSION)).$(PKG_REV)
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_REALVERSION).tar.xz
PKG_SOURCE_URL:=https://passt.top/passt/snapshot
PKG_HASH:=cdf655b5677ce219108cf3df93a55e0ae98a376887be110fe35303ea900d5d68

PKG_MAINTAINER:=Gary Dotzler <geldot@protonmail.com>
PKG_LICENSE:=GPL-2.0-or-later BSD-3-Clause
PKG_LICENSE_FILES:=LICENSES/GPL-2.0-or-later.txt LICENSES/BSD-3-Clause.txt

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REALVERSION)
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk

define Package/passt
  SECTION:=net
  CATEGORY:=Network
  TITLE:=User-mode networking for virtual machines and namespaces
  DEPENDS:=+kmod-tun
  URL:=https://passt.top
endef

define Package/passt/description
  passt provides user-mode networking for virtual machines.
  It also includes pasta for unprivileged network namespaces,
  typically used for rootless container networking.
endef

MAKE_FLAGS += \
	FORTIFY_FLAG= \
	VERSION="$(PKG_REALVERSION)"

# passt's seccomp generator expects a GNU-style target-triplet.
MAKE_FLAGS += TARGET="$(GNU_TARGET_NAME)"

define Build/Compile
	$(call Build/Compile/Default,passt pasta)
endef

define Package/passt/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/passt $(1)/usr/bin/
	$(LN) passt $(1)/usr/bin/pasta
endef

$(eval $(call BuildPackage,passt))