1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils toolchain-funcs
9 DESCRIPTION="A Qt based window manager"
10 HOMEPAGE="http://www.mynetcologne.de/~nc-lindenal/qlwm/
11 http://www.alinden.mynetcologne.de/qlwm/"
12 SRC_URI="http://www.alinden.mynetcologne.de/${PN}/${P}.tar.gz"
25 # fix path to shared files
26 sed -i -e 's!^DEST .*$!DEST = /usr/share/'"${PN}-${SLOT}"'!' "Makefile" \
27 || die "Cannot fix DEST variable for shared files"
28 # in the source code, fix path to config files and images
29 sed -i -e 's!\bCONFDIR ".*$!CONFDIR "/usr/share/'"${PN}-${SLOT}"'/files/"!' \
30 "src/conf.h" || die "Cannot change CONFDIR in src/conf.h"
31 # fixing path/filename to qtconfig
32 sed -i -e 's!qtconfig!/usr/qt/3/bin/qtconfig!' "files/menuconfig" \
33 || die "Cannot fix menu entry for qtconfig"
35 epatch "${FILESDIR}/${PN}-3-Makefiles.patch"
39 emake CXX=$(tc-getCXX) || die "emake failed"
43 # install binaries with slotted filenames
44 newbin src/qlwm qlwm-${SLOT} || die "Cannot install binary qlwm"
45 newbin dclock/dclock dclock-${SLOT} || die "Cannot install binary dclock"
46 newbin mail/biff biff-${SLOT} || die "Cannot install binary dclock"
48 # install man page with slotted filename
49 newman qlwm.1 qlwm-${SLOT}.1 || die "Cannot install manual file"
51 # renaming defaults file
52 mv files/defaults.in files/defaults || die "Cannot rename default config"
53 # disable font name entries in default config file
54 sed -i -e 's!^\(\S*FontName\S*\)\b!# \1!g;
55 s!^\(Style \)!# \1!g' \
56 files/defaults || die "Cannot fix font names in default configuration"
57 # rename entries for dclock and biff to match $SLOT
58 sed -i -e 's!\S*\(dclock\|biff\)\b!/usr/bin/\1-'${SLOT}'!g' \
59 files/defaults || die "Cannot fix font names in default configuration"
61 # install config files and images
62 insinto /usr/share/${PN}-${SLOT}
63 doins -r files/ || die "Cannot install shared files"
65 # install documentation
66 dodoc README CHANGES || die "Cannot install documentation"