Update to a more recent version.
[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 $(LIBGCC_S)" \
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 +freedesktop-compliant
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 $(INSTALL_DIR) $(1)/etc/uci-defaults
72 $(INSTALL_DATA) \
73 ./files/uci-defaults/x11 \
74 $(1)/etc/uci-defaults/
75 endef
76
77 define Package/fbsetbg/install
78 $(INSTALL_DIR) $(1)/usr/bin
79 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbsetbg $(1)/usr/bin/
80 endef
81
82 define Package/fbsetroot/install
83 $(INSTALL_DIR) $(1)/usr/bin
84 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbsetroot $(1)/usr/bin/
85 endef
86
87 define Package/fbrun/install
88 $(INSTALL_DIR) $(1)/usr/bin
89 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fbrun $(1)/usr/bin/
90 endef
91
92 define Package/fluxbox/postinst
93 #!/bin/sh
94 [ -n "$${IPKG_INSTROOT}" ] && exit
95 . /etc/functions.sh
96 uci_apply_defaults
97 endef
98
99 $(eval $(call BuildPackage,fbrun))
100 $(eval $(call BuildPackage,fluxbox))