4a11fa3f28882e5d2eb46830fd0a425ec2da12c3
[openwrt/svn-archive/archive.git] / multimedia / graphicsmagick / Makefile
1 #
2 # Copyright (C) 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:=GraphicsMagick
11 PKG_VERSION:=1.3.7
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://prdownloads.sourceforge.net/graphicsmagick
16 PKG_MD5SUM:=ac019a9ece8c45f5213bf31981588c63
17
18 include $(INCLUDE_DIR)/package.mk
19
20 export PATH:=$(PKG_BUILD_DIR)/bin:$(TARGET_PATH)
21
22 PKG_INSTALL=1
23
24 define Package/GraphicsMagick/Default
25 SECTION:=multimedia
26 CATEGORY:=Multimedia
27 TITLE:=GraphicsMagick
28 URL:=http://www.graphicsmagick.org/
29 endef
30
31 define Package/GraphicsMagick
32 $(call Package/GraphicsMagick/Default)
33 endef
34
35 define Package/GraphicsMagick/description
36 An image manipulation library.
37 endef
38
39 define Package/GraphicsMagick-jpeg
40 $(call Package/GraphicsMagick/Default)
41 TITLE+= (jpeg)
42 DEPENDS:=+GraphicsMagick +libjpeg +zlib
43 endef
44
45 define Package/GraphicsMagick-jpeg/description
46 GraphicsMagick JPEG module
47 endef
48
49
50 CONFIGURE_ARGS += \
51 --with-modules \
52 --enable-shared \
53 --enable-static \
54 --without-xml \
55 --without-x
56
57 define Build/InstallDev
58 $(INSTALL_DIR) $(1)/usr/include/GraphicsMagick/magick
59 $(INSTALL_DIR) $(1)/usr/include/GraphicsMagick/wand
60 $(CP) \
61 $(PKG_INSTALL_DIR)/usr/include/* \
62 $(1)/usr/include/
63
64 $(INSTALL_DIR) $(1)/usr/lib/
65 $(CP) \
66 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
67 $(1)/usr/lib/
68
69 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
70 $(INSTALL_DATA) \
71 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
72 $(1)/usr/lib/pkgconfig/
73 endef
74
75 define Package/GraphicsMagick/install
76 $(INSTALL_DIR) $(1)/usr/lib/
77 $(CP) \
78 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
79 $(1)/usr/lib/
80 $(INSTALL_DIR) $(1)/usr/share/GraphicsMagick-$(PKG_VERSION)
81 $(CP) \
82 $(PKG_INSTALL_DIR)/usr/share/GraphicsMagick-$(PKG_VERSION)/* \
83 $(1)/usr/share/GraphicsMagick-$(PKG_VERSION)
84 endef
85
86 define BuildPlugin
87 define Package/GraphicsMagick-$(1)/install
88 $(INSTALL_DIR) $$(1)/usr/lib/GraphicsMagick-$(PKG_VERSION)/modules-Q8/coders
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/GraphicsMagick-$(PKG_VERSION)/modules-Q8/coders/$(1).{so,la} \
90 $$(1)/usr/lib/GraphicsMagick-$(PKG_VERSION)/modules-Q8/coders
91 endef
92
93 $$(eval $$(call BuildPackage,GraphicsMagick-$(1)))
94 endef
95
96 $(eval $(call BuildPackage,GraphicsMagick))
97 $(eval $(call BuildPlugin,jpeg))