treewide: revise library packaging
[openwrt/openwrt.git] / package / libs / libtool / Makefile
1 #
2 # Copyright (C) 2006 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:=libtool
11 PKG_VERSION:=2.4.6
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@GNU/libtool
16 PKG_HASH:=7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f
17
18 PKG_LICENSE:=GPL-2.0+
19 PKG_LICENSE_FILES:=COPYING
20 PKG_CPE_ID:=cpe:/a:gnu:libtool
21
22 PKG_BUILD_PARALLEL:=0
23
24 include $(INCLUDE_DIR)/package.mk
25
26 CONFIGURE_PREFIX=$(STAGING_DIR_HOSTPKG)
27 export GLOBAL_LIBDIR=$(STAGING_DIR)/usr/lib
28
29 define Package/libltdl
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=A generic dynamic object loading library
33 URL:=http://www.gnu.org/software/libtool/
34 ABI_VERSION:=7
35 endef
36
37 define Build/InstallDev
38 $(MAKE) -C $(PKG_BUILD_DIR) \
39 bindir="$(2)/libltdl/bin" \
40 datadir="$(2)/libltdl/share" \
41 prefix="$(2)/libltdl" \
42 exec_prefix="$(2)/libltdl" \
43 install
44 $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include
45 mv $(2)/libltdl/lib/* $(1)/usr/lib/
46 mv $(2)/libltdl/include/* $(1)/usr/include/
47 endef
48
49 define Package/libltdl/install
50 $(INSTALL_DIR) $(1)/usr/lib
51 $(CP) $(PKG_BUILD_DIR)/libltdl/.libs/libltdl.so.* $(1)/usr/lib/
52 endef
53
54 $(eval $(call BuildPackage,libltdl))