source: packages/libs/libpng/Makefile @ 9349

Last change on this file since 9349 was 9349, checked in by blogic, 9 years ago

remove PKG_CAT from packages

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
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
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=libpng
12PKG_VERSION:=1.2.8
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-config.tar.gz
16PKG_SOURCE_URL:=@SF/libpng
17PKG_MD5SUM:=e5a39003eed16103cbbd3b6a8bc6b1f9
18
19PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-config
20PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22include $(INCLUDE_DIR)/package.mk
23
24define 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
30endef
31
32define Build/Configure
33        $(call Build/Configure/Default, \
34                --enable-shared \
35                --enable-static \
36                --with-zlib="$(STAGING_DIR)/usr" \
37        )
38endef
39
40define Build/Compile
41        $(MAKE) -C $(PKG_BUILD_DIR) \
42                DESTDIR="$(PKG_INSTALL_DIR)" \
43                all install
44endef
45
46define Build/InstallDev
47        mkdir -p $(1)/usr/bin
48        $(CP) $(PKG_INSTALL_DIR)/usr/bin/libpng{,12}-config $(1)/usr/bin/
49        mkdir -p $(1)/usr/include
50        $(CP) $(PKG_INSTALL_DIR)/usr/include/png{,conf}.h $(1)/usr/include/
51        $(CP) $(PKG_INSTALL_DIR)/usr/include/libpng $(1)/usr/include/
52        mkdir -p $(1)/usr/lib
53        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.{a,so*} $(1)/usr/lib/
54        mkdir -p $(1)/usr/lib/pkgconfig
55        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpng{,12}.pc $(1)/usr/lib/pkgconfig/
56        $(SED) 's,^[ILR]_opts=".\+",,g' $(1)/usr/bin/libpng*-config
57endef
58
59define Build/UninstallDev
60        rm -rf \
61                $(STAGING_DIR)/usr/bin/libpng{,12}-config \
62                $(STAGING_DIR)/usr/include/png{,conf}.h \
63                $(STAGING_DIR)/usr/include/libpng \
64                $(STAGING_DIR)/usr/lib/libpng{,12}.{a,so*} \
65                $(STAGING_DIR)/usr/lib/pkgconfig/libpng{,12}.pc
66endef
67
68define Package/libpng/install
69        $(INSTALL_DIR) $(1)/usr/lib
70        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.so.* $(1)/usr/lib/
71endef
72
73$(eval $(call BuildPackage,libpng))
Note: See TracBrowser for help on using the repository browser.