lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (2007B)


      1 #
      2 # Copyright (C) 2015 Jeff Waugh
      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:=kmod
     11 PKG_VERSION:=20
     12 PKG_RELEASE:=1
     13 
     14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
     15 PKG_SOURCE_URL:=https://www.kernel.org/pub/linux/utils/kernel/kmod/
     16 PKG_MD5SUM:=d6f4fef718a50bd88080de6a43bc64d8
     17 PKG_MAINTAINER:=Jeff Waugh <jdub@bethesignal.org>
     18 PKG_LICENSE:=LGPL-2.1+
     19 PKG_LICENSE_FILES:=COPYING
     20 PKG_FIXUP:=autoreconf
     21 
     22 PKG_BUILD_PARALLEL:=1
     23 PKG_INSTALL:=1
     24 
     25 include $(INCLUDE_DIR)/package.mk
     26 
     27 CONFIGURE_ARGS += --with-zlib
     28 
     29 define Package/kmod/Default
     30   SECTION:=utils
     31   CATEGORY:=Utilities
     32   TITLE:=Linux kernel module handling
     33   URL:=https://www.kernel.org/pub/linux/utils/kernel/kmod/
     34   DEPENDS:=+zlib
     35 endef
     36 
     37 
     38 define Package/kmod
     39 $(call Package/kmod/Default)
     40   TITLE+= (tools)
     41 endef
     42 
     43 define Package/kmod/description
     44 Linux kernel module handling
     45  kmod is a set of tools to handle common tasks with Linux kernel modules like
     46  insert, remove, list, check properties, resolve dependencies and aliases.
     47 endef
     48 
     49 LEGACY_BINARIES:= \
     50 	depmod \
     51 	insmod \
     52 	lsmod \
     53 	modinfo \
     54 	modprobe \
     55 	rmmod
     56 
     57 define Package/kmod/install
     58 	$(INSTALL_DIR) $(1)/sbin
     59 	$(CP) $(PKG_INSTALL_DIR)/usr/bin/kmod $(1)/sbin
     60 
     61 	for b in $(LEGACY_BINARIES); do \
     62 		ln -sf kmod $(1)/sbin/$$$$b ; \
     63 	done
     64 endef
     65 
     66 
     67 define Package/libkmod
     68 $(call Package/kmod/Default)
     69   SECTION:=libs
     70   CATEGORY:=Libraries
     71   TITLE+= (library)
     72 endef
     73 
     74 define Package/libkmod/install
     75 	$(INSTALL_DIR) $(1)/usr/lib
     76 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libkmod.so.* $(1)/usr/lib/
     77 endef
     78 
     79 
     80 define Build/InstallDev
     81 	$(INSTALL_DIR) $(1)/usr/include
     82 	$(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr/
     83 
     84 	$(INSTALL_DIR) $(1)/usr/lib
     85 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libkmod.{so*,la} $(1)/usr/lib/
     86 
     87 	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
     88 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libkmod.pc $(1)/usr/lib/pkgconfig/
     89 endef
     90 
     91 
     92 $(eval $(call BuildPackage,kmod))
     93 $(eval $(call BuildPackage,libkmod))