libnl-tiny: install a pkg-config file
[openwrt-10.03/.git] / package / libnl-tiny / Makefile
1 #
2 # Copyright (C) 2006-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:=libnl-tiny
11 PKG_VERSION:=0.1
12 PKG_RELEASE:=1
13
14 include $(INCLUDE_DIR)/package.mk
15
16 define Package/libnl-tiny
17   SECTION:=libs
18   CATEGORY:=Libraries
19   TITLE:=netlink socket library
20 endef
21
22 define Package/libnl-tiny/description
23  This package contains a stripped down version of libnl
24 endef
25
26 define Build/Prepare
27         mkdir -p $(PKG_BUILD_DIR)
28         $(CP) ./src/* $(PKG_BUILD_DIR)/
29 endef
30
31 define Build/Compile
32         $(MAKE) -C $(PKG_BUILD_DIR) \
33                 $(TARGET_CONFIGURE_OPTS) \
34                 CFLAGS="$(TARGET_CFLAGS)" \
35                 all
36 endef
37
38 define Build/InstallDev
39         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(1)/usr/include/libnl-tiny
40         $(CP) $(PKG_BUILD_DIR)/include/* $(1)/usr/include/libnl-tiny
41         $(CP) $(PKG_BUILD_DIR)/libnl-tiny.so $(1)/usr/lib/
42         $(CP) ./files/libnl-tiny.pc $(1)/usr/lib/pkgconfig
43 endef
44
45 define Package/libnl-tiny/install
46         $(INSTALL_DIR) $(1)/usr/lib
47         $(CP) $(PKG_BUILD_DIR)/libnl-tiny.so $(1)/usr/lib/
48 endef
49
50 $(eval $(call BuildPackage,libnl-tiny))