f4e390bd2273bfb63ccae6d2bcc1c890da681ac1
[packages.git] / libs / liboping / Makefile
1 #
2 # Copyright (C) 2009 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:=liboping
11 PKG_VERSION:=1.3.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://verplant.org/liboping/files
16 PKG_MD5SUM:=f549c6f1f4d1dbef4dc7cc823badc20b
17
18 PKG_FIXUP = libtool
19
20 include $(INCLUDE_DIR)/host-build.mk
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/liboping
24   SECTION:=libs
25   CATEGORY:=Libraries
26   TITLE:=liboping is a C library to generate ICMP echo requests.
27   URL:=http://verplant.org/liboping/
28 endef
29
30
31 TARGET_CFLAGS += $(FPIC)
32
33 CONFIGURE_ARGS += \
34         --without-perl-bindings \
35         --enable-shared \
36         --enable-static
37
38 define Build/Compile
39         $(MAKE) -C $(PKG_BUILD_DIR) \
40                 DESTDIR="$(PKG_INSTALL_DIR)" \
41                 all install
42 endef
43
44 define Build/InstallDev
45         $(INSTALL_DIR) $(1)/usr/include
46         $(CP) $(PKG_INSTALL_DIR)/usr/include/oping.h $(1)/usr/include/
47         $(INSTALL_DIR) $(1)/usr/lib
48         $(CP) $(PKG_INSTALL_DIR)/usr/lib/liboping.{a,so*} $(1)/usr/lib/
49 endef
50
51 define Package/liboping/install 
52         $(INSTALL_DIR) $(1)/usr/lib
53         $(CP) $(PKG_INSTALL_DIR)/usr/lib/liboping.so* $(1)/usr/lib/
54 endef
55
56 $(eval $(call BuildPackage,liboping))