Merge pull request #998 from mhei/knxd
[feed/packages.git] / utils / kmod / Makefile
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
21 PKG_BUILD_PARALLEL:=1
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 CONFIGURE_ARGS += --with-zlib
27
28 define Package/kmod/Default
29 SECTION:=utils
30 CATEGORY:=Utilities
31 TITLE:=Linux kernel module handling
32 URL:=https://www.kernel.org/pub/linux/utils/kernel/kmod/
33 DEPENDS:=+zlib
34 endef
35
36
37 define Package/kmod
38 $(call Package/kmod/Default)
39 TITLE+= (tools)
40 endef
41
42 define Package/kmod/description
43 Linux kernel module handling
44 kmod is a set of tools to handle common tasks with Linux kernel modules like
45 insert, remove, list, check properties, resolve dependencies and aliases.
46 endef
47
48 LEGACY_BINARIES:= \
49 depmod \
50 insmod \
51 lsmod \
52 modinfo \
53 modprobe \
54 rmmod
55
56 define Package/kmod/install
57 $(INSTALL_DIR) $(1)/sbin
58 $(CP) $(PKG_INSTALL_DIR)/usr/bin/kmod $(1)/sbin
59
60 for b in $(LEGACY_BINARIES); do \
61 ln -sf kmod $(1)/sbin/$$$$b ; \
62 done
63 endef
64
65
66 define Package/libkmod
67 $(call Package/kmod/Default)
68 SECTION:=libs
69 CATEGORY:=Libraries
70 TITLE+= (library)
71 endef
72
73 define Package/libkmod/install
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkmod.so.* $(1)/usr/lib/
76 endef
77
78
79 define Build/InstallDev
80 $(INSTALL_DIR) $(1)/usr/include
81 $(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr/
82
83 $(INSTALL_DIR) $(1)/usr/lib
84 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libkmod.{so*,la} $(1)/usr/lib/
85
86 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libkmod.pc $(1)/usr/lib/pkgconfig/
88 endef
89
90
91 $(eval $(call BuildPackage,kmod))
92 $(eval $(call BuildPackage,libkmod))