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