Files
packages/utils/rtty/Makefile
T
Josef Schlehofer 037a218595 rtty: add missing CONFLICTS between variants
rtty-openssl, rtty-wolfssl, rtty-mbedtls and rtty-nossl install the
same files, for example /usr/sbin/rtty and /etc/config/rtty. They share
PROVIDES:=rtty, so apk refuses to install two of them, but Kconfig lets
them be selected together and the image build then fails.

Pass the conflicts as a third argument of Package/rtty/Default. Each
variant conflicts with the ones listed after it.

Checked with defconfig for each pair of variants: the one that
declares the conflict drops to m and the other stays y.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2026-11-21 23:44:06 +01:00

71 lines
2.2 KiB
Makefile

#
# Copyright (C) 2018 Jianhui Zhao
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=rtty
PKG_VERSION:=9.1.0
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL=https://github.com/zhaojh329/rtty/releases/download/v$(PKG_VERSION)
PKG_HASH:=9ba3deeda738dc35cf43982b384d2342688acbe1cf72d8485bebdd73d232b129
PKG_MAINTAINER:=Jianhui Zhao <zhaojh329@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/rtty/Default
TITLE:=Access your terminals from anywhere via the web
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Terminal
URL:=https://github.com/zhaojh329/rtty
DEPENDS:= +USE_GLIBC:libcrypt-compat +libev +libinih $(2)
VARIANT:=$(1)
PROVIDES:=rtty
CONFLICTS:=$(3)
endef
Package/rtty-openssl=$(call Package/rtty/Default,openssl,+PACKAGE_rtty-openssl:libopenssl,rtty-wolfssl rtty-mbedtls rtty-nossl)
Package/rtty-wolfssl=$(call Package/rtty/Default,wolfssl,+PACKAGE_rtty-wolfssl:libwolfssl,rtty-mbedtls rtty-nossl)
Package/rtty-mbedtls=$(call Package/rtty/Default,mbedtls,+PACKAGE_rtty-mbedtls:libmbedtls +PACKAGE_rtty-mbedtls:zlib,rtty-nossl)
Package/rtty-nossl=$(call Package/rtty/Default,nossl)
define Package/rtty-openssl/conffiles
/etc/config/rtty
endef
Package/rtty-wolfssl/conffiles = $(Package/rtty-openssl/conffiles)
Package/rtty-mbedtls/conffiles = $(Package/rtty-openssl/conffiles)
Package/rtty-nossl/conffiles = $(Package/rtty-openssl/conffiles)
ifeq ($(BUILD_VARIANT),openssl)
CMAKE_OPTIONS += -DUSE_OPENSSL=ON
else ifeq ($(BUILD_VARIANT),wolfssl)
CMAKE_OPTIONS += -DUSE_WOLFSSL=ON
else ifeq ($(BUILD_VARIANT),mbedtls)
CMAKE_OPTIONS += -DUSE_MBEDTLS=ON
else
CMAKE_OPTIONS += -DSSL_SUPPORT=OFF
endif
define Package/rtty-$(BUILD_VARIANT)/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rtty $(1)/usr/sbin
$(INSTALL_BIN) ./files/rtty.init $(1)/etc/init.d/rtty
$(INSTALL_CONF) ./files/rtty.config $(1)/etc/config/rtty
endef
$(eval $(call BuildPackage,rtty-openssl))
$(eval $(call BuildPackage,rtty-wolfssl))
$(eval $(call BuildPackage,rtty-mbedtls))
$(eval $(call BuildPackage,rtty-nossl))