Use the KernelPackage template instead of kmod-foo
authorFlorian Fainelli <florian@openwrt.org>
Fri, 5 Jan 2007 15:36:58 +0000 (15:36 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Fri, 5 Jan 2007 15:36:58 +0000 (15:36 +0000)
SVN-Revision: 5995

package/alsa/Makefile
package/fuse/Makefile
package/hostapd/Makefile
package/ipsec-tools/Makefile
package/openswan/Makefile
package/pwc/Makefile
package/zd1211/Makefile

index 320a918414020f0072885c5479f1450a8221db1a..6fb61987545c4875f42e486b48b56978aaeb2c9b 100644 (file)
@@ -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))
index d310e92df220899cde7089c268081701df66250e..66c2455e68d0bad70dc4a313cf877a9ae7d6ea86 100644 (file)
@@ -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))
index 5c4ba22458f28cc417de2d0706416fb8e19afee4..068a04b1e9af34c43b92789eb7e978b644fe0f68 100644 (file)
@@ -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
index feccbbb5eb8fabcfd04e72d298156d9a984eab71..5951649adea3f2abfb26a1a74f7c40e533c5b00f 100644 (file)
@@ -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/
index 4bfda30634607fec341a71b91cc5ee3b6a3f3294..7bb8babaffa4989af008478b2d425092f5db818e 100644 (file)
@@ -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))
index 229fce378d67d8ed9619312adfc9936be4d62206..934d6b76252ff8fc278585567149bb629bf62b34 100644 (file)
@@ -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))
index 841abb90b4d79018165335cc558e60f464e56d5f..9d9e1d4ae986dcc4f9910c7fd861b96cc4add68a 100644 (file)
@@ -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))