rtty: clean the source code
[feed/packages.git] / utils / rtty / Makefile
1 #
2 # Copyright (C) 2018 Jianhui Zhao
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=rtty
11 PKG_VERSION:=7.1.1
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL=https://github.com/zhaojh329/rtty/releases/download/v$(PKG_VERSION)
16 PKG_HASH:=72ff1b7abd8e6c7f395a024125135d69ca2a24aa0dbdc3e974a0bc7adb477214
17 CMAKE_INSTALL:=1
18
19 PKG_LICENSE:=MIT
20 PKG_LICENSE_FILES:=LICENSE
21
22 PKG_MAINTAINER:=Jianhui Zhao <zhaojh329@gmail.com>
23
24 include $(INCLUDE_DIR)/package.mk
25 include $(INCLUDE_DIR)/cmake.mk
26
27 define Package/rtty/Default
28 TITLE:=Access your terminals from anywhere via the web
29 SECTION:=utils
30 CATEGORY:=Utilities
31 SUBMENU:=Terminal
32 URL:=https://github.com/zhaojh329/rtty
33 DEPENDS:=+libev $(2)
34 VARIANT:=$(1)
35 PROVIDES:=rtty
36 endef
37
38 Package/rtty-openssl=$(call Package/rtty/Default,openssl,+PACKAGE_rtty-openssl:libopenssl)
39 Package/rtty-wolfssl=$(call Package/rtty/Default,wolfssl,+PACKAGE_rtty-wolfssl:libwolfssl)
40 Package/rtty-mbedtls=$(call Package/rtty/Default,mbedtls,+PACKAGE_rtty-mbedtls:libmbedtls)
41 Package/rtty-nossl=$(call Package/rtty/Default,nossl)
42
43 ifeq ($(BUILD_VARIANT),openssl)
44 CMAKE_OPTIONS += -DRTTY_USE_OPENSSL=ON
45 else ifeq ($(BUILD_VARIANT),wolfssl)
46 CMAKE_OPTIONS += -DRTTY_USE_WOLFSSL=ON
47 else ifeq ($(BUILD_VARIANT),mbedtls)
48 CMAKE_OPTIONS += -DRTTY_USE_MBEDTLS=ON
49 else
50 CMAKE_OPTIONS += -DRTTY_SSL_SUPPORT=OFF
51 endif
52
53 define Package/rtty-$(BUILD_VARIANT)/install
54 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
55 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rtty $(1)/usr/sbin
56 $(INSTALL_BIN) ./files/rtty.init $(1)/etc/init.d/rtty
57 $(INSTALL_CONF) ./files/rtty.config $(1)/etc/config/rtty
58 endef
59
60 $(eval $(call BuildPackage,rtty-openssl))
61 $(eval $(call BuildPackage,rtty-wolfssl))
62 $(eval $(call BuildPackage,rtty-mbedtls))
63 $(eval $(call BuildPackage,rtty-nossl))