2 # Copyright (C) 2010-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
13 PKG_REV
:=f9b63119a568803fad582dc0796af91bb087919c
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
19 PKG_SOURCE_URL
:=git
://git.bu3sch.de
/pwrtray.git
21 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
22 PKG_SOURCE_VERSION
:=$(PKG_REV
)
28 PKG_CONFIG_DEPENDS
:= \
29 CONFIG_PACKAGE_pwrtray-backend \
30 CONFIG_PACKAGE_pwrtray
32 include $(INCLUDE_DIR
)/package.mk
34 define Package
/pwrtray-common
35 MAINTAINER
:=Michael Buesch
<mb@bu3sch.de
>
36 URL
:=http
://bu3sch.de
/gitweb?p
=pwrtray.git
;a
=summary
39 define Package
/pwrtray-backend
40 $(call Package
/pwrtray-common
)
43 TITLE
:=System power control daemon
44 DEPENDS
:=+FEATURE_drawing-backend_libX11
:libX11
47 define Package
/pwrtray-backend
/description
48 Tiny system power control daemon.
51 define Package
/pwrtray
52 $(call Package
/pwrtray-common
)
56 TITLE
:=Frontend to pwrtray-backend daemon
57 DEPENDS
:=+pwrtray-backend
+qt4
+qt4-gui
60 define Package
/pwrtray
/description
61 Small system-tray frontend to the power control daemon.
65 -I
$(PKG_BUILD_DIR
)/tray
/moc
68 -Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib \
72 MOC
="$(STAGING_DIR_HOST)/bin/moc" \
74 QT_INCDIR
="$(STAGING_DIR)/usr/include" \
75 QT_LIBDIR
="$(STAGING_DIR)/usr/lib" \
77 $(if
$(CONFIG_PACKAGE_libX11
),FEATURE_XLOCK
=y
,FEATURE_XLOCK
=n
) \
79 $(if
$(CONFIG_PACKAGE_pwrtray
),FEATURE_TRAY
=y
,FEATURE_TRAY
=n
)
86 $(CP
) .
/files
/src
/* $(PKG_BUILD_DIR
)/ \
88 $(call Build
/Prepare
/Default
) \
93 $(MAKE
) -C
$(PKG_BUILD_DIR
) clean
94 $(call Build
/Compile
/Default
)
97 define Package
/pwrtray-backend
/install
98 $(INSTALL_DIR
) $(1)/etc
/init.d
$(1)/usr
/bin
$(1)/usr
/share
99 $(INSTALL_BIN
) .
/files
/etc
/init.d
/* $(1)/etc
/init.d
/
100 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/pwrtray-backend
$(1)/usr
/bin
/
101 $(if
$(CONFIG_PACKAGE_libX11
),$(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/pwrtray-xlock
$(1)/usr
/bin
/)
102 $(if
$(CONFIG_PACKAGE_pwrtray
),$(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/pwrtray
$(1)/usr
/bin
/)
103 $(if
$(CONFIG_PACKAGE_pwrtray
),$(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/pwrtray
$(1)/usr
/share
/)
104 [ -e
$(1)/etc
/pwrtray-backendrc
] || \
105 $(INSTALL_DATA
) .
/files
/etc
/pwrtray-backendrc
$(1)/etc
/
108 $(eval
$(call BuildPackage
,pwrtray-backend
))
109 $(eval
$(call BuildPackage
,pwrtray
))