summaryrefslogtreecommitdiffstats
path: root/libs/newt/Makefile
blob: 79dad887c1fb83c8b9791155a8244768bdc31fb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# Copyright (C) 2006-2011 OpenWrt.org
# Copyright (C) 2011 SMBPhone Inc.
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=newt
PKG_VERSION:=0.52.12
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://fedorahosted.org/releases/n/e/newt/
PKG_MD5SUM:=51b04128d9e1bf000fa769c417b74486

include $(INCLUDE_DIR)/package.mk

define Package/libnewt
  URL:=http://fedorahosted.org/newt/
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=Not Erik's Windowing Toolkit
  DEPENDS:= +libslang2 +libpopt
endef

define Package/libnewt/description
  Programming library for colour text mode widget-based user interfaces,
  based on S-Lang.
endef

define Package/whiptail
  URL:=http://fedorahosted.org/newt/
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=Dialog boxes from shell scripts
  DEPENDS:= +libnewt
endef

define Package/whiptail/description
  A lightweight replacement for the dialog command (dialog boxes from shell
  scripts), based on libnewt.
endef

TARGET_CFLAGS += $(FPIC) -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib

CONFIGURE_ARGS += \
	--disable-nls \
	--without-tcl \
	--without-gpm-support

MAKE_FLAGS += AR="$(TARGET_CROSS)ar"

define Package/libnewt/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_BUILD_DIR)/libnewt.so* $(1)/usr/lib/
endef

define Build/InstallDev
	$(INSTALL_DIR) $(1)/usr/include
	$(CP) $(PKG_BUILD_DIR)/newt.h $(1)/usr/include/

	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_BUILD_DIR)/libnewt.{a,so*} $(1)/usr/lib/
endef

define Package/whiptail/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/whiptail $(1)/usr/bin/	
endef

$(eval $(call BuildPackage,libnewt))
$(eval $(call BuildPackage,whiptail))