python-sip: add missing dependency
[openwrt/svn-archive/archive.git] / libs / libpng / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libpng
11 PKG_VERSION:=1.2.44
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/libpng
16 PKG_MD5SUM:=e3ac7879d62ad166a6f0c7441390d12b
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/host-build.mk
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libpng
25 SECTION:=libs
26 CATEGORY:=Libraries
27 DEPENDS:=+zlib
28 TITLE:=A PNG format files handling library
29 URL:=http://www.libpng.org/pub/png/libpng.html
30 endef
31
32 TARGET_CFLAGS += $(FPIC)
33
34 CONFIGURE_ARGS += \
35 --enable-shared \
36 --enable-static \
37
38 define Build/InstallDev
39 $(INSTALL_DIR) $(1)/usr/bin
40 $(CP) $(PKG_INSTALL_DIR)/usr/bin/libpng{,12}-config $(1)/usr/bin/
41 $(SED) \
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/ ; \
54 done
55 endef
56
57 define Package/libpng/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.so.* $(1)/usr/lib/
60 endef
61
62 $(eval $(call HostBuild))
63 $(eval $(call BuildPackage,libpng))