summaryrefslogtreecommitdiff
blob: 85082380618e779f6050eb1589217fff92bca553 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/italc/italc-1.0.3.ebuild,v 1.2 2007/09/29 00:03:39 dirtyepic Exp $

inherit qt4 eutils autotools

DESCRIPTION="Intelligent Teaching And Learning with Computers (iTALC) supports working with computers in school"
HOMEPAGE="http://italc.sourceforge.net/"
SRC_URI="mirror://sourceforge/italc/${P}.tar.bz2"

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

IUSE="X v4l crypt xinerama threads fbcon"

DEPEND="dev-libs/lzo
	sys-apps/tcp-wrappers
	=x11-libs/wxGTK-2.6*
	media-libs/jpeg
	sys-libs/zlib
	dev-libs/openssl
	$(qt4_min_version 4)
	xinerama? ( x11-libs/libXinerama )
	X? ( x11-libs/libICE
		x11-libs/libSM
		x11-libs/libX11
		x11-libs/libXdamage
		x11-libs/libXext
		x11-libs/libXfixes
		x11-libs/libXrandr
		x11-libs/libXtst )"
RDEPEND=${DEPEND}

pkg_setup() {
	enewgroup italc
}

src_compile() {
	econf \
		"--with-qtdir=${ROOT}/usr" \
		"--with-linux" \
		"--with-uinput" \
		"--without-macosx-native" \
		$(use_with xinerama) \
		$(use_with X x) \
		$(use_with X xkeyboard) \
		$(use_with X xrandr) \
		$(use_with X xfixes) \
		$(use_with X xdamage) \
		$(use_with X xtrap) \
		$(use_with X xrecord) \
		$(use_with X dpms) \
		$(use_with v4l) \
		$(use_with fbcon fbdev) \
		$(use_with fbcon fbpm) \
		$(use_with threads pthread) \
		$(use_with crypt) \
		|| die "econf failed"
	emake || die "make failed"
}

src_install() {
	emake DESTDIR="${D}" install || die "Install failed"
	rm -r "${D}/usr/share/italc"
	dodoc TODO README AUTHORS INSTALL ChangeLog

	# -- disabled per 2007-04-04 as the icon is missing in upstream file
	# -- joke
	# Install server logo
	#newicon ima/resources/client_manager.png ${PN}.png
	#make_desktop_entry "${PN}" "iTALC Master" "${PN}.png" "Qt;KDE;Education"
}

pkg_postinst() {
	elog "On the master, please run "
	elog "# emerge --config =${CATEGORY}/${PF}"

	elog "Please add the logins of master users (teachers) to the italc group by running"
	elog "# usermod -a -G italc <loginname>"

	elog ""
}

pkg_config() {
	if [ ! -d /etc/italc/keys ] ; then
		einfo "Creating public and private keys for italc in /etc/italc/keys."
		/usr/bin/ica -role teacher -createkeypair > /dev/null
		eend $?
		einfo "Setting chmod 640 on private keys."
		chgrp -R italc /etc/italc
		chmod -R o-rwx /etc/italc/keys/private
	else
		einfo "Not creating new keypair, as /etc/italc/keys already exists"
	fi
}