2010-08-20 14:10:41 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2010 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=pwrtray
|
2010-10-02 16:58:54 +00:00
|
|
|
PKG_REV:=3994c1c31958a53be7f838f86d62629b1349b2bd
|
2010-08-20 14:10:41 +00:00
|
|
|
PKG_VERSION:=$(PKG_REV)
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=git://git.bu3sch.de/pwrtray.git
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
|
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
|
|
|
PKG_INSTALL:=1
|
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2010-10-02 16:58:54 +00:00
|
|
|
define Package/pwrtray-common
|
|
|
|
MAINTAINER:=Michael Buesch <mb@bu3sch.de>
|
|
|
|
URL:=http://bu3sch.de/gitweb?p=pwrtray.git;a=summary
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/pwrtray-backend
|
|
|
|
$(call Package/pwrtray-common)
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
TITLE:=System power control daemon
|
|
|
|
DEPENDS:=+FEATURE_drawing-backend_libX11:libX11
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/pwrtray-backend/description
|
|
|
|
Tiny system power control daemon.
|
|
|
|
endef
|
|
|
|
|
2010-08-20 14:10:41 +00:00
|
|
|
define Package/pwrtray
|
2010-10-02 16:58:54 +00:00
|
|
|
$(call Package/pwrtray-common)
|
2010-08-20 14:10:41 +00:00
|
|
|
SECTION:=xorg-app
|
|
|
|
CATEGORY:=Xorg
|
|
|
|
SUBMENU:=app
|
2010-10-02 16:58:54 +00:00
|
|
|
TITLE:=Frontend to pwrtray-backend daemon
|
|
|
|
DEPENDS:=+pwrtray-backend +qt4 +qt4-gui
|
2010-08-20 14:10:41 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/pwrtray/description
|
2010-10-02 16:58:54 +00:00
|
|
|
Small system-tray frontend to the power control daemon.
|
2010-08-20 14:10:41 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
EXTRA_CFLAGS:= \
|
2010-09-09 23:49:46 +00:00
|
|
|
-I$(PKG_BUILD_DIR)/tray/moc \
|
|
|
|
-I$(STAGING_DIR)/usr/include/QtCore \
|
|
|
|
-I$(STAGING_DIR)/usr/include/QtGui
|
2010-08-20 14:10:41 +00:00
|
|
|
|
|
|
|
EXTRA_LDFLAGS:= \
|
|
|
|
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
|
|
|
|
-Wl,-rpath=/usr/lib/
|
|
|
|
|
|
|
|
MAKE_VARS+= \
|
|
|
|
MOC="$(STAGING_DIR_HOST)/bin/moc" \
|
2010-09-30 22:05:11 +00:00
|
|
|
STRIP="$(STRIP)" \
|
2010-10-02 16:58:54 +00:00
|
|
|
$(if $(CONFIG_PACKAGE_libX11),FEATURE_XLOCK=y,FEATURE_XLOCK=n) \
|
|
|
|
$(if $(CONFIG_PACKAGE_pwrtray),FEATURE_TRAY=y,FEATURE_TRAY=n)
|
2010-08-20 14:10:41 +00:00
|
|
|
|
|
|
|
#MAKE_FLAGS+= \
|
|
|
|
# V=1
|
|
|
|
|
2010-10-02 16:58:54 +00:00
|
|
|
define Package/pwrtray-backend/install
|
2010-09-09 23:49:46 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/bin $(1)/usr/share
|
|
|
|
$(INSTALL_BIN) ./files/etc/init.d/* $(1)/etc/init.d/
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pwrtray-backend $(1)/usr/bin/
|
2010-09-30 22:05:11 +00:00
|
|
|
$(if $(CONFIG_PACKAGE_libX11),$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pwrtray-xlock $(1)/usr/bin/)
|
2010-10-02 16:58:54 +00:00
|
|
|
$(if $(CONFIG_PACKAGE_pwrtray),$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pwrtray $(1)/usr/bin/)
|
2010-08-20 14:10:41 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/pwrtray $(1)/usr/share/
|
2010-09-11 16:13:31 +00:00
|
|
|
[ -e $(1)/etc/pwrtray-backendrc ] || \
|
|
|
|
$(INSTALL_DATA) ./files/etc/pwrtray-backendrc $(1)/etc/
|
2010-08-20 14:10:41 +00:00
|
|
|
endef
|
|
|
|
|
2010-10-02 16:58:54 +00:00
|
|
|
$(eval $(call BuildPackage,pwrtray-backend))
|
2010-08-20 14:10:41 +00:00
|
|
|
$(eval $(call BuildPackage,pwrtray))
|