[packages] libgphoto2, gphoto2: update to 2.4.8
[openwrt/svn-archive/archive.git] / libs / libgphoto2 / Makefile
1 #
2 # Copyright (C) 2006-2010 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
10 PKG_NAME:=libgphoto2
11 PKG_VERSION:=2.4.8
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/gphoto
16 PKG_MD5SUM:=7753f17dff15702466337aab05209a71
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libgphoto2/Default
24 SECTION:=libs
25 CATEGORY:=Libraries
26 URL:=http://www.gphoto.org/
27 endef
28
29 define Package/libgphoto2
30 $(call Package/libgphoto2/Default)
31 DEPENDS:=+libusb +libexif +libjpeg +libpthread +libltdl +libiconv
32 TITLE:=The basic library of the gphoto2 program.
33 MENU:=1
34 endef
35
36 define Package/libgphoto2-drivers
37 $(call Package/libgphoto2/Default)
38 DEPENDS:=libgphoto2
39 TITLE:=Gphoto2 drivers for various cameras
40 endef
41
42 TARGET_CFLAGS += $(FPIC)
43
44 CONFIGURE_ARGS += \
45 --enable-shared \
46 --enable-static \
47 --disable-rpath \
48 --with-drivers=all \
49 --without-included-ltdl \
50 --without-libiconv-prefix \
51 --without-libintl-prefix \
52
53 CONFIGURE_VARS += \
54 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/lib/libiconv/include" \
55 LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
56 LIBEXIF_CFLAGS="$$$$CPPFLAGS" \
57 LIBEXIF_LIBS="$$$$LDFLAGS -lexif" \
58 LIBUSB_CFLAGS="$$$$CPPFLAGS" \
59 LIBUSB_LIBS="$$$$LDFLAGS -lusb" \
60 LIBS="-lltdl" \
61
62 MAKE_FLAGS += \
63 LIBLTDL="" \
64
65 define Build/InstallDev
66 $(INSTALL_DIR) $(1)/usr/bin
67 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gphoto2{,-port}-config $(1)/usr/bin/
68 $(INSTALL_DIR) $(1)/usr/include
69 $(CP) $(PKG_INSTALL_DIR)/usr/include/gphoto2 $(1)/usr/include/
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port}.{a,so*} $(1)/usr/lib/
72 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgphoto2.pc $(1)/usr/lib/pkgconfig/
74 $(SED) 's,-I$$$${prefix}/include/gphoto2,,g' $(1)/usr/bin/gphoto2{,-port}-config
75 $(SED) 's,-I$$$${prefix}/include,,g' $(1)/usr/bin/gphoto2{,-port}-config
76 # remove annoying recursive symlink
77 rm -f $(1)/usr/include/gphoto2/gphoto2
78 endef
79
80 define Package/libgphoto2/install
81 $(INSTALL_DIR) $(1)/usr/lib
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port}.so.* $(1)/usr/lib/
83 endef
84
85 define Package/libgphoto2-drivers/install
86 $(INSTALL_DIR) $(1)/usr/lib/
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port} $(1)/usr/lib/
88 rm -rf $(1)/usr/lib/libgphoto2{,_port}/*/*.{,l}a
89 endef
90
91 $(eval $(call BuildPackage,libgphoto2))
92 $(eval $(call BuildPackage,libgphoto2-drivers))