clean up more endianness checks
[packages.git] / multimedia / gphoto2 / Makefile
1
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=gphoto2
12 PKG_VERSION:=2.2.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/gphoto
17 PKG_MD5SUM:=f5c1f83185db598b4ca52889964a5e84
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/gphoto2
26   SECTION:=multimedia
27   CATEGORY:=Multimedia
28   DEPENDS:=+libexif +libgphoto2 +libltdl +libpopt +libpthread
29   TITLE:=Gphoto Digital Camera Control
30   DESCRIPTION:=For downloading and controlling digital cameras
31   URL:=http://www.gphoto.org/
32 endef
33
34 BIG_ENDIAN:=no
35 ifeq ($(CONFIG_BIG_ENDIAN),y)
36   BIG_ENDIAN:=yes
37 endif
38
39 define Build/Configure
40         $(call Build/Configure/Default, \
41                 --without-libiconv-prefix \
42                 --without-libintl-prefix \
43                 , \
44                 LIBGPHOTO2_CFLAGS="$$$$CFLAGS -I$(STAGING_DIR)/usr/include/gphoto2 $$$$CPPFLAGS" \
45                 LIBGPHOTO2_LIBS="$$$$LDFLAGS -lgphoto2 -lgphoto2_port -lltdl" \
46                 LIBEXIF_CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \
47                 LIBEXIF_LIBS="$$$$LDFLAGS -lexif" \
48                 POPT_CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \
49                 POPT_LIBS="$$$$LDFLAGS -lpopt" \
50                 ac_cv_c_bigendian="$(BIG_ENDIAN)" \
51                 ac_cv_func_malloc_0_nonnull=yes \
52         )
53 endef
54
55 define Build/Compile
56         $(MAKE) -C $(PKG_BUILD_DIR) \
57                 DESTDIR="$(PKG_INSTALL_DIR)" \
58                 all install
59 endef
60
61 define Package/gphoto2/install
62         install -d -m0755 $(1)/usr/bin
63         $(CP) $(PKG_INSTALL_DIR)/usr/bin/gphoto2 $(1)/usr/bin/
64 endef
65
66
67 $(eval $(call BuildPackage,gphoto2))