added gentoo ebuild
[qbat.git] / gentoo / qbat-9999.ebuild
bloba4a8c21ad6c881107e78fb451d95a95d4bc81eef
2 EGIT_REPO_URI="git://repo.or.cz/qbat.git"
4 inherit eutils flag-o-matic git
6 DESCRIPTION="QBat is a small tool based on Qt4 to display battery stats in system tray."
7 HOMEPAGE="http://repo.or.cz/qbat.git"
8 SRC_URI=""
10 LICENSE="GPL-2.0"
11 SLOT="0"
12 KEYWORDS="~x86 ~amd64"
13 IUSE="debug"
15 RDEPEND=">=x11-libs/qt-4.3.2"
17 DEPEND="${RDEPEND}
18 sys-kernel/linux-headers"
20 S=${WORKDIR}/${EGIT_PROJECT}
22 pkg_setup() {
23 if ! qmake --version | grep -i qt4 ; then
24 eerror "qmake does not point to qmake-qt4"
25 die "Install qmake-qt4 and set symlinks correctly"
30 src_unpack() {
31 #check version:
32 if [ "$PV" != 9999 ]; then
33 EGIT_TREE="v${PV}"
35 git_src_unpack
38 src_compile() {
39 cd "${S}"
40 config_defines=""
41 config_release=""
42 if use debug; then
43 config_release="debug"
44 else
45 config_release="release"
46 config_defines="$config_defines QT_NO_DEBUG_OUTPUT"
49 qmake -recursive -Wall "CONFIG+=$config_release" "DEFINES+=$config_defines"
50 emake || die
53 src_install() {
54 make INSTALL_ROOT="${D}" install || die
57 pkg_postinst() {
58 elog "You need a at least kernel version 2.6.24 to use this software"