packages: assign PKG_CPE_ID for all missing packages
[openwrt/staging/pepe2k.git] / package / libs / gmp / Makefile
1 #
2 # Copyright (C) 2006-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gmp
11 PKG_VERSION:=6.2.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_REVISION).tar.xz
15 PKG_SOURCE_URL:=@GNU/gmp/
16 PKG_HASH:=fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2
17
18 PKG_BUILD_PARALLEL:=1
19 PKG_INSTALL:=1
20 PKG_FIXUP:=autoreconf
21 PKG_LICENSE:=GPL-2.0-or-later
22 PKG_CPE_ID:=cpe:/a:gmplib:gmp
23
24 PKG_BUILD_FLAGS:=no-mips16
25
26 include $(INCLUDE_DIR)/host-build.mk
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/libgmp
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=GNU multiprecision arithmetic library
33 URL:=http://gmplib.org/
34 ABI_VERSION:=10
35 endef
36
37 define Package/libgmp/description
38 GMP is a free library for arbitrary precision arithmetic, operating on
39 signed integers, rational numbers, and floating point numbers.
40 endef
41
42 TARGET_CFLAGS += $(FPIC)
43 CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
44 CONFIGURE_ARGS += \
45 --enable-shared \
46 --enable-static \
47 --without-readline \
48 --disable-fft \
49
50 define Build/Compile
51 $(call Build/Compile/Default, \
52 DESTDIR="$(PKG_INSTALL_DIR)" \
53 CC="$(TARGET_CC)" \
54 all \
55 )
56 endef
57
58 define Build/InstallDev
59 $(INSTALL_DIR) $(1)/usr/include
60 $(CP) $(PKG_INSTALL_DIR)/usr/include/gmp* $(1)/usr/include/
61 $(INSTALL_DIR) $(1)/usr/lib
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.{a,so*} $(1)/usr/lib/
63 endef
64
65 define Package/libgmp/install
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgmp.so.* $(1)/usr/lib/
68 endef
69
70 $(eval $(call BuildPackage,libgmp))
71 $(eval $(call HostBuild))