[packages] massive: use $(INSTALL_DIR) instead of 'mkdir -p' in install and InstallDev
[packages.git] / libs / freetype / Makefile
1
2 # Copyright (C) 2006-2009 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:=freetype
11 PKG_VERSION:=2.3.9
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/freetype
16 PKG_MD5SUM:=d76233108aca9c9606cdbd341562ad9a
17
18 PKG_FIXUP = libtool
19
20 include $(INCLUDE_DIR)/host-build.mk
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libfreetype
24   SECTION:=libs
25   CATEGORY:=Libraries
26   DEPENDS:=+zlib
27   TITLE:=A free, high-quality and portable font engine
28   URL:=http://www.freetype.org/
29 endef
30
31 define Package/libfreetype/description
32  The FreeType project is a team of volunteers who develop free, 
33  portable and high-quality software solutions for digital typography.
34  They specifically target embedded systems and focus on bringing small, 
35  efficient and ubiquitous products.
36 endef
37
38 TARGET_CFLAGS += $(FPIC)
39
40 CONFIGURE_ARGS += \
41         --enable-shared \
42         --enable-static \
43
44 define Build/Compile
45         $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
46 endef
47
48 define Build/InstallDev
49         $(INSTALL_DIR) $(2)/bin
50         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(2)/bin/
51         $(INSTALL_DIR) $(1)/usr/include
52         $(CP) $(PKG_INSTALL_DIR)/usr/include/freetype2 $(1)/usr/include/
53         $(CP) $(PKG_INSTALL_DIR)/usr/include/ft2build.h $(1)/usr/include/
54         $(INSTALL_DIR) $(1)/usr/lib
55         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(1)/usr/lib/
56         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
57         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(1)/usr/lib/pkgconfig/
58         $(SED) 's,-I$$$$includedir/freetype2,-I$(STAGING_DIR)/usr/include/freetype2,g' $(2)/bin/freetype-config
59         $(SED) 's,/usr/include/freetype2/,$(STAGING_DIR)/usr/include/freetype2/,g' $(2)/bin/freetype-config
60 endef
61
62
63 define Package/libfreetype/install
64         $(INSTALL_DIR) $(1)/usr/lib
65         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(1)/usr/lib/
66 endef
67
68 $(eval $(call HostBuild))
69 $(eval $(call BuildPackage,libfreetype))