/[gentoo-x86]/sys-power/nvram-wakeup/nvram-wakeup-1.1.ebuild
Gentoo

Contents of /sys-power/nvram-wakeup/nvram-wakeup-1.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Jan 6 22:48:26 2013 UTC (7 years ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Version bump #450622 by Agostino Sarubbo.

(Portage version: 2.2.0_alpha144/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-power/nvram-wakeup/nvram-wakeup-1.0.ebuild,v 1.4 2012/05/24 05:48:22 vapier Exp $
4
5 EAPI="4"
6
7 inherit flag-o-matic eutils
8
9 MY_P=${P%_p*}
10 [[ ${PV} == *_p* ]] && REV=${P#*_p} || unset REV
11 MY_P=${MY_P/e}
12 DESCRIPTION="read and write the WakeUp time in the BIOS"
13 HOMEPAGE="http://sourceforge.net/projects/nvram-wakeup"
14 SRC_URI="mirror://sourceforge/nvram-wakeup/${MY_P}.tar.gz
15 ${REV+http://nvram-wakeup.svn.sourceforge.net/viewvc/*checkout*/nvram-wakeup/trunk/nvram-wakeup/nvram-wakeup-mb.c?revision=${REV}}"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86"
20 IUSE="nls"
21 [[ -n ${REV} ]] && RESTRICT="mirror" #168114
22
23 DEPEND="nls? ( sys-devel/gettext )"
24 RDEPEND=""
25
26 S=${WORKDIR}/${MY_P}
27
28 src_unpack() {
29 unpack ${MY_P}.tar.gz
30 if [[ -n ${REV} ]] ; then
31 cp "${DISTDIR}"/nvram-wakeup-mb.c?revision=${REV} "${S}"/nvram-wakeup-mb.c || die
32 fi
33 }
34
35 src_prepare() {
36 use nls || epatch "${FILESDIR}"/${PN}-0.97-nonls.patch
37 # Need to be careful with CFLAGS since this could eat your bios
38 strip-flags
39 # GTTXT mode fix: https://sourceforge.net/tracker/?func=detail&aid=3599718&group_id=35022&atid=412757
40 sed -i \
41 -e '/^CFLAGS/s:= -O2 :+= $(CPPFLAGS) :' \
42 -e '/GTTXT/s:755:644:' \
43 Makefile || die
44 }
45
46 src_install() {
47 emake \
48 prefix="${D}"/usr \
49 MANDIR="${D}"/usr/share/man \
50 DOCDIR="${D}"/usr/share/doc/${PF} \
51 install
52
53 dodoc "${D}"/usr/bin/vdrshutdown
54 rm "${D}"/usr/bin/vdrshutdown || die
55 dodoc set_timer
56
57 rm "${D}"/usr/sbin/time || die
58 rm "${D}"/usr/share/man/man*/time.8* || die
59 }
60
61 pkg_postinst() {
62 echo
63 ewarn "WARNING:"
64 ewarn "This program writes into the NVRAM (used by BIOS to store the CMOS"
65 ewarn "settings). This is DANGEROUS. Do it at your own risk. Neither the"
66 ewarn "author of this program (nvram-wakeup) nor anyone else can be made"
67 ewarn "responsible to any damage made by this program in any way."
68 ewarn "(The worst case happened to me is that on reboot the BIOS noticed the"
69 ewarn "illegal contents of the nvram and set everything to default values."
70 ewarn "But this doesn't mean that you can't destroy even your whole computer.)"
71 echo
72 ewarn " YOU HAVE BEEN WARNED, HAVE A NICE DAY"
73 echo
74 }

  ViewVC Help
Powered by ViewVC 1.1.20