/[gentoo-x86]/net-misc/hamachi/hamachi-0.9.9.9_p20-r3.ebuild
Gentoo

Contents of /net-misc/hamachi/hamachi-0.9.9.9_p20-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Jul 31 09:26:18 2009 UTC (10 years, 5 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Revision bump for pebcak.
(Portage version: 2.2_rc33/cvs/Linux x86_64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/hamachi/hamachi-0.9.9.9_p20-r3.ebuild,v 1.1 2009/07/30 10:10:11 ssuominen Exp $
4
5 inherit eutils linux-info
6
7 # gHamachi GUI
8
9 MY_PV=${PV/_p/-}
10 MY_P=${PN}-${MY_PV}-lnx
11
12 DESCRIPTION="Hamachi is a secure mediated peer to peer."
13 HOMEPAGE="http://hamachi.cc"
14 LICENSE="as-is"
15 SRC_URI=" !pentium? ( http://files.hamachi.cc/linux/${MY_P}.tar.gz )
16 pentium? ( http://files.hamachi.cc/linux/${MY_P}-pentium.tar.gz )"
17 SLOT="0"
18 KEYWORDS="-* ~amd64 ~x86"
19 IUSE="pentium"
20 RESTRICT="strip mirror"
21
22 # Set workdir for both hamachi versions
23 if use pentium; then
24 S=${WORKDIR}/${MY_P}-pentium
25 else
26 S=${WORKDIR}/${MY_P}
27 fi
28
29 pkg_preinst() {
30 # Add group "hamachi" & user "hamachi"
31 enewgroup ${PN}
32 enewuser ${PN} -1 -1 /dev/null ${PN}
33 }
34
35 pkg_setup() {
36 einfo "Checking your kernel configuration for TUN/TAP support."
37 CONFIG_CHECK="TUN"
38 check_extra_config
39 }
40
41 src_unpack() {
42 # Unpack the correct Hamachi version
43 if use !pentium; then
44 unpack ${MY_P}.tar.gz
45 else
46 unpack ${MY_P}-pentium.tar.gz
47 fi
48 }
49
50 src_compile() {
51 # Compile Tuncfg
52 make -sC "${S}"/tuncfg || die "Compiling of tunecfg failed"
53 }
54
55 src_install() {
56 # Hamachi
57 einfo "Installing Hamachi"
58 insinto /usr/bin
59 insopts -m0755
60 doins hamachi
61 dosym /usr/bin/hamachi /usr/bin/hamachi-init
62
63 # Tuncfg
64 einfo "Installing Tuncfg"
65 insinto /usr/sbin
66 insopts -m0700
67 doins tuncfg/tuncfg
68
69 # Create log directory
70 dodir /var/log/${PN}
71
72 # Config files
73 einfo "Installing config files"
74 newinitd "${FILESDIR}"/tuncfg.initd.2 tuncfg
75 newconfd "${FILESDIR}"/hamachi.confd hamachi
76 newinitd "${FILESDIR}"/hamachi.initd hamachi
77
78 # Docs
79 dodoc CHANGES README LICENSE LICENSE.openssh LICENSE.openssl LICENSE.tuncfg
80
81 }
82
83 pkg_postinst() {
84 if use pentium; then
85 einfo "Remember, you set the pentium USE flag!"
86 einfo So, you installed the version for older x86 systems!
87 einfo If your CPU is greater than Intel Pentium / AMD K6,
88 einfo remove the pentium USE flag and try this version!
89 fi
90
91 if use !pentium; then
92 ewarn "If you are seeing 'illegal instruction' error when trying"
93 ewarn "to run Hamachi client, set the pentium USE flag!"
94 ewarn "It enables binaries built specifically for older"
95 ewarn "x86 platforms, like Intel Pentium or AMD K6,"
96 ewarn "with all optimizations turned off."
97 fi
98
99 einfo "To start Hamachi just type:"
100 einfo "/etc/init.d/hamachi start"
101
102 # added for bug #218481
103 einfo "If the 'hamachi' command shows no output, use the following command"
104 einfo "to extract the hamachi executable either with app-arch/upx or"
105 einfo "app-arch/upx-ucl:"
106 einfo "/opt/bin/upx -d /usr/bin/hamachi"
107 }

  ViewVC Help
Powered by ViewVC 1.1.20