fix eterm compile on avr32
[openwrt/svn-archive/archive.git] / Xorg / app / eterm / Makefile
1 #
2 # Copyright (C) 2007-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # blogic@openwrt.org
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=eterm
12 PKG_VERSION:=0.9.4
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=Eterm-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.eterm.org/download/
17 PKG_BUILD_DIR:=$(BUILD_DIR)/Eterm-$(PKG_VERSION)
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/eterm/Default
22 SECTION:=xorg-extra
23 CATEGORY:=Xorg
24 SUBMENU:=terminals
25
26 endef
27
28 define Package/eterm
29 $(call Package/eterm/Default)
30 TITLE:=eterm
31 DEPENDS:=+libX11 +libXcursor +imlib2 +libast +libiconv
32 endef
33
34 define Package/esetroot
35 $(call Package/eterm/Default)
36 TITLE:=esetroot
37 DEPENDS:=eterm
38 endef
39
40 CONFIGURE_ARGS += \
41 --with-imlib=$(STAGING_DIR)/usr/
42
43 CONFIGURE_VARS += \
44 LIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR)\
48 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/lib/libiconv/include/" \
49 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib/"
50 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
51 endef
52
53 define Package/eterm/install
54 $(INSTALL_DIR) $(1)/usr/{bin,lib}
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib
56 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/Eterm $(1)/usr/bin
57 endef
58
59 define Package/esetroot/install
60 $(INSTALL_DIR) $(1)/usr/bin
61 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/Esetroot $(1)/usr/bin
62 endef
63
64 $(eval $(call BuildPackage,esetroot))
65 $(eval $(call BuildPackage,eterm))