replace lots of manual install commands with INSTALL_* variables
[openwrt/svn-archive/archive.git] / libs / libexif / 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:=libexif
12 PKG_VERSION:=0.6.13
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/libexif
17 PKG_MD5SUM:=1b1e2b495c5aa20c08725f30545a110b
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/libexif
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=library for jpeg files with exif tags
29 URL:=http://libexif.sourceforge.net/
30 endef
31
32 define Build/Configure
33 $(call Build/Configure/Default, \
34 --enable-shared \
35 --enable-static \
36 --disable-rpath \
37 --without-libiconv-prefix \
38 --without-libintl-prefix \
39 )
40 endef
41
42 define Build/Compile
43 $(MAKE) -C $(PKG_BUILD_DIR) \
44 DESTDIR="$(PKG_INSTALL_DIR)" \
45 all install
46 endef
47
48 define Build/InstallDev
49 mkdir -p $(STAGING_DIR)/usr/include
50 $(CP) $(PKG_INSTALL_DIR)/usr/include/libexif $(STAGING_DIR)/usr/include/
51 mkdir -p $(STAGING_DIR)/usr/lib
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexif*.{a,so*} $(STAGING_DIR)/usr/lib/
53 endef
54
55 define Build/UninstallDev
56 rm -rf \
57 $(STAGING_DIR)/usr/include/libexif \
58 $(STAGING_DIR)/usr/lib/libexif*.{a,so*}
59 endef
60
61 define Package/libexif/install
62 $(INSTALL_DIR) $(1)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexif*.so.* $(1)/usr/lib/
64 endef
65
66 $(eval $(call BuildPackage,libexif))