/[gentoo-x86]/sys-freebsd/virtio-kmod/virtio-kmod-0.228301-r1.ebuild
Gentoo

Contents of /sys-freebsd/virtio-kmod/virtio-kmod-0.228301-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Jun 14 15:45:32 2012 UTC (2 years, 1 month ago) by ryao
Branch: MAIN
Add missing pkg_postrm() function

(Portage version: 2.1.10.49/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-freebsd/virtio-kmod/virtio-kmod-0.228301.ebuild,v 1.1 2012/05/19 20:47:29 ryao Exp $
4
5 EAPI=4
6
7 inherit bsdmk flag-o-matic
8
9 DESCRIPTION="Virtio drivers from FreeBSD Ports' emulators/virtio-kmod."
10 HOMEPAGE="http://www.freshports.org/emulators/virtio-kmod/"
11 SRC_URI="mirror://freebsd/ports/local-distfiles/kuriyama/virtio-${PV}.tar.gz"
12
13 SLOT="0"
14 KEYWORDS="~x86-fbsd ~amd64-fbsd"
15 IUSE="custom-cflags +debug"
16 LICENSE="BSD-2"
17
18 DEPEND=">=sys-freebsd/freebsd-sources-8.2"
19 RDEPEND=""
20
21 QA_TEXTRELS="*"
22 RESTRICT="strip"
23 S="${WORKDIR}"
24
25 NEEDSUBDIRS="conf contrib dev/pci geom kern net netinet netinet6 sys tools vm
26 x86 i386 amd64"
27
28 src_unpack() {
29 default
30 CPIO_ARGS="-dump"
31
32 # When hardlinks are possible, use them to avoid copies when FEATURES=userpriv
33 test $UID != 0 && export CPIO_ARGS+=l
34
35 cd /usr/src/sys/
36 for d in $NEEDSUBDIRS; do
37 find $d ! -name @ | cpio --quiet "${CPIO_ARGS}" "${WORKDIR}"
38 done
39
40 }
41
42 src_compile() {
43
44 use debug && export DEBUG_FLAGS="-g"
45 use custom-cflags || strip-flags
46 append-cflags "-I${WORKDIR}"
47
48 cd "${WORKDIR}/modules/virtio"
49 mkmake SYSDIR="${WORKDIR}" LDFLAGS="$(raw-ldflags)" || die "mkmake failed"
50
51 }
52
53 src_install() {
54 # Upstream does not provide an install target
55 dodir /boot/modules
56 cp "${WORKDIR}"/modules/virtio/*/*.ko{,.symbols} "${ED}/boot/modules"
57 }
58
59 pkg_postinst() {
60 # Update linker.hints file
61 /usr/sbin/kldxref "${EPREFIX}/boot/modules"
62
63 # Print message from FreeBSD Ports
64 elog "$(cat "${FILESDIR}/pkg-message")"
65 }
66
67 pkg_postrm() {
68 # Update linker.hints file
69 /usr/sbin/kldxref "${EPREFIX}/boot/modules"
70 }

  ViewVC Help
Powered by ViewVC 1.1.20