summaryrefslogtreecommitdiff
blob: 4c46f26704f172f99dc11084953f699801871b1a (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-forensics/air/air-1.2.3_beta3.ebuild,v 1.1 2004/09/12 06:53:08 dragonheart Exp $

inherit eutils

DESCRIPTION="A GUI front-end to dd/dcfldd"
HOMEPAGE="http://air-imager.sourceforge.net/"
MY_P=${P/_/-}
SRC_URI="mirror://sourceforge/air-imager/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"
IUSE=""

DEPEND="dev-perl/perl-tk
	app-arch/sharutils
	>=sys-apps/sed-4"
RDEPEND="app-arch/mt-st
	dev-lang/perl"

src_unpack() {
	#The tarball doesn't have a directory
	mkdir ${S}
	cd ${S}
	unpack ${A}
	epatch ${FILESDIR}/${P}-installfix.patch

	#sandbox installer
	sed -i -e "s!INSTALL_DIR=\"/usr\"!INSTALL_DIR=\"${D}/usr\"!" \
		-e "s!TEMP_DIR=\"/tmp\"!TEMP_DIR=\"${T}\"!" \
		install-${MY_P}
}

src_install() {
	dodir "/usr/bin"
	cd ${S}
	/bin/sh install-${MY_P}
	dodoc README

	cd ${D}/usr/bin
	#/usr/bin/air has hardcoded paths we need to fix
	sed -i -e "s!bitmap_dir=\"/usr/local!bitmap_dir=\"/usr!" \
		-e "s!air_log_dir = \"/usr/local!air_log_dir = \"/usr!" \
		-e "s!air_fifo = \"/usr/local!air_fifo = \"/usr!" \
	  	-e "s!-col !-column !" \
		-e "s!-col=!-column=!" \
		air

	mkfifo ${D}/usr/share/air/air-fifo
	chown -R root:root ${D}
	fowners root:users /usr/share/air/logs/
	fperms ug+rwx /usr/share/air/logs/ /usr/share/air/air-fifo
}