Return -ENODEV, when device is absent. This should fix lockups on boot.
[openwrt.git] / package / pwc / Makefile
index b2c281e..e92b98b 100644 (file)
@@ -4,7 +4,7 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
+# $Id$
 
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
@@ -13,21 +13,20 @@ PKG_NAME:=pwc
 PKG_VERSION:=10.0.12-rc1
 PKG_RELEASE:=1
 
 PKG_VERSION:=10.0.12-rc1
 PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.saillard.org/linux/pwc/files/
 PKG_MD5SUM:=8763f3d6fd0f9738ef9854de205a126d
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.saillard.org/linux/pwc/files/
 PKG_MD5SUM:=8763f3d6fd0f9738ef9854de205a126d
-PKG_CAT:=bzcat
 
 include $(INCLUDE_DIR)/package.mk
 
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/kmod-pwc
-  SECTION:=kernel
-  CATEGORY:=Kernel drivers
-  DEPENDS:=@LINUX_2_6
+define KernelPackage/pwc
   TITLE:=USB Philips camera driver
   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 @VIDEO_SUPPORT
   VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
   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
 endef
 
 define Build/Compile
@@ -42,12 +41,4 @@ define Build/Compile
                modules
 endef
 
                modules
 endef
 
-define Package/kmod-pwc/install
-       mkdir -p $(1)/etc/modules.d
-       install -m0644 ./files/pwc.modules $(1)/etc/modules.d/70-pwc
-       install -m0755 -d $(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))
This page took 0.023746 seconds and 4 git commands to generate.