From 76b24f64fa5dea1d2dacf5283305dee8d29ded44 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Fri, 5 Jan 2007 15:36:58 +0000 Subject: [PATCH] Use the KernelPackage template instead of kmod-foo SVN-Revision: 5995 --- package/alsa/Makefile | 20 ++++++-------------- package/fuse/Makefile | 18 ++++-------------- package/hostapd/Makefile | 2 +- package/ipsec-tools/Makefile | 2 +- package/openswan/Makefile | 14 ++++---------- package/pwc/Makefile | 21 +++++++-------------- package/zd1211/Makefile | 23 ++++++++++++++--------- 7 files changed, 37 insertions(+), 63 deletions(-) diff --git a/package/alsa/Makefile b/package/alsa/Makefile index 320a9184140..6fb61987545 100644 --- a/package/alsa/Makefile +++ b/package/alsa/Makefile @@ -22,13 +22,13 @@ PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk -define Package/kmod-alsa - SECTION:=kernel - CATEGORY:=Kernel drivers +define KernelPackage/alsa + SUBMENU:=Other modules DEPENDS:=@USB_SUPPORT TITLE:=Advanced Linux Sound Architecture - URL:=http://alsa-project.org/ - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + DESCRIPTION:= + FILES:=$(PKG_BUILD_DIR)/modules/*.$(LINUX_KMOD_SUFFIX) + AUTOLOAD=$(call AutoLoad,70,$(shell cat ./files/alsa.modules)) endef ifeq ($(KERNEL),2.4) @@ -71,12 +71,4 @@ define Build/Compile all endef -define Package/kmod-alsa/install - $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION) - $(INSTALL_DATA) $(PKG_BUILD_DIR)/modules/*.$(LINUX_KMOD_SUFFIX) \ - $(1)/lib/modules/$(LINUX_VERSION)/ - $(INSTALL_DIR) $(1)/etc/modules.d - $(INSTALL_DATA) ./files/alsa.modules $(1)/etc/modules.d/70-alsa -endef - -$(eval $(call BuildPackage,kmod-alsa)) +$(eval $(call KernelPackage,alsa)) diff --git a/package/fuse/Makefile b/package/fuse/Makefile index d310e92df22..66c2455e68d 100644 --- a/package/fuse/Makefile +++ b/package/fuse/Makefile @@ -41,15 +41,15 @@ define Package/fuse-utils This package contains the FUSE utilities. endef -define Package/kmod-fuse +define KernelPackage/fuse + SUBMENU:=Filesystems $(call Package/fuse/Default) - SECTION:=kernel - CATEGORY:=Kernel drivers TITLE+= (kernel module) DESCRIPTION+=\\\ \\\ This package contains the FUSE kernel module. VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + FILES:=$(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX) endef define Package/libfuse @@ -134,21 +134,11 @@ define Package/fuse-utils/install $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/ endef -define Package/kmod-fuse/install - $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX) \ - $(1)/lib/modules/$(LINUX_VERSION)/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/fusermount $(1)/usr/bin/ -endef - define Package/libfuse/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.so.* $(1)/usr/lib/ endef $(eval $(call BuildPackage,fuse-utils)) -$(eval $(call BuildPackage,kmod-fuse)) $(eval $(call BuildPackage,libfuse)) +$(eval $(call KernelPackage,fuse)) diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile index 5c4ba22458f..068a04b1e9a 100644 --- a/package/hostapd/Makefile +++ b/package/hostapd/Makefile @@ -85,7 +85,7 @@ define Package/InstallTemplate $(MAKE) $(PKG_BUILD_DIR)/.built; \ fi $(INSTALL_DIR) $$(1)/etc - install -m0600 $(PKG_BUILD_DIR)_$(2)/madwifi.conf $$(1)/etc/hostapd.conf + $(INSTALL_CONF $(PKG_BUILD_DIR)_$(2)/madwifi.conf $$(1)/etc/hostapd.conf $(INSTALL_DIR) $$(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)_$(2)/hostapd $$(1)/usr/sbin/ endef diff --git a/package/ipsec-tools/Makefile b/package/ipsec-tools/Makefile index feccbbb5eb8..5951649adea 100644 --- a/package/ipsec-tools/Makefile +++ b/package/ipsec-tools/Makefile @@ -62,7 +62,7 @@ endef define Package/ipsec-tools/install $(INSTALL_DIR) $(1)/etc - install -m0600 $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(1)/etc/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/racoon/samples/racoon.conf $(1)/etc/ $(INSTALL_DIR) $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libipsec.so.* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libracoon.so.* $(1)/usr/lib/ diff --git a/package/openswan/Makefile b/package/openswan/Makefile index 4bfda306346..7bb8babaffa 100644 --- a/package/openswan/Makefile +++ b/package/openswan/Makefile @@ -42,15 +42,15 @@ define Package/openswan URL:=http://www.openswan.org/ endef -define Package/kmod-openswan +define KernelPackage/openswan + SUBMENU:=Network Support $(call Package/openswan/Default) - SECTION:=kernel - CATEGORY:=Kernel drivers TITLE+= (kernel module) DESCRIPTION+=\\\ \\\ This package contains the Openswan kernel module. VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + FILES:=$(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX) endef PKG_MAKE_OPTS:= \ @@ -82,11 +82,5 @@ define Package/openswan/install find $(1) -name \*.old | xargs rm -rf endef -define Package/kmod-openswan/install - mkdir -p $(1)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_BUILD_DIR)/modobj*/ipsec.$(LINUX_KMOD_SUFFIX) \ - $(1)/lib/modules/$(LINUX_VERSION)/ -endef - $(eval $(call BuildPackage,openswan)) -$(eval $(call BuildPackage,kmod-openswan)) +$(eval $(call KernelPackage,openswan)) diff --git a/package/pwc/Makefile b/package/pwc/Makefile index 229fce378d6..934d6b76252 100644 --- a/package/pwc/Makefile +++ b/package/pwc/Makefile @@ -21,13 +21,14 @@ PKG_CAT:=bzcat include $(INCLUDE_DIR)/package.mk -define Package/kmod-pwc - SECTION:=kernel - CATEGORY:=Kernel drivers - DEPENDS:=@BROKEN @LINUX_2_6 +define KernelPackage/pwc TITLE:=USB Philips camera driver - URL:=http://www.saillard.org/linux/pwc/ + DESCRIPTION:=Kernel support for USB Philips camera + SUBMENU:=USB Support + DEPENDS:=@BROKEN @LINUX_2_6 VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + FILES:=$(PKG_BUILD_DIR)/pwc.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,70,$(shell cat ./files/pwc.modules)) endef define Build/Compile @@ -42,12 +43,4 @@ define Build/Compile modules endef -define Package/kmod-pwc/install - mkdir -p $(1)/etc/modules.d - $(INSTALL_DATA) ./files/pwc.modules $(1)/etc/modules.d/70-pwc - $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_BUILD_DIR)/pwc.$(LINUX_KMOD_SUFFIX) \ - $(1)/lib/modules/$(LINUX_VERSION)/ -endef - -$(eval $(call BuildPackage,kmod-pwc)) +$(eval $(call KernelPackage,pwc)) diff --git a/package/zd1211/Makefile b/package/zd1211/Makefile index 841abb90b4d..9d9e1d4ae98 100644 --- a/package/zd1211/Makefile +++ b/package/zd1211/Makefile @@ -23,9 +23,8 @@ PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-driver-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk #FIXME: add proper dependency handling on kmod-usb-core packages -define Package/kmod-zd1211 - SECTION:=kernel - CATEGORY:=Kernel drivers +define KernelPackage/zd1211 + SUBMENU:=Wireless Drivers DEPENDS:=@LINUX_2_6&&!LINUX_2_6_UML TITLE:=Driver for Zydas 1211 based USB devices DESCRIPTION:=\ @@ -33,8 +32,16 @@ define Package/kmod-zd1211 USB-WLAN-Chip.\\\ Initially contributed by ZyDAS, this driver is actively maintained by the \\\ open source community. - URL:=http://zd1211.ath.cx/ VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) + FILES:=$(PKG_BUILD_DIR)/zd1211.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,60,zd1211) +endef + +define Package/zd1211-utils + SECTION:=utils + CATEGORY:=Utilities + TITLE:=zd1211 user-space utilities + DESCRIPTION:=zd1211 user-space utilities : apdbg, zd1211-sta endef define Build/Compile @@ -51,13 +58,11 @@ define Build/Compile $(TARGET_CC) $(PKG_BUILD_DIR)/apdbg.c -o $(PKG_BUILD_DIR)/apdbg endef -define Package/kmod-zd1211/install - $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION) - $(CP) $(PKG_BUILD_DIR)/zd1211.$(LINUX_KMOD_SUFFIX) \ - $(1)/lib/modules/$(LINUX_VERSION)/ +define Package/zd1211-utils/install $(INSTALL_DIR) $(1)/usr/sbin $(CP) $(PKG_BUILD_DIR)/apdbg $(1)/usr/sbin/ $(CP) $(PKG_BUILD_DIR)/sta $(1)/usr/sbin/$(PKG_NAME)-sta endef -$(eval $(call BuildPackage,kmod-zd1211)) +$(eval $(call Package,zd1211-utils)) +$(eval $(call KernelPackage,zd1211))