summaryrefslogtreecommitdiffstats
path: root/utils/bc/Makefile
blob: 202810a1863b85465ce5758151eaedf1f9fa36b9 (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
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=bc
PKG_VERSION:=1.08.2
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/bc
PKG_HASH:=ae470fec429775653e042015edc928d07c8c3b2fc59765172a330d3d87785f86

PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:gnu:bc

include $(INCLUDE_DIR)/package.mk

define Package/bc/Default
  SECTION:=utils
  CATEGORY:=Utilities
  URL:=https://www.gnu.org/software/bc/
endef

define Package/bc
  $(call Package/bc/Default)
  TITLE:=Arbitrary precision calculator language
  DEPENDS:=+libreadline +libncurses
endef

define Package/bc/description
 bc is a language that supports arbitrary precision numbers with
 interactive execution of statements.
endef

define Package/dc
  $(call Package/bc/Default)
  TITLE:=Arbitrary precision reverse-polish calculator
  DEPENDS:=bc
endef

define Package/dc/description
 dc is a reverse-polish desk calculator which supports unlimited
 precision arithmetic.
endef

CONFIGURE_ARGS += --with-readline

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

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

$(eval $(call BuildPackage,bc))
$(eval $(call BuildPackage,dc))