[package] Add cwiid package

git-svn-id: svn://svn.openwrt.org/openwrt/packages@21855 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
claudio 2010-06-20 18:06:06 +00:00
parent 2b773b590b
commit 9759a26b21
2 changed files with 147 additions and 0 deletions

78
utils/cwiid/Makefile Normal file
View File

@ -0,0 +1,78 @@
#
# Copyright (C) 2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=cwiid
PKG_VERSION:=0.6.00
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://abstrakraft.org/cwiid/downloads/
PKG_SOURCE_VERSION:=2100f14c612471084434b364501e3818c7f4144e
include $(INCLUDE_DIR)/package.mk
define Package/libcwiid
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+bluez-libs
TITLE:=Linux Nintendo Wiimote interface
URL:=http://abstrakraft.org/cwiid/
endef
define Package/wminput
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libcwiid
TITLE:=Linux Nintendo Wiimote interface
URL:=http://abstrakraft.org/cwiid/
endef
CONFIGURE_ARGS += \
--without-python \
--disable-ldconfig \
--enable-shared \
TARGET_CFLAGS += $(FPIC)
define Build/Prepare
$(call Build/Prepare/Default)
( cd $(PKG_BUILD_DIR) ; \
autoconf ; \
)
endef
define Build/Compile
$(MAKE) -C "$(PKG_BUILD_DIR)" \
CC="$(TARGET_CC)" \
OFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="$(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) -L../libcwiid/" \
all
endef
define Build/InstallDev
mkdir -p $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libcwiid/*.h $(1)/usr/include/
mkdir -p $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/libcwiid/*.so $(1)/usr/lib/
endef
define Package/libcwiid/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libcwiid/libcwiid.so.1.0 $(1)/usr/lib/
endef
define Package/wminput/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/wminput/wminput $(1)/usr/bin/
$(CP) $(PKG_BUILD_DIR)/lswm/lswm $(1)/usr/bin/
endef
$(eval $(call BuildPackage,libcwiid))
$(eval $(call BuildPackage,wminput))

View File

@ -0,0 +1,69 @@
Index: cwiid-0.6.00/Makefile.in
===================================================================
--- cwiid-0.6.00.orig/Makefile.in 2010-06-20 19:32:38.000000000 +0200
+++ cwiid-0.6.00/Makefile.in 2010-06-20 19:32:46.000000000 +0200
@@ -3,7 +3,7 @@
include @top_builddir@/defs.mak
LIB_DIRS = libcwiid
-BIN_DIRS = wmgui wminput lswm
+BIN_DIRS = wminput lswm
DOC_DIRS = man doc
ifdef PYTHON
BIND_DIRS = python
Index: cwiid-0.6.00/configure.ac
===================================================================
--- cwiid-0.6.00.orig/configure.ac 2010-06-20 19:31:22.000000000 +0200
+++ cwiid-0.6.00/configure.ac 2010-06-20 19:31:35.000000000 +0200
@@ -124,11 +124,6 @@
fi
AC_SUBST(LDCONFIG)
-pkg_modules="gtk+-2.0 >= 2.0.0 gthread-2.0"
-PKG_CHECK_MODULES([GTK], [$pkg_modules])
-AC_SUBST(GTK_CFLAGS)
-AC_SUBST(GTK_LIBS)
-
AC_OUTPUT(
[Makefile]
[defs.mak]
Index: cwiid-0.6.00/wminput/Makefile.in
===================================================================
--- cwiid-0.6.00.orig/wminput/Makefile.in 2010-06-20 19:47:06.000000000 +0200
+++ cwiid-0.6.00/wminput/Makefile.in 2010-06-20 19:47:13.000000000 +0200
@@ -14,7 +14,7 @@
-DWMINPUT_CONFIG_DIR=\"$(WMINPUT_CONFIG_DIR)\" \
-DCWIID_PLUGINS_DIR=\"$(CWIID_PLUGINS_DIR)\"
-LDLIBS += -lcwiid -ldl
+LDLIBS += -lcwiid -ldl -lbluetooth
LDFLAGS += -L@top_builddir@/libcwiid -rdynamic
INST_DIR = @bindir@
Index: cwiid-0.6.00/lswm/Makefile.in
===================================================================
--- cwiid-0.6.00.orig/lswm/Makefile.in 2010-06-20 19:50:13.000000000 +0200
+++ cwiid-0.6.00/lswm/Makefile.in 2010-06-20 19:50:22.000000000 +0200
@@ -8,7 +8,7 @@
CFLAGS += -I@top_builddir@/libcwiid
LDFLAGS += -L@top_builddir@/libcwiid
-LDLIBS += -lcwiid
+LDLIBS += -lcwiid -lbluetooth
INST_DIR = @bindir@
include $(COMMON)/include/app.mak
Index: cwiid-0.6.00/Makefile.in
===================================================================
--- cwiid-0.6.00.orig/Makefile.in 2010-06-20 19:53:45.000000000 +0200
+++ cwiid-0.6.00/Makefile.in 2010-06-20 19:53:54.000000000 +0200
@@ -9,7 +9,7 @@
BIND_DIRS = python
endif
-SUB_DIRS = $(LIB_DIRS) $(BIN_DIRS) $(DOC_DIRS) $(BIND_DIRS) wmdemo
+SUB_DIRS = $(LIB_DIRS) $(BIN_DIRS) $(DOC_DIRS) $(BIND_DIRS)
all install clean distclean uninstall: TARGET += $(MAKECMDGOALS)