added libast
[openwrt/svn-archive/archive.git] / XOrg / lib / libast / 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 # blogic@openwrt.org
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libast
12 PKG_VERSION:=0.7
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.eterm.org/download/
17 PKG_MD5SUM:=a9ec3b2da317f35869316e6d9571d296
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libast
22 SECTION:=xorg-libraries
23 CATEGORY:=Xorg
24 SUBMENU:=libraries
25 TITLE:=libast
26 DEPENDS:=+xorg-server-essentials
27 endef
28
29 CONFIGURE_ARGS+=dps_cv_snprintf_bug=0 dps_cv_vsnprintf_bug=0 --without-imlib
30
31 define Build/Configure
32 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
33 if [ -x $(CONFIGURE_CMD) ]; then \
34 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
35 $(CONFIGURE_VARS) \
36 $(CONFIGURE_CMD) \
37 $(CONFIGURE_ARGS_XTRA) \
38 $(CONFIGURE_ARGS) ;\
39 fi \
40 )
41 endef
42
43 define Build/Compile
44 $(MAKE) -C $(PKG_BUILD_DIR) \
45 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
46 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib"
47 $(MAKE) -C $(PKG_BUILD_DIR) install DESTDIR=$(PKG_INSTALL_DIR)
48 endef
49
50 define Build/InstallDev
51 $(INSTALL_DIR) $(1)/usr/{lib,include,bin}
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*{la,so}* $(1)/usr/lib
53 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
55 $(SED) "s,"libdir\=\'/usr/lib\'",libdir='$(1)/usr/lib\'," $(1)/usr/lib/libast*.la
56 $(SED) "s,-I/usr/include,,g" $(1)/usr/bin/libast-config
57 $(SED) "s,-L/usr/lib,,g" $(1)/usr/bin/libast-config
58 $(SED) "s,-L/usr/X11R6/lib,,g" $(1)/usr/bin/libast-config
59 endef
60
61 define Package/libast/install
62 $(INSTALL_DIR) $(1)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/
64 endef
65
66 $(eval $(call BuildPackage,libast))