From 5e94aa477b0cf890e440a678cf6af27824f2a2b5 Mon Sep 17 00:00:00 2001 From: swalker Date: Mon, 5 May 2014 23:10:44 +0000 Subject: [PATCH] [packages] libusbmuxd: add separate libusbmuxd & tools package that was split from usbmuxd [packages] usbmuxd: disable building & packaging the bundled libusbmuxd & tools Signed-off-by: Stephen Walker git-svn-id: svn://svn.openwrt.org/openwrt/packages@40705 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- libs/libusbmuxd/Makefile | 83 ++++++++++++++++++++++ utils/usbmuxd/Makefile | 52 ++------------ .../patches/001-disable_libusbmuxd_tools.patch | 32 +++++++++ 3 files changed, 121 insertions(+), 46 deletions(-) create mode 100644 libs/libusbmuxd/Makefile create mode 100644 utils/usbmuxd/patches/001-disable_libusbmuxd_tools.patch diff --git a/libs/libusbmuxd/Makefile b/libs/libusbmuxd/Makefile new file mode 100644 index 000000000..121597f51 --- /dev/null +++ b/libs/libusbmuxd/Makefile @@ -0,0 +1,83 @@ +# +# Copyright (C) 2012-2014 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:=libusbmuxd +PKG_VERSION:=1.0.9 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://www.libimobiledevice.org/downloads +PKG_MD5SUM:=3f1d4bd0c0a1a4d7bf96219e117ec499 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libusbmuxd/Default + TITLE:=USB multiplexing daemon + URL:=http://www.libimobiledevice.org/ +endef + +define Package/libusbmuxd/Default/description + This daemon is in charge of multiplexing connections over USB to an iPhone or + iPod touch. To users, it means you can sync your music, contacts, photos, etc. + over USB. To developers, it means you can connect to any listening localhost + socket on the device. usbmuxd is not used for tethering data transfer, which + uses a dedicated USB interface as a virtual network device. +endef + +define Package/libusbmuxd + $(call Package/libusbmuxd/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE+= library + DEPENDS:=+libplist +libpthread +libxml2 +zlib +endef + +define Package/libusbmuxd/description + $(call Package/libusbmuxd/Default/description) + This package contains the libusbmuxd shared library. +endef + +define Package/libusbmuxd-utils + $(call Package/libusbmuxd/Default) + SECTION:=utils + CATEGORY:=Utilities + TITLE+= utilies + DEPENDS:=+libusbmuxd +endef + +define Package/libusbmuxd-utils/description + $(call Package/libusbmuxd/Default/description) + This package contains the libusbmuxd utilities. +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusbmuxd.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libusbmuxd.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libusbmuxd/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusbmuxd.so.* $(1)/usr/lib/ +endef + +define Package/libusbmuxd-utils/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/iproxy $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libusbmuxd)) +$(eval $(call BuildPackage,libusbmuxd-utils)) diff --git a/utils/usbmuxd/Makefile b/utils/usbmuxd/Makefile index a4a3143b2..e3a209d05 100644 --- a/utils/usbmuxd/Makefile +++ b/utils/usbmuxd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=usbmuxd PKG_VERSION:=1.0.8 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.libimobiledevice.org/downloads @@ -20,12 +20,15 @@ CMAKE_INSTALL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk -define Package/usbmuxd/Default +define Package/usbmuxd + SECTION:=utils + CATEGORY:=Utilities TITLE:=USB multiplexing daemon URL:=http://www.libimobiledevice.org/ + DEPENDS:=+librt +libusb-1.0 +libusbmuxd endef -define Package/usbmuxd/Default/description +define Package/usbmuxd/description This daemon is in charge of multiplexing connections over USB to an iPhone or iPod touch. To users, it means you can sync your music, contacts, photos, etc. over USB. To developers, it means you can connect to any listening localhost @@ -33,54 +36,11 @@ define Package/usbmuxd/Default/description uses a dedicated USB interface as a virtual network device. endef -define Package/usbmuxd - $(call Package/usbmuxd/Default) - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+librt +libusb-1.0 +libusbmuxd -endef - -define Package/usbmuxd/description - $(call Package/usbmuxd/Default/description) -endef - -define Package/libusbmuxd - $(call Package/usbmuxd/Default) - SECTION:=libs - CATEGORY:=Libraries - TITLE+= library - DEPENDS:=+libplist +libpthread +libxml2 +zlib -endef - -define Package/libusbmuxd/description - $(call Package/usbmuxd/Default/description) - This package contains the usbmuxd shared library. -endef - TARGET_CFLAGS += $(FPIC) -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib$(LIB_SUFFIX)/libusbmuxd.so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib$(LIB_SUFFIX)/pkgconfig/libusbmuxd.pc $(1)/usr/lib/pkgconfig/ - $(SED) 's,lib$(LIB_SUFFIX),lib,g' $(1)/usr/lib/pkgconfig/libusbmuxd.pc - $(SED) 's,\-dirty,$(PKG_VERSION),g' $(1)/usr/lib/pkgconfig/libusbmuxd.pc -endef - define Package/usbmuxd/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/iproxy $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/sbin/usbmuxd $(1)/usr/sbin/ endef -define Package/libusbmuxd/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib$(LIB_SUFFIX)/libusbmuxd.so.* $(1)/usr/lib/ -endef - $(eval $(call BuildPackage,usbmuxd)) -$(eval $(call BuildPackage,libusbmuxd)) diff --git a/utils/usbmuxd/patches/001-disable_libusbmuxd_tools.patch b/utils/usbmuxd/patches/001-disable_libusbmuxd_tools.patch new file mode 100644 index 000000000..9e3657b9a --- /dev/null +++ b/utils/usbmuxd/patches/001-disable_libusbmuxd_tools.patch @@ -0,0 +1,32 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -64,19 +64,12 @@ endif() + + add_definitions(-Wall) + +-add_subdirectory (libusbmuxd) + if (WITH_USBMUXD) + add_subdirectory (daemon) + if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + add_subdirectory (udev) + endif() + endif() +-add_subdirectory (tools) +- +-# pkg-config +-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/libusbmuxd.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd.pc") +-# install pkg-config file +-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd.pc" DESTINATION lib${LIB_SUFFIX}/pkgconfig/) + + # add uninstall target + configure_file("${CMAKE_SOURCE_DIR}/Modules/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) +--- a/daemon/CMakeLists.txt ++++ b/daemon/CMakeLists.txt +@@ -8,7 +8,6 @@ if(HAVE_PLIST) + endif() + include_directories (${CMAKE_SOURCE_DIR}/common) + include_directories (${CMAKE_SOURCE_DIR}/daemon) +-include_directories (${CMAKE_SOURCE_DIR}/libusbmuxd) + + add_definitions(-DUSBMUXD_DAEMON -DUSBMUXD_VERSION="${USBMUXD_VERSION}") + add_executable(usbmuxd main.c usb-linux.c log.c ${CMAKE_SOURCE_DIR}/common/utils.c device.c client.c) -- 2.11.0