Changeset 47037


Ignore:
Timestamp:
2015-09-24T11:08:52+02:00 (2 years ago)
Author:
nbd
Message:

libnl: split libnl into smaller libraries

Some modules may require only libnl-genl, some
libnl-route and fewer would require libnl-nf.

This patch splits the entire libnl package into smaller
more granular libs that can be installed individually as required.

Also added libnl*.so symlinks for convenience.

Signed-off-by: Alexandru Ardelean <ardeleanalex@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/libs/libnl/Makefile

    r43167 r47037  
    1919include $(INCLUDE_DIR)/package.mk 
    2020 
    21 define Package/libnl 
     21define Package/libnl/default 
    2222  SECTION:=libs 
    2323  CATEGORY:=Libraries 
    24   TITLE:=netlink socket library 
    25   DEPENDS:=+libpthread 
    2624  URL:=http://people.suug.ch/~tgr/libnl/ 
    2725endef 
    2826 
     27define Package/libnl-core 
     28$(call Package/libnl/default) 
     29  TITLE:=Core Netlink Library 
     30  DEPENDS:=+libpthread 
     31endef 
     32 
     33define Package/libnl-genl 
     34$(call Package/libnl/default) 
     35  TITLE:=Generic Netlink Library 
     36  DEPENDS:=+libnl-core 
     37endef 
     38 
     39define Package/libnl-route 
     40$(call Package/libnl/default) 
     41  TITLE:=Routing Netlink Library 
     42  DEPENDS:=+libnl-core 
     43endef 
     44 
     45define Package/libnl-nf 
     46$(call Package/libnl/default) 
     47  TITLE:=Netfilter Netlink Library 
     48  DEPENDS:=+libnl-route 
     49endef 
     50 
     51define Package/libnl 
     52$(call Package/libnl/default) 
     53  TITLE:=Full Netlink Library 
     54  DEPENDS:=+libnl-genl +libnl-route +libnl-nf 
     55endef 
     56 
     57define Package/libnl-core/description 
     58 Common code for all netlink libraries 
     59endef 
     60 
     61define Package/libnl-genl/description 
     62 Generic Netlink Library Functions 
     63endef 
     64 
     65define Package/libnl-route/description 
     66 Routing Netlink Library Functions 
     67endef 
     68 
     69define Package/libnl-nf/description 
     70 Netfilter Netlink Library Functions 
     71endef 
     72 
    2973define Package/libnl/description 
    30  This package contains a library for applications dealing with netlink sockets 
     74 Socket handling, connection management, sending and receiving of data, 
     75 message construction and parsing, object caching system, etc. 
    3176endef 
    3277 
     
    4186 
    4287define Build/InstallDev 
    43         $(INSTALL_DIR) $(1) 
    44         $(CP) $(PKG_INSTALL_DIR)/* $(1)/ 
    45         mkdir -p $(1)/usr/include/libnl 
    46         $(CP) $(PKG_BUILD_DIR)/include/linux $(1)/usr/include/libnl/ 
     88        $(INSTALL_DIR) $(1)/usr/include/libnl $(1)/usr/lib/pkgconfig 
     89        $(CP) $(PKG_INSTALL_DIR)/usr/include/libnl3/* $(1)/usr/include/libnl/ 
     90        $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib 
     91        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig 
     92 
     93        # Copy symlinks 
     94        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so $(1)/usr/lib/libnl.so 
     95        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so $(1)/usr/lib/libnl-genl.so 
     96        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so $(1)/usr/lib/libnl-nf.so 
     97        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so $(1)/usr/lib/libnl-route.so 
     98endef 
     99 
     100define Package/libnl-core/install 
     101        $(INSTALL_DIR) $(1)/usr/lib 
     102        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so* $(1)/usr/lib/ 
     103        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so $(1)/usr/lib/libnl.so 
     104endef 
     105 
     106define Package/libnl-genl/install 
     107        $(INSTALL_DIR) $(1)/usr/lib 
     108        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so* $(1)/usr/lib/ 
     109        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so $(1)/usr/lib/libnl-genl.so 
     110endef 
     111 
     112define Package/libnl-route/install 
     113        $(INSTALL_DIR) $(1)/usr/lib 
     114        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so* $(1)/usr/lib/ 
     115        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so $(1)/usr/lib/libnl-route.so 
     116endef 
     117 
     118define Package/libnl-nf/install 
     119        $(INSTALL_DIR) $(1)/usr/lib 
     120        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so* $(1)/usr/lib/ 
     121        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so $(1)/usr/lib/libnl-nf.so 
    47122endef 
    48123 
    49124define Package/libnl/install 
    50         $(INSTALL_DIR) $(1)/usr/lib 
    51         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-route-3.so.* $(1)/usr/lib/ 
    52         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-genl-3.so.* $(1)/usr/lib/ 
    53         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-nf-3.so.* $(1)/usr/lib/ 
    54         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-3.so.* $(1)/usr/lib/ 
     125        : 
    55126endef 
    56127 
     128$(eval $(call BuildPackage,libnl-core)) 
     129$(eval $(call BuildPackage,libnl-genl)) 
     130$(eval $(call BuildPackage,libnl-route)) 
     131$(eval $(call BuildPackage,libnl-nf)) 
    57132$(eval $(call BuildPackage,libnl)) 
Note: See TracChangeset for help on using the changeset viewer.