ba799ce1e834dd4a3161e0c5edbeb65ef5d854f7
[openwrt/svn-archive/archive.git] / Xorg / wm / 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 SUBMENU:=window manager
31 endef
32
33 define Package/fluxbox
34 $(call Package/fluxbox/Default)
35 DEPENDS:=+uclibcxx +libXt
36 TITLE:=fluxbox window manager
37 MENU:=1
38 endef
39
40 define Package/fbrun
41 $(call Package/fluxbox/Default)
42 DEPENDS:=fluxbox
43 TITLE:=fluxbox tool to run applications
44 endef
45
46 define Build/Configure
47 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
48 if [ -x $(CONFIGURE_CMD) ]; then \
49 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
50 $(CONFIGURE_VARS) \
51 $(CONFIGURE_CMD) \
52 $(CONFIGURE_ARGS_XTRA) \
53 $(CONFIGURE_ARGS) ;\
54 fi \
55 )
56 endef
57
58 define Build/Compile
59 $(MAKE) -C $(PKG_BUILD_DIR)
60 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR) install
61 endef
62
63 define Package/fluxbox/install
64 $(INSTALL_DIR) $(1)/usr/bin
65 $(INSTALL_DIR) $(1)/usr/share/fluxbox/styles/
66 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fluxbox $(1)/usr/bin/
67 $(CP) $(PKG_INSTALL_DIR)/usr/share/fluxbox/keys $(1)/usr/share/fluxbox/
68 $(CP) $(PKG_INSTALL_DIR)/usr/share/fluxbox/styles/* $(1)/usr/share/fluxbox/styles/
69 $(CP) files/init $(1)/usr/share/fluxbox/
70 $(CP) files/menu $(1)/usr/share/fluxbox/
71 echo "#!/bin/sh" > $(1)/usr/bin/WM
72 echo "/usr/bin/fluxbox" >> $(1)/usr/bin/WM
73 chmod +x $(1)/usr/bin/WM
74 endef
75
76 define Package/fbsetbg/install
77 $(INSTALL_DIR) $(1)/usr/bin
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbsetbg $(1)/usr/bin/
79 endef
80
81 define Package/fbsetroot/install
82 $(INSTALL_DIR) $(1)/usr/bin
83 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbsetroot $(1)/usr/bin/
84 endef
85
86 define Package/fbrun/install
87 $(INSTALL_DIR) $(1)/usr/bin
88 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbrun $(1)/usr/bin/
89 endef
90
91 $(eval $(call BuildPackage,fbrun))
92 $(eval $(call BuildPackage,fluxbox))