2df55ff9c468c256427d6f9f336b21c48fe88a6c
[packages.git] / Xorg / wm / matchbox-window-manager / Makefile
1 #
2 # Copyright (C) 2007-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 # 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
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 TARGET_LDFLAGS+= \
22         -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
23         -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/libiconv/lib \
24         -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/libintl/lib
25
26 include $(INCLUDE_DIR)/package.mk
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 endef
35
36 define Build/Compile
37         $(MAKE) -C $(PKG_BUILD_DIR) \
38                 DESTDIR=$(PKG_INSTALL_DIR) \
39                 LIBMB_LIBS="$(TARGET_LDFLAGS) -lfontconfig -lXrender \
40                 -lz -lexpat -lfreetype -lXft -lmb -lX11 -lXext -lXau -lXdmcp \
41                 -lpng12" \
42                 all
43 endef
44
45 define Package/matchbox-window-manager/install
46         $(INSTALL_DIR) $(1)/etc/matchbox
47         $(INSTALL_DATA) \
48                 $(PKG_INSTALL_DIR)/etc/matchbox/kbdconfig \
49                 $(1)/etc/matchbox/
50
51         $(INSTALL_DIR) $(1)/usr/bin
52         $(INSTALL_BIN) \
53                 $(PKG_INSTALL_DIR)/usr/bin/* \
54                 $(1)/usr/bin/
55
56         $(INSTALL_DIR) $(1)/usr/share/{matchbox,themes}
57         $(INSTALL_DATA) \
58                 $(PKG_INSTALL_DIR)/usr/share/matchbox/* \
59                 $(1)/usr/share/matchbox/
60         $(CP) \
61                 $(PKG_INSTALL_DIR)/usr/share/themes/* \
62                 $(1)/usr/share/themes/
63         $(INSTALL_DIR) $(1)/etc/uci-defaults
64         $(INSTALL_DATA) \
65                 ./files/uci-defaults/x11 \
66                 $(1)/etc/uci-defaults/
67 endef
68
69 define Package/matchbox-window-manager/postinst
70         #!/bin/sh
71         [ -n "$${IPKG_INSTROOT}" ] && exit
72         . /etc/functions.sh
73         uci_apply_defaults
74 endef
75
76 $(eval $(call BuildPackage,matchbox-window-manager))