2006-09-17 11:11:19 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2006-10-30 13:51:50 +00:00
|
|
|
# $Id$
|
2006-09-17 11:11:19 +00:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libgphoto2
|
|
|
|
PKG_VERSION:=2.2.1
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_SOURCE_URL:=@SF/gphoto
|
|
|
|
PKG_MD5SUM:=69827311733e39fafa9f77bb05e55b77
|
|
|
|
PKG_CAT:=bzcat
|
|
|
|
|
2006-10-03 17:25:17 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
2006-09-17 11:11:19 +00:00
|
|
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2006-10-03 17:25:17 +00:00
|
|
|
|
|
|
|
define Package/libgphoto2/Default
|
2006-09-17 11:11:19 +00:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
URL:=http://www.gphoto.org/
|
2006-10-03 17:25:17 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libgphoto2
|
|
|
|
$(call Package/libgphoto2/Default)
|
2006-10-03 19:26:26 +00:00
|
|
|
DEPENDS:=+libusb +libexif +libjpeg +libpthread +libltdl
|
2006-10-03 17:25:17 +00:00
|
|
|
TITLE:=The basic library of the gphoto2 program.
|
|
|
|
MENU:=1
|
2006-09-17 11:11:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libgphoto2-drivers
|
2006-10-03 17:25:17 +00:00
|
|
|
$(call Package/libgphoto2/Default)
|
2006-09-17 11:11:19 +00:00
|
|
|
DEPENDS:=libgphoto2
|
2006-10-03 17:25:17 +00:00
|
|
|
TITLE:=Gphoto2 drivers for various cameras
|
2006-09-17 11:11:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
2006-10-03 17:25:17 +00:00
|
|
|
$(call Build/Configure/Default, \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
|
|
|
--disable-rpath \
|
|
|
|
--with-drivers=all \
|
|
|
|
--without-included-ltdl \
|
|
|
|
--without-libiconv-prefix \
|
|
|
|
--without-libintl-prefix \
|
|
|
|
, \
|
|
|
|
LIBEXIF_CFLAGS="$$$$CPPFLAGS" \
|
|
|
|
LIBEXIF_LIBS="$$$$LDFLAGS -lexif" \
|
|
|
|
LIBUSB_CFLAGS="$$$$CPPFLAGS" \
|
|
|
|
LIBUSB_LIBS="$$$$LDFLAGS -lusb" \
|
|
|
|
LIBS="-lltdl" \
|
|
|
|
)
|
2006-09-17 11:11:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
2006-10-03 17:25:17 +00:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) -j$(CONFIG_JLEVEL) \
|
2006-09-17 11:11:19 +00:00
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
2006-10-03 17:25:17 +00:00
|
|
|
LIBLTDL="" \
|
|
|
|
all install
|
2006-09-17 11:11:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/bin
|
2006-10-03 17:25:17 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/gphoto2{,-port}-config $(STAGING_DIR)/usr/bin/
|
2006-09-17 11:11:19 +00:00
|
|
|
mkdir -p $(STAGING_DIR)/usr/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/gphoto2 $(STAGING_DIR)/usr/include/
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/lib
|
2006-10-03 17:25:17 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port}.{a,so*} $(STAGING_DIR)/usr/lib/
|
|
|
|
mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgphoto2.pc $(STAGING_DIR)/usr/lib/pkgconfig/
|
|
|
|
$(SED) 's,-I$$$${prefix}/include/gphoto2,,g' $(STAGING_DIR)/usr/bin/gphoto2{,-port}-config
|
|
|
|
$(SED) 's,-I$$$${prefix}/include,,g' $(STAGING_DIR)/usr/bin/gphoto2{,-port}-config
|
|
|
|
$(SED) 's,-L$$$${exec_prefix}/lib,,g' $(STAGING_DIR)/usr/lib/pkgconfig/libgphoto2.pc
|
|
|
|
$(SED) 's,-I$$$${includedir}/gphoto2,,g' $(STAGING_DIR)/usr/lib/pkgconfig/libgphoto2.pc
|
|
|
|
$(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/libgphoto2.pc
|
2006-09-17 11:11:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/UninstallDev
|
2006-12-17 15:09:02 +00:00
|
|
|
rm -rf \
|
|
|
|
$(STAGING_DIR)/usr/bin/gphoto2-config \
|
2006-09-17 11:11:19 +00:00
|
|
|
$(STAGING_DIR)/usr/bin/gphoto2-port-config \
|
|
|
|
$(STAGING_DIR)/usr/include/gphoto2* \
|
|
|
|
$(STAGING_DIR)/usr/lib/libgphoto*.{a,so*}
|
|
|
|
endef
|
|
|
|
|
2006-10-03 17:25:17 +00:00
|
|
|
define Package/libgphoto2/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2006-10-03 17:25:17 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port}.so.* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libgphoto2-drivers/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/
|
2006-10-03 17:25:17 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port} $(1)/usr/lib/
|
|
|
|
rm -rf $(1)/usr/lib/libgphoto2{,_port}/*/*.{,l}a
|
|
|
|
endef
|
|
|
|
|
2006-09-17 11:11:19 +00:00
|
|
|
$(eval $(call BuildPackage,libgphoto2))
|
|
|
|
$(eval $(call BuildPackage,libgphoto2-drivers))
|