newt: fix compile errors caused by using the wrong ar util
[packages.git] / libs / newt / Makefile
1 #
2 # Copyright (C) 2006-2011 OpenWrt.org
3 # Copyright (C) 2011 SMBPhone Inc.
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=newt
12 PKG_VERSION:=0.52.12
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=https://fedorahosted.org/releases/n/e/newt/
17 PKG_MD5SUM:=51b04128d9e1bf000fa769c417b74486
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libnewt
22   URL:=http://fedorahosted.org/newt/
23   SECTION:=libs
24   CATEGORY:=Libraries
25   TITLE:=Not Erik's Windowing Toolkit
26   DEPENDS:= +libslang2 +libpopt
27 endef
28
29 define Package/libnewt/description
30   Programming library for colour text mode widget-based user interfaces,
31   based on S-Lang.
32 endef
33
34 define Package/whiptail
35   URL:=http://fedorahosted.org/newt/
36   SECTION:=utils
37   CATEGORY:=Utilities
38   TITLE:=Dialog boxes from shell scripts
39   DEPENDS:= +libnewt
40 endef
41
42 define Package/whiptail/description
43   A lightweight replacement for the dialog command (dialog boxes from shell
44   scripts), based on libnewt.
45 endef
46
47 TARGET_CFLAGS += $(FPIC) -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib
48
49 CONFIGURE_ARGS += \
50         --disable-nls \
51         --without-tcl \
52         --without-gpm-support
53
54 MAKE_FLAGS += AR="$(TARGET_CROSS)ar"
55
56 define Package/libnewt/install
57         $(INSTALL_DIR) $(1)/usr/lib
58         $(CP) $(PKG_BUILD_DIR)/libnewt.so* $(1)/usr/lib/
59 endef
60
61 define Build/InstallDev
62         $(INSTALL_DIR) $(1)/usr/include
63         $(CP) $(PKG_BUILD_DIR)/newt.h $(1)/usr/include/
64
65         $(INSTALL_DIR) $(1)/usr/lib
66         $(CP) $(PKG_BUILD_DIR)/libnewt.{a,so*} $(1)/usr/lib/
67 endef
68
69 define Package/whiptail/install
70         $(INSTALL_DIR) $(1)/usr/bin
71         $(INSTALL_BIN) $(PKG_BUILD_DIR)/whiptail $(1)/usr/bin/  
72 endef
73
74 $(eval $(call BuildPackage,libnewt))
75 $(eval $(call BuildPackage,whiptail))
76