summaryrefslogtreecommitdiff
blob: 299b8c7db42ebea7958928887a681a7769c7af14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-plugins/wmtime/wmtime-1.0_beta2_p9.ebuild,v 1.4 2010/09/03 18:49:52 mr_bones_ Exp $

inherit eutils versionator

MY_PV="$(get_version_component_range 1-2)"
MY_PL="$(get_version_component_range 3)"
MY_PL="${MY_PL/beta/b}"
MY_PV="${MY_PV}${MY_PL}"
MY_PL="$(get_version_component_range 4)"
MY_PL="${MY_PL/p/}"

IUSE=""

DESCRIPTION="applet which displays the date and time in a dockable tile"
SRC_URI="http://ftp.debian.org/debian/pool/main/w/wmtime/wmtime_${MY_PV}.orig.tar.gz
	http://ftp.debian.org/debian/pool/main/w/wmtime/wmtime_${MY_PV}-${MY_PL}.diff.gz"
HOMEPAGE="http://packages.qa.debian.org/w/wmtime.html"

SLOT="0"
KEYWORDS="~amd64 x86"
LICENSE="GPL-2"

RDEPEND="x11-libs/libX11
	x11-libs/libXext
	x11-libs/libXau
	x11-libs/libXdmcp
	x11-libs/libXpm"
DEPEND="${RDEPEND}
	x11-proto/xproto
	x11-proto/xextproto
	>=sys-apps/sed-4"

S="${WORKDIR}/${PN}-${MY_PV}.orig/${PN}"

src_unpack() {
	unpack ${A}
	cd "${WORKDIR}"

	# apply debian patch
	epatch "${PN}_${MY_PV}-${MY_PL}.diff"

	# honour Gentoo LDFLAGS, bug #335799
	sed -i "s/-o wmtime/\$(LDFLAGS) -o wmtime/" "${S}/Makefile"
}

src_compile() {
	emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || die "emake failed"
}

src_install () {
	dobin wmtime
	doman wmtime.1

	cd ..
	dodoc BUGS CHANGES HINTS README TODO

	# install sample config file, too
	dodoc debian/wmtimerc
}