ad767b8eede5b4d4d8ed0e5f33a19152e1392aaa
[openwrt/staging/nbd.git] / package / libs / popt / Makefile
1 #
2 # Copyright (C) 2006-2010 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:=popt
11 PKG_VERSION:=1.19
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://ftp.rpm.org/popt/releases/popt-1.x/
16 PKG_HASH:=c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9
17 PKG_LICENSE:=MIT
18
19 PKG_FIXUP:=autoreconf
20 PKG_REMOVE_FILES:=autogen.sh aclocal.m4
21
22 PKG_INSTALL:=1
23 PKG_BUILD_PARALLEL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 TARGET_CFLAGS += $(FPIC)
28
29 define Package/libpopt
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=A command line option parsing library
33 URL:=https://github.com/rpm-software-management/popt
34 ABI_VERSION:=0
35 endef
36
37 CONFIGURE_ARGS += --enable-shared --enable-static
38
39 define Build/InstallDev
40 $(INSTALL_DIR) $(1)/usr/include
41 $(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(1)/usr/include/
42 $(INSTALL_DIR) $(1)/usr/lib
43 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(1)/usr/lib/
44 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
45 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/popt.pc $(1)/usr/lib/pkgconfig/
46 endef
47
48 define Package/libpopt/install
49 $(INSTALL_DIR) $(1)/usr/lib
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.so.* $(1)/usr/lib/
51 endef
52
53 $(eval $(call BuildPackage,libpopt))
54