pwrtray: Update
[packages.git] / Xorg / app / pwrtray / Makefile
1 #
2 # Copyright (C) 2010-2011 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=pwrtray
11 PKG_REV:=e93a705d313d1e7b595a0dce5b4ee8940037a799
12 PKG_VERSION:=$(PKG_REV)
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=git://git.bu3sch.de/pwrtray.git
17 PKG_SOURCE_PROTO:=git
18 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19 PKG_SOURCE_VERSION:=$(PKG_REV)
20 PKG_INSTALL:=1
21 PKG_BUILD_PARALLEL:=1
22
23 PKG_CONFIG_DEPENDS:= \
24         CONFIG_PACKAGE_pwrtray-backend \
25         CONFIG_PACKAGE_pwrtray
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/pwrtray-common
30   MAINTAINER:=Michael Buesch <mb@bu3sch.de>
31   URL:=http://bu3sch.de/gitweb?p=pwrtray.git;a=summary
32 endef
33
34 define Package/pwrtray-backend
35   $(call Package/pwrtray-common)
36   SECTION:=utils
37   CATEGORY:=Utilities
38   TITLE:=System power control daemon
39   DEPENDS:=+FEATURE_drawing-backend_libX11:libX11
40 endef
41
42 define Package/pwrtray-backend/description
43   Tiny system power control daemon.
44 endef
45
46 define Package/pwrtray
47   $(call Package/pwrtray-common)
48   SECTION:=xorg-app
49   CATEGORY:=Xorg
50   SUBMENU:=app
51   TITLE:=Frontend to pwrtray-backend daemon
52   DEPENDS:=+pwrtray-backend +qt4 +qt4-gui
53 endef
54
55 define Package/pwrtray/description
56   Small system-tray frontend to the power control daemon.
57 endef
58
59 EXTRA_CFLAGS:= \
60         -I$(PKG_BUILD_DIR)/tray/moc \
61         -I$(STAGING_DIR)/usr/include/QtCore \
62         -I$(STAGING_DIR)/usr/include/QtGui
63
64 EXTRA_LDFLAGS:= \
65         -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
66         -Wl,-rpath=/usr/lib/
67
68 MAKE_VARS+= \
69         MOC="$(STAGING_DIR_HOST)/bin/moc" \
70         STRIP="$(STRIP)" \
71         $(if $(CONFIG_PACKAGE_libX11),FEATURE_XLOCK=y,FEATURE_XLOCK=n) \
72         $(if $(CONFIG_PACKAGE_pwrtray),FEATURE_TRAY=y,FEATURE_TRAY=n)
73
74 #MAKE_FLAGS+= \
75 #       V=1
76
77 define Package/pwrtray-backend/install
78         $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/bin $(1)/usr/share
79         $(INSTALL_BIN) ./files/etc/init.d/* $(1)/etc/init.d/
80         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pwrtray-backend $(1)/usr/bin/
81         $(if $(CONFIG_PACKAGE_libX11),$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pwrtray-xlock $(1)/usr/bin/)
82         $(if $(CONFIG_PACKAGE_pwrtray),$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pwrtray $(1)/usr/bin/)
83         $(if $(CONFIG_PACKAGE_pwrtray),$(CP) $(PKG_INSTALL_DIR)/usr/share/pwrtray $(1)/usr/share/)
84         [ -e $(1)/etc/pwrtray-backendrc ] || \
85                 $(INSTALL_DATA) ./files/etc/pwrtray-backendrc $(1)/etc/
86 endef
87
88 $(eval $(call BuildPackage,pwrtray-backend))
89 $(eval $(call BuildPackage,pwrtray))