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 \
62 --with-flock-locking \
67 ac_cv_lib_avahi_client_avahi_client_new
=$(if
$(CONFIG_GENSIO_AVAHI
),yes
,no
) \
68 ac_cv_lib_pam_pam_start
=$(if
$(CONFIG_GENSIO_SSHD
),yes
,no
)
70 ifneq ($(CONFIG_PACKAGE_python3-gensio
),)
74 --with-pythoninstall
=$(PYTHON3_PKG_DIR
)
77 PYTHON_LIBS
="$(shell $(STAGING_DIR)/host/bin/$(PYTHON3)-config --ldflags) -l${PYTHON3}" \
78 PYTHON_CPPFLAGS
="$(shell $(STAGING_DIR)/host/bin/$(PYTHON3)-config --includes)" \
79 PYTHON
="$(STAGING_DIR_HOSTPKG)/bin/$(PYTHON3)"
82 PYTHON_LIBS
="$(shell $(STAGING_DIR)/host/bin/$(PYTHON3)-config --ldflags) -l${PYTHON3}"
89 define Package
/gensio
/Default
90 TITLE
:=Abstract stream I
/O
91 URL
:=https
://github.com
/cminyard
/gensio
94 define Package
/gensio
/Default
/description
95 This project
(pronounced gen
'-see-oh) is used to abstract stream I/O
96 like serial port, TCP, telnet, UDP, SSL, IPMI SOL etc and offers a
97 framework for giving a consistent view of various stream (and packet)
98 I/O types. You create a gensio object (or a gensio), and you can use
99 that gensio without having to know too much about what is going on
100 underneath. You can stack gensio on top of another one to add protocol
101 funcionality. For instance, you can create a TCP gensio, stack SSL on
102 top of that, and stack Telnet on top of that. It supports a number of
103 network I/O and serial ports. Gensio can be used for sending and
104 receiving ports, and it also supports establishing encrypted and
105 authenticated connections.
108 define Package/libgensio
109 $(call Package/gensio/Default)
110 TITLE+= (runtime files)
115 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
118 define Package/libgensio/description
119 $(call Package/gensio/Default/description)
121 This package contains the runtime libraries.
124 define Package/libgensio/config
125 source "$(SOURCE)/Config.in"
128 define Package/gensio-bin
129 $(call Package/gensio/Default)
130 TITLE+= (command-line tools)
137 define Package/gensio-bin/description
138 $(call Package/gensio/Default/description)
140 This package contains the command-line tools.
143 define Package/gensio-bin/config
144 source "$(SOURCE)/Config-bin.in"
147 define Package/python3-gensio
148 $(call Package/gensio/Default)
149 TITLE+= (Python bindings)
153 DEPENDS:=+PACKAGE_python3-gensio:python3-light +libgensiocpp
156 define Package/python3-gensio/description
157 $(call Package/gensio/Default/description)
159 This package contains the Python3-bindings for libgensio.
162 define Package/libgensiocpp
163 $(call Package/gensio/Default)
164 TITLE+= (C++ - bindings)
168 DEPENDS:=+libgensio +PACKAGE_libgensiocpp:libstdcpp
171 define Package/libgensiocpp/description
172 $(call Package/gensio/Default/description)
174 This package contains the C++ runtime files.
177 define Build/InstallDev
178 $(INSTALL_DIR) $(1)/usr/include/gensio/
179 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/gensio/* $(1)/usr/include/gensio/
180 $(INSTALL_DIR) $(1)/usr/lib/gensio
181 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
182 $(CP) $(PKG_INSTALL_DIR)/usr/lib/gensio/* $(1)/usr/lib/gensio/
183 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
184 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
185 ifneq ($(CONFIG_PACKAGE_python3-gensio),)
186 $(INSTALL_DIR) $(1)/$(PYTHON3_PKG_DIR)
187 $(CP) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)/*.{so*,a,la} $(1)/$(PYTHON3_PKG_DIR)
188 $(CP) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)/*.py* $(1)/$(PYTHON3_PKG_DIR)
192 define Package/libgensio/install
193 $(INSTALL_DIR) $(1)/usr/lib/gensio
194 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgensio.so.* $(1)/usr/lib/
195 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgensioosh.so.* $(1)/usr/lib/
196 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgensiomdns.so.* $(1)/usr/lib/
197 $(CP) $(PKG_INSTALL_DIR)/usr/lib/gensio/* $(1)/usr/lib/gensio/
198 ifeq ($(CONFIG_GENSIO_GLIB),y)
199 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgensioglib.so.* $(1)/usr/lib/
203 define Package/gensio-bin/install
204 $(INSTALL_DIR) $(1)/usr/bin
205 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
206 ifeq ($(CONFIG_GENSIO_SSHD),y)
207 $(INSTALL_DIR) $(1)/usr/sbin
208 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
212 define Package/python3-gensio/install
213 $(INSTALL_DIR) $(1)/$(PYTHON3_PKG_DIR)
214 $(CP) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)/*.so* $(1)/$(PYTHON3_PKG_DIR)
215 $(CP) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)/*.py* $(1)/$(PYTHON3_PKG_DIR)
217 $(INSTALL_DIR) $(1)/usr/lib
218 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgensio_python_swig.so.* $(1)/usr/lib/
221 define Package/libgensiocpp/install
222 $(INSTALL_DIR) $(1)/usr/lib
223 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgensio*cpp.so.* $(1)/usr/lib/
226 $(eval $(call BuildPackage,libgensio))
227 $(eval $(call BuildPackage,gensio-bin))
228 $(eval $(call BuildPackage,python3-gensio))
229 $(eval $(call BuildPackage,libgensiocpp))