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