2 # Copyright (C) 2022 Nita Vesa (werecatf@outlook.com)
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=@SF
/ser2net
16 PKG_HASH
:=7574fb710ddd6580d53ea44af4ddfc57f28dbcdc646d842f7ed8ccc1235fdf89
18 PKG_LICENSE
:=GPL-2.0
-or-later
19 PKG_LICENSE_FILES
:=COPYING
20 PKG_MAINTAINER
:=Nita Vesa
<werecatf@outlook.com
>
26 PKG_CONFIG_DEPENDS
:= \
30 CONFIG_GENSIO_PTHREADS \
36 PKG_BUILD_DEPENDS
:=PACKAGE_python3-gensio
:swig
/host
38 include $(INCLUDE_DIR
)/package.mk
39 include ..
/..
/lang
/python
/python3-package.mk
42 --$(if
$(CONFIG_GENSIO_AVAHI
),with
,without
)-avahi \
43 --$(if
$(CONFIG_GENSIO_SSL
),with
,without
)-openssl \
44 --$(if
$(CONFIG_GENSIO_SCTP
),with
,without
)-sctp \
45 --$(if
$(CONFIG_GENSIO_WRAP
),with
,without
)-tcp-wrappers \
46 --$(if
$(CONFIG_GENSIO_PTHREADS
),with
,without
)-pthreads \
47 --$(if
$(CONFIG_GENSIO_GLIB
),with
,without
)-glib \
48 --$(if
$(CONFIG_GENSIO_TCL
),with
,without
)-tcl \
60 --with-flock-locking \
65 ac_cv_lib_avahi_client_avahi_client_new
=$(if
$(CONFIG_GENSIO_AVAHI
),yes
,no
) \
66 ac_cv_lib_pam_pam_start
=$(if
$(CONFIG_GENSIO_SSHD
),yes
,no
)
68 ifneq ($(CONFIG_PACKAGE_python3-gensio
),)
72 --with-pythoninstall
=$(PYTHON3_PKG_DIR
)
75 PYTHON_LIBS
="$(shell $(STAGING_DIR)/host/bin/$(PYTHON3)-config --ldflags) -l${PYTHON3}" \
76 PYTHON_CPPFLAGS
="$(shell $(STAGING_DIR)/host/bin/$(PYTHON3)-config --includes)" \
77 PYTHON
="$(STAGING_DIR_HOSTPKG)/bin/$(PYTHON3)"
84 define Package
/gensio
/Default
85 TITLE
:=Abstract stream I
/O
86 URL
:=https
://github.com
/cminyard
/gensio
89 define Package
/gensio
/Default
/description
90 This project
(pronounced gen
'-see-oh) is used to abstract stream I/O
91 like serial port, TCP, telnet, UDP, SSL, IPMI SOL etc and offers a
92 framework for giving a consistent view of various stream (and packet)
93 I/O types. You create a gensio object (or a gensio), and you can use
94 that gensio without having to know too much about what is going on
95 underneath. You can stack gensio on top of another one to add protocol
96 funcionality. For instance, you can create a TCP gensio, stack SSL on
97 top of that, and stack Telnet on top of that. It supports a number of
98 network I/O and serial ports. Gensio can be used for sending and
99 receiving ports, and it also supports establishing encrypted and
100 authenticated connections.
103 define Package/libgensio
104 $(call Package/gensio/Default)
105 TITLE+= (runtime files)
110 DEPENDS:=+GENSIO_SSL:libopenssl +GENSIO_WRAP:libwrap +(IPV6&&GENSIO_SCTP):libsctp +GENSIO_PTHREADS:libpthread +GENSIO_AVAHI:libavahi-client +GENSIO_TCL:tcl +GENSIO_GLIB:glib2 +GENSIO_SSHD:libpam
113 define Package/libgensio/description
114 $(call Package/gensio/Default/description)
116 This package contains the runtime libraries.
119 define Package/libgensio/config
120 source "$(SOURCE)/Config.in"
123 define Package/gensio-bin
124 $(call Package/gensio/Default)
125 TITLE+= (command-line tools)
132 define Package/gensio-bin/description
133 $(call Package/gensio/Default/description)
135 This package contains the command-line tools.
138 define Package/gensio-bin/config
139 source "$(SOURCE)/Config-bin.in"
142 define Package/python3-gensio
143 $(call Package/gensio/Default)
144 TITLE+= (Python bindings)
148 DEPENDS:=+PACKAGE_python3-gensio:python3-light +libgensiocpp
151 define Package/python3-gensio/description
152 $(call Package/gensio/Default/description)
154 This package contains the Python3-bindings for libgensio.
157 define Package/libgensiocpp
158 $(call Package/gensio/Default)
159 TITLE+= (C++ - bindings)
163 DEPENDS:=+libgensio +PACKAGE_libgensiocpp:libstdcpp
166 define Package/libgensiocpp/description
167 $(call Package/gensio/Default/description)
169 This package contains the C++ runtime files.
172 define Build/InstallDev
173 $(INSTALL_DIR) $(1)/usr/include/gensio/
174 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/gensio/* $(1)/usr/include/gensio/
175 $(INSTALL_DIR) $(1)/usr/lib/gensio
176 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
177 $(CP) $(PKG_INSTALL_DIR)/usr/lib/gensio/* $(1)/usr/lib/gensio/
178 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
179 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
180 ifneq ($(CONFIG_PACKAGE_python3-gensio),)
181 $(INSTALL_DIR) $(1)/$(PYTHON3_PKG_DIR)
182 $(CP) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)/*.{so*,a,la} $(1)/$(PYTHON3_PKG_DIR)
183 $(CP) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)/*.py* $(1)/$(PYTHON3_PKG_DIR)
187 define Package/libgensio/install
188 $(INSTALL_DIR) $(1)/usr/lib/gensio
189 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgensio.so.* $(1)/usr/lib/
190 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgensioosh.so.* $(1)/usr/lib/
191 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgensiomdns.so.* $(1)/usr/lib/
192 $(CP) $(PKG_INSTALL_DIR)/usr/lib/gensio/* $(1)/usr/lib/gensio/
193 ifeq ($(CONFIG_GENSIO_GLIB),y)
194 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgensioglib.so.* $(1)/usr/lib/
198 define Package/gensio-bin/install
199 $(INSTALL_DIR) $(1)/usr/bin
200 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
201 ifeq ($(CONFIG_GENSIO_SSHD),y)
202 $(INSTALL_DIR) $(1)/usr/sbin
203 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
207 define Package/python3-gensio/install
208 $(INSTALL_DIR) $(1)/$(PYTHON3_PKG_DIR)
209 $(CP) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)/*.so* $(1)/$(PYTHON3_PKG_DIR)
210 $(CP) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)/*.py* $(1)/$(PYTHON3_PKG_DIR)
212 $(INSTALL_DIR) $(1)/usr/lib
213 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgensio_python_swig.so.* $(1)/usr/lib/
216 define Package/libgensiocpp/install
217 $(INSTALL_DIR) $(1)/usr/lib
218 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgensio*cpp.so.* $(1)/usr/lib/
221 $(eval $(call BuildPackage,libgensio))
222 $(eval $(call BuildPackage,gensio-bin))
223 $(eval $(call BuildPackage,python3-gensio))
224 $(eval $(call BuildPackage,libgensiocpp))