df23f97ee19b29bd990ce0639662fb0b9dbd35f5
[packages.git] / Xorg / wm / matchbox-window-manager / Makefile
1 #
2 # Copyright (C) 2007-2010 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:=matchbox-window-manager
12 PKG_VERSION:=1.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://matchbox-project.org/sources/$(PKG_NAME)/$(PKG_VERSION)
17 PKG_MD5SUM:=3e158dcf57823b55c926d95b245500fb
18
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/nls.mk
24
25 TARGET_LDFLAGS+= \
26         -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
27
28 define Package/matchbox-window-manager
29   TITLE:=matchbox window manager
30   SECTION:=xorg-wm
31   CATEGORY:=Xorg
32   SUBMENU:=window manager
33   DEPENDS:=+libX11 +zlib +libfreetype +fontconfig +libmatchbox
34   URL:=http://matchbox-project.org/
35 endef
36
37 define Build/Compile
38         $(MAKE) -C $(PKG_BUILD_DIR) \
39                 DESTDIR=$(PKG_INSTALL_DIR) \
40                 LIBMB_LIBS="$(TARGET_LDFLAGS) -lfontconfig -lXrender \
41                 -lz -lexpat -lfreetype -lXft -lmb -lX11 -lXext -lXau -lXdmcp \
42                 -lpng12" \
43                 all
44 endef
45
46 define Package/matchbox-window-manager/install
47         $(INSTALL_DIR) $(1)/etc/matchbox
48         $(INSTALL_DATA) \
49                 $(PKG_INSTALL_DIR)/etc/matchbox/kbdconfig \
50                 $(1)/etc/matchbox/
51
52         $(INSTALL_DIR) $(1)/usr/bin
53         $(INSTALL_BIN) \
54                 $(PKG_INSTALL_DIR)/usr/bin/* \
55                 $(1)/usr/bin/
56
57         $(INSTALL_DIR) $(1)/usr/share/{matchbox,themes}
58         $(INSTALL_DATA) \
59                 $(PKG_INSTALL_DIR)/usr/share/matchbox/* \
60                 $(1)/usr/share/matchbox/
61         $(CP) \
62                 $(PKG_INSTALL_DIR)/usr/share/themes/* \
63                 $(1)/usr/share/themes/
64         $(INSTALL_DIR) $(1)/etc/uci-defaults
65         $(INSTALL_DATA) \
66                 ./files/uci-defaults/x11 \
67                 $(1)/etc/uci-defaults/
68 endef
69
70 define Package/matchbox-window-manager/postinst
71         #!/bin/sh
72         [ -n "$${IPKG_INSTROOT}" ] && exit
73         . /etc/functions.sh
74         uci_apply_defaults
75 endef
76
77 $(eval $(call BuildPackage,matchbox-window-manager))