source: packages/libs/libgphoto2/Makefile @ 19714

Last change on this file since 19714 was 19714, checked in by lars, 7 years ago

[packages] Add missing libtool fixups

  • Property copyright set to Copyright (C) 2006-2008 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=libgphoto2
11PKG_VERSION:=2.4.8
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=@SF/gphoto
16PKG_MD5SUM:=7753f17dff15702466337aab05209a71
17
18PKG_FIXUP:=libtool
19PKG_LIBTOOL_PATHS:=. libgphoto2_port
20PKG_INSTALL:=1
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/libgphoto2/Default
25  SECTION:=libs
26  CATEGORY:=Libraries
27  URL:=http://www.gphoto.org/
28endef
29
30define Package/libgphoto2
31  $(call Package/libgphoto2/Default)
32  DEPENDS:=+libusb +libexif +libjpeg +libpthread +libltdl +libiconv
33  TITLE:=The basic library of the gphoto2 program.
34  MENU:=1
35endef
36
37define Package/libgphoto2-drivers
38  $(call Package/libgphoto2/Default)
39  DEPENDS:=libgphoto2
40  TITLE:=Gphoto2 drivers for various cameras
41endef
42
43TARGET_CFLAGS += $(FPIC)
44
45CONFIGURE_ARGS += \
46        --enable-shared \
47        --enable-static \
48        --disable-rpath \
49        --with-drivers=all \
50        --without-included-ltdl \
51        --without-libiconv-prefix \
52        --without-libintl-prefix \
53
54CONFIGURE_VARS += \
55        CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/lib/libiconv/include" \
56        LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
57        LIBEXIF_CFLAGS="$$$$CPPFLAGS" \
58        LIBEXIF_LIBS="$$$$LDFLAGS -lexif" \
59        LIBUSB_CFLAGS="$$$$CPPFLAGS" \
60        LIBUSB_LIBS="$$$$LDFLAGS -lusb" \
61        LIBS="-lltdl" \
62
63MAKE_FLAGS += \
64        LIBLTDL="" \
65
66define 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
79endef
80
81define Package/libgphoto2/install
82        $(INSTALL_DIR) $(1)/usr/lib
83        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgphoto2{,_port}.so.* $(1)/usr/lib/
84endef
85
86define 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
90endef
91
92$(eval $(call BuildPackage,libgphoto2))
93$(eval $(call BuildPackage,libgphoto2-drivers))
Note: See TracBrowser for help on using the repository browser.