2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=@SF
/libpng
16 PKG_MD5SUM
:=e3ac7879d62ad166a6f0c7441390d12b
21 include $(INCLUDE_DIR
)/host-build.mk
22 include $(INCLUDE_DIR
)/package.mk
28 TITLE
:=A PNG format files handling library
29 URL
:=http
://www.libpng.org
/pub
/png
/libpng.html
32 TARGET_CFLAGS
+= $(FPIC
)
38 define Build
/InstallDev
39 $(INSTALL_DIR
) $(1)/usr
/bin
40 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/libpng
{,12}-config
$(1)/usr
/bin
/
42 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
43 $(1)/usr
/bin
/libpng
{,12}-config
44 $(INSTALL_DIR
) $(1)/usr
/include
45 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/png
{,conf
}.h
$(1)/usr
/include/
46 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libpng12
$(1)/usr
/include/
47 $(INSTALL_DIR
) $(1)/usr
/lib
48 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpng
{,12}.
{a
,la
,so
*} $(1)/usr
/lib
/
49 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
50 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libpng
{,12}.
pc $(1)/usr
/lib
/pkgconfig
/
51 $(INSTALL_DIR
) $(2)/bin
52 for f in libpng
{,12}-config
; do \
53 $(LN
) ..
/..
/usr
/bin
/$$$$f $(2)/bin
/ ; \
57 define Package
/libpng
/install
58 $(INSTALL_DIR
) $(1)/usr
/lib
59 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpng
{,12}.so.
* $(1)/usr
/lib
/
62 $(eval
$(call HostBuild
))
63 $(eval
$(call BuildPackage
,libpng
))