blob: 592e638ee3c2e68aaf9dc9a68ffe287dd72d7a1e (
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
62
63
64
65
|
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="1"
DESCRIPTION="A Qt based window manager"
HOMEPAGE="http://www.mynetcologne.de/~nc-lindenal/qlwm/
http://www.alinden.mynetcologne.de/qlwm/"
SRC_URI="http://www.alinden.mynetcologne.de/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="4"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND="dev-qt/qtgui:4
x11-libs/libX11
x11-libs/libXext"
RDEPEND="${DEPEND}"
src_unpack() {
unpack ${A}
cd "${S}"
# fix path to shared files
sed -i -e 's!^DEST .*$!DEST = /usr/share/'"${PN}-${SLOT}"'!' "Makefile" \
|| die "Cannot fix DEST variable for shared files"
# fix path to Qt4's qmake
sed -i -e 's!^QMAKE .*$!QMAKE = /usr/bin/qmake!' "Makefile" \
|| die "Cannot fix Makefile variable for qmake"
# fixing path/filename to qtconfig
sed -i -e 's!qtconfig-qt4!/usr/bin/qtconfig!' "files/menuconfig" \
|| die "Cannot fix menu entry for qtconfig"
# in the source code, fix path to config files and images
sed -i -e 's!\bCONFDIR ".*$!CONFDIR "/usr/share/'"${PN}-${SLOT}"'/files/"!' \
"src/conf.h" || die "Cannot change CONFDIR in src/conf.h"
}
src_install() {
# install binaries with slotted filenames
newbin src/qlwm qlwm-${SLOT} || die "Cannot install binary qlwm"
newbin dclock/dclock dclock-${SLOT} || die "Cannot install binary dclock"
newbin mail/biff biff-${SLOT} || die "Cannot install binary biff"
# install man page with slotted filename
newman qlwm.1 qlwm-${SLOT}.1 || die "Cannot install manual file"
# renaming defaults file
mv files/defaults.in files/defaults || die "Cannot rename default config"
# disable font name entries in default config file
sed -i -e 's!^\(\S*FontName\S*\)\b!# \1!g;
s!^\(Style \)!# \1!g' \
files/defaults || die "Cannot fix font names in default configuration"
# rename entries for dclock and biff to match $SLOT
sed -i -e 's!\S*\(dclock\|biff\)\b!/usr/bin/\1-'${SLOT}'!g' \
files/defaults || die "Cannot fix font names in default configuration"
# install config files and images
insinto /usr/share/${PN}-${SLOT}
doins -r files/ || die "Cannot install shared files"
# install documentation
dodoc README CHANGES || die "Cannot install documentation"
}
|