b85cefc76c186b81bc7279286738e9e58ad5c5c8
[openwrt/svn-archive/archive.git] / Xorg / app / fluxbox / 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:=fluxbox
12 PKG_VERSION:=1.0rc3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://prdownloads.sourceforge.net/fluxbox/
17
18 EXTRA_LDFLAGS:="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
19
20 include $(INCLUDE_DIR)/package.mk
21
22 CONFIGURE_VARS+=LIBS="-nodefaultlibs -luClibc++ -Wl,-Bstatic,-lstdc++,-Bdynamic -lm" \
23 CXXLD="$(TARGET_CC)"
24
25 CONFIGURE_ARGS+=--disable-xmb
26
27 define Package/fluxbox/Default
28 SECTION:=xorg-wm
29 CATEGORY:=Xorg
30 endef
31
32 define Package/fluxbox
33 $(call Package/fluxbox/Default)
34 DEPENDS:=+uclibcxx +libXt
35 TITLE:=fluxbox window manager
36 MENU:=1
37 endef
38
39 define Package/fbrun
40 $(call Package/fluxbox/Default)
41 DEPENDS:=fluxbox
42 TITLE:=fluxbox tool to run applications
43 endef
44
45 define Build/Configure
46 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
47 if [ -x $(CONFIGURE_CMD) ]; then \
48 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
49 $(CONFIGURE_VARS) \
50 $(CONFIGURE_CMD) \
51 $(CONFIGURE_ARGS_XTRA) \
52 $(CONFIGURE_ARGS) ;\
53 fi \
54 )
55 endef
56
57 define Build/Compile
58 $(MAKE) -C $(PKG_BUILD_DIR)
59 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR) install
60 endef
61
62 define Package/fluxbox/install
63 $(INSTALL_DIR) $(1)/usr/bin
64 $(INSTALL_DIR) $(1)/usr/share/fluxbox/styles/
65 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fluxbox $(1)/usr/bin/
66 $(CP) $(PKG_INSTALL_DIR)/usr/share/fluxbox/keys $(1)/usr/share/fluxbox/
67 $(CP) $(PKG_INSTALL_DIR)/usr/share/fluxbox/styles/* $(1)/usr/share/fluxbox/styles/
68 $(CP) files/init $(1)/usr/share/fluxbox/
69 $(CP) files/menu $(1)/usr/share/fluxbox/
70 echo "#!/bin/sh" > $(1)/usr/bin/WM
71 echo "/usr/bin/fluxbox" >> $(1)/usr/bin/WM
72 chmod +x $(1)/usr/bin/WM
73 endef
74
75 define Package/fbsetbg/install
76 $(INSTALL_DIR) $(1)/usr/bin
77 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbsetbg $(1)/usr/bin/
78 endef
79
80 define Package/fbsetroot/install
81 $(INSTALL_DIR) $(1)/usr/bin
82 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbsetroot $(1)/usr/bin/
83 endef
84
85 define Package/fbrun/install
86 $(INSTALL_DIR) $(1)/usr/bin
87 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbrun $(1)/usr/bin/
88 endef
89
90 $(eval $(call BuildPackage,fbrun))
91 $(eval $(call BuildPackage,fluxbox))