2 # Copyright (C) 2006-2011 OpenWrt.org
3 # Copyright (C) 2011 SMBPhone Inc.
4 # Copyright (C) 2019-2020, 2023 Jeffery To
6 # This is free software, licensed under the GNU General Public License v2.
7 # See /LICENSE for more information.
10 include $(TOPDIR
)/rules.mk
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 PKG_SOURCE_URL
:=https
://releases.pagure.org
/newt
18 PKG_HASH
:=5ded7e221f85f642521c49b1826c8de19845aa372baf5d630a51774b544fbdbb
20 PKG_MAINTAINER
:=Jeffery To
<jeffery.to@gmail.com
>
21 PKG_LICENSE
:=LGPL-2.0
-only
22 PKG_LICENSE_FILES
:=COPYING
23 PKG_CPE_ID
:=cpe
:/a
:fedorahosted
:newt
29 include $(INCLUDE_DIR
)/package.mk
30 include $(INCLUDE_DIR
)/nls.mk
31 include ..
/..
/lang
/python
/python3-package.mk
33 define Package
/newt
/Default
35 URL
:=https
://pagure.io
/newt
38 define Package
/newt
/Default
/description
39 Newt is a programming library for color text mode
, widget based user
40 interfaces. Newt can be used to add stacked windows
, entry widgets
,
41 checkboxes
, radio buttons
, labels
, plain text fields
, scrollbars
, etc.
,
42 to text mode user interfaces. Newt is based on the slang library.
45 define Package
/libnewt
46 $(call Package
/newt
/Default
)
50 DEPENDS
:=+libslang2
$(INTL_DEPENDS
)
53 define Package
/libnewt
/description
54 $(call Package
/newt
/Default
/description
)
57 define Package
/whiptail
58 $(call Package
/newt
/Default
)
61 TITLE
:=Display dialog boxes from
shell scripts
62 DEPENDS
:=+libnewt
+libpopt
+libslang2
65 define Package
/whiptail
/description
66 A lightweight replacement for the dialog command
(dialog boxes from
shell
67 scripts
), based on libnewt.
70 define Package
/python3-newt
71 $(call Package
/newt
/Default
)
75 TITLE
+= module for Python
76 DEPENDS
:=+libnewt
+python3-light
79 define Package
/python3-newt
/description
80 $(call Package
/newt
/Default
/description
)
82 This is the Newt module for Python
3.
87 --with-python
=python
$(PYTHON3_VERSION
) \
89 --without-gpm-support \
90 --with-colorsfile
=/etc
/newt
/palette
92 CONFIGURE_VARS
+= $(if
$(CONFIG_BUILD_NLS
),ac_cv_lib_c_gettext
=no
)
94 MAKE_VARS
+= PYTHON_CONFIG_PATH
="$(STAGING_DIR)/host/bin"
96 define Build
/InstallDev
97 $(INSTALL_DIR
) $(1)/usr
/include
98 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/newt.h
$(1)/usr
/include/
100 $(INSTALL_DIR
) $(1)/usr
/lib
101 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnewt.
{a
,so
*} $(1)/usr
/lib
/
103 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
104 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libnewt.
pc $(1)/usr
/lib
/pkgconfig
/
107 define Package
/libnewt
/install
108 $(INSTALL_DIR
) $(1)/usr
/lib
109 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libnewt.so
* $(1)/usr
/lib
/
112 define Package
/whiptail
/install
113 $(INSTALL_DIR
) $(1)/usr
/bin
114 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/whiptail
$(1)/usr
/bin
/
117 # Don't install files from usr/bin
118 Py3Package
/python3-newt
/install:=:
120 $(eval
$(call BuildPackage
,libnewt
))
121 $(eval
$(call BuildPackage
,whiptail
))
123 $(eval
$(call Py3Package
,python3-newt
))
124 $(eval
$(call BuildPackage
,python3-newt
))
125 $(eval
$(call BuildPackage
,python3-newt-src
))