add packages_10.03.2 in preparation for the 10.03.2 interim release
[10.03/packages.git] / multimedia / qc-usb / Makefile
1
2 # Copyright (C) 2006-2008 OpenWrt.org
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 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=qc-usb
12 PKG_VERSION:=0.6.6
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/qce-ga
17 PKG_MD5SUM:=9eab8fb3a75326d1565d59b0c7256075
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/qc-usb/Default
22   URL:=http://qce-ga.sourceforge.net/
23 endef
24
25 define Package/qc-usb-utils
26 $(call Package/qc-usb/Default)
27   SECTION:=utils
28   CATEGORY:=Utilities
29   TITLE:=Utility programs for the qc-usb kernel module
30 endef
31
32 define Package/qc-usb-utils/description
33  Utilities to tweak parameters of your QuickCam Express or similar webcam. 
34  These programs are completely useless without a qc-usb-modules package.
35 endef
36
37 define KernelPackage/video-quickcam
38 $(call Package/qc-usb/Default)
39   SUBMENU:=Video Support
40   TITLE:=QuickCam Express USB webcam support
41   DEPENDS:=@USB_SUPPORT @LINUX_2_4||LINUX_2_6_25||LINUX_2_6_27||LINUX_2_6_28 +kmod-usb-core +kmod-video-core
42   FILES:=$(PKG_BUILD_DIR)/quickcam.$(LINUX_KMOD_SUFFIX)
43   AUTOLOAD:=$(call AutoLoad,90,quickcam)
44 endef
45
46 define KernelPackage/video-quickcam/description
47  Kernel support for Logitech's QuickCam Express webcam and other webcams 
48  with similar chipsets.
49 endef
50
51 ifeq ($(KERNEL),2.4)
52   ifeq ($(LINUX_KARCH),i386)
53     KERNEL_C_OPTS:= -Os -mpreferred-stack-boundary=2 -march=i486 -fno-unit-at-a-time
54   endif
55   ifeq ($(LINUX_KARCH),mips)
56     KERNEL_C_OPTS:= -Os -G 0 -mlong-calls -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap
57   endif
58 endif
59
60 ifneq ($(CONFIG_PACKAGE_kmod-video-quickcam),)
61   define Build/Compile/kmod
62         $(MAKE) -C $(PKG_BUILD_DIR) \
63                 LINUX_DIR="$(LINUX_DIR)" \
64                 ARCH="$(LINUX_KARCH)" \
65                 CROSS_COMPILE="$(TARGET_CROSS)" \
66                 CC="$(TARGET_CC)" \
67                 LD="$(TARGET_CC) -nodefaultlibs -nostartfiles" \
68                 USER_OPT="$(KERNEL_C_OPTS)" \
69                 quickcam.$(LINUX_KMOD_SUFFIX)
70   endef
71 endif
72
73 define Build/Compile/user
74         $(MAKE) -C $(PKG_BUILD_DIR) \
75                 CC="$(TARGET_CC)" \
76                 CFLAGS="$(TARGET_CFLAGS)" \
77                 qcset
78 endef
79
80 define Build/Compile
81         $(call Build/Compile/kmod)
82         $(call Build/Compile/user)
83 endef
84
85 define Package/qc-usb-utils/install
86         $(INSTALL_DIR) $(1)/usr/bin
87         $(INSTALL_BIN) $(PKG_BUILD_DIR)/qcset $(1)/usr/bin/
88 endef
89
90 $(eval $(call BuildPackage,qc-usb-utils))
91 $(eval $(call KernelPackage,video-quickcam))