2 # Copyright (C) 2006-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=@SF
/gphoto
16 PKG_MD5SUM
:=32b233189e3df7e5e67d2a81163682b8
19 PKG_LIBTOOL_PATHS
:=. libgphoto2_port
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/libgphoto2
/Default
27 URL
:=http
://www.gphoto.org
/
30 define Package
/libgphoto2
31 $(call Package
/libgphoto2
/Default
)
32 DEPENDS
:=+libusb
+libexif
+libjpeg
+libpthread
+libltdl
+libiconv
33 TITLE
:=The basic library of the gphoto2 program.
37 define Package
/libgphoto2-drivers
38 $(call Package
/libgphoto2
/Default
)
40 TITLE
:=Gphoto2 drivers for various cameras
48 --without-included-ltdl \
49 --without-libiconv-prefix \
50 --without-libintl-prefix \
53 CPPFLAGS
="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/lib/libiconv/include" \
54 LDFLAGS
="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
55 LIBEXIF_CFLAGS
="$$$$CPPFLAGS" \
56 LIBEXIF_LIBS
="$$$$LDFLAGS -lexif" \
57 LIBUSB_CFLAGS
="$$$$CPPFLAGS" \
58 LIBUSB_LIBS
="$$$$LDFLAGS -lusb" \
64 TARGET_CFLAGS
+= $(FPIC
)
66 define Build
/InstallDev
67 $(INSTALL_DIR
) $(1)/usr
/bin
68 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/gphoto2
{,-port
}-config
$(1)/usr
/bin
/
69 $(INSTALL_DIR
) $(1)/usr
/include
70 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gphoto2
$(1)/usr
/include/
71 $(INSTALL_DIR
) $(1)/usr
/lib
72 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgphoto2
{,_port
}.
{a
,so
*} $(1)/usr
/lib
/
73 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
74 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libgphoto2.
pc $(1)/usr
/lib
/pkgconfig
/
75 $(SED
) 's,-I$$$${prefix}/include/gphoto2,,g' $(1)/usr
/bin
/gphoto2
{,-port
}-config
76 $(SED
) 's,-I$$$${prefix}/include,,g' $(1)/usr
/bin
/gphoto2
{,-port
}-config
77 # remove annoying recursive symlink
78 rm -f
$(1)/usr
/include/gphoto2
/gphoto2
81 define Package
/libgphoto2
/install
82 $(INSTALL_DIR
) $(1)/usr
/lib
83 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgphoto2
{,_port
}.so.
* $(1)/usr
/lib
/
86 define Package
/libgphoto2-drivers
/install
87 $(INSTALL_DIR
) $(1)/usr
/lib
/
88 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgphoto2
{,_port
} $(1)/usr
/lib
/
89 rm -rf
$(1)/usr
/lib
/libgphoto2
{,_port
}/*/*.
{,l
}a
92 $(eval
$(call BuildPackage
,libgphoto2
))
93 $(eval
$(call BuildPackage
,libgphoto2-drivers
))