summaryrefslogtreecommitdiff
blob: f951829d1fe49d411a1522d630adb5fc2ec32400 (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
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

MY_P="stuffit520.611linux-i386"

DESCRIPTION="Aladdin Software's StuffIt and StuffIt Expander"
HOMEPAGE="http://www.stuffit.com/"
SRC_URI="http://my.smithmicro.com/downloads/files/${MY_P}.tar.gz"

LICENSE="Stuffit"
SLOT="0"
KEYWORDS="-* amd64 x86"
IUSE=""
RESTRICT="fetch strip"

S="${WORKDIR}"

INSTALLDIR=/opt/stuffit

pkg_nofetch() {
	einfo "Please download stuffit from"
	einfo "${SRC_URI}"
	einfo "and place the file in your DISTDIR directory."
	einfo
	einfo "Note that StuffIt requires registration within 30 days,"
	einfo "but StuffIt Expander is freeware."
	einfo
}

src_install() {
	# First do the binaries
	exeinto ${INSTALLDIR}/bin
	doexe bin/stuff
	doexe bin/unstuff

	# Now the registration binary
	exeinto ${INSTALLDIR}/extra
	doexe bin/register

	# Now the documentation
	docinto stuff
	dodoc doc/stuff/{README,stuff.html}
	docinto unstuff
	dodoc doc/unstuff/{README,unstuff.html}

	# And now the man pages
	doman man/man1/*

	# Also add the executables to the path
	dodir /etc/env.d
	cat > "${T}"/10stuffit <<- EOF || die
		PATH="${EPREFIX}${INSTALLDIR}/bin"
		ROOTPATH="${EPREFIX}${INSTALLDIR}/bin"
	EOF
	doenvd "${T}"/10stuffit
}

pkg_postinst() {
	elog
	elog "Reminder: StuffIt requires registration within 30 days."
	elog "The registration program is located in ${INSTALLDIR}/extra"
	elog
	elog "The binaries are named 'stuff' and 'unstuff'"
	elog
}