| 1 |
# Copyright 1999-2004 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header$
|
| 4 |
#
|
| 5 |
# Otavio R. Piske "AngusYoung" <angusyoung@gentoo.org>
|
| 6 |
|
| 7 |
inherit eutils
|
| 8 |
|
| 9 |
ECLASS=freebsd-utils
|
| 10 |
INHERITED="$INHERITED $ECLASS"
|
| 11 |
|
| 12 |
HOMEPAGE="http://www.freebsd.org/"
|
| 13 |
SRC_URI="http://dev.gentoo.org/~angusyoung/distfiles/${P}.tar.bz2"
|
| 14 |
LICENSE="BSD"
|
| 15 |
KEYWORDS="~x86-fbsd"
|
| 16 |
IUSE=""
|
| 17 |
SLOT="0"
|
| 18 |
|
| 19 |
#unalias -a
|
| 20 |
alias make='/usr/bin/make'
|
| 21 |
alias emake='/usr/bin/make'
|
| 22 |
alias install-info='/usr/bin/bsdinstall-info'
|
| 23 |
|
| 24 |
#### unlock-file <files> ####
|
| 25 |
# Unlock a particular file using freebsd's
|
| 26 |
# chflags command.
|
| 27 |
# touches the REAL filesystem
|
| 28 |
#
|
| 29 |
#### lock-file <files> ####
|
| 30 |
# Lock a particular file using freebsd's
|
| 31 |
# chflags command.
|
| 32 |
# touches the REAL filesystem
|
| 33 |
#
|
| 34 |
#### recursive-make <dir> ####
|
| 35 |
# Run emake on all subdirs
|
| 36 |
# of <dir>
|
| 37 |
#
|
| 38 |
#### recursive-b-install <dir>
|
| 39 |
# When binaries to be installed
|
| 40 |
# have the same name of their
|
| 41 |
# parents you can use this
|
| 42 |
#d function. It runs dosbin
|
| 43 |
# and doman.
|
| 44 |
#
|
| 45 |
#### recursive-sb-install <dir>
|
| 46 |
# When binaries to be installed
|
| 47 |
# have the same name of their
|
| 48 |
# parents you can use this
|
| 49 |
# function. It runs dosbin
|
| 50 |
# and doman.
|
| 51 |
#
|
| 52 |
#############################
|
| 53 |
|
| 54 |
unlock-file() {
|
| 55 |
local FILE
|
| 56 |
|
| 57 |
ewarn
|
| 58 |
ewarn "Portage will modify flags on the following files:"
|
| 59 |
ewarn "${@}"
|
| 60 |
|
| 61 |
for FILE in "$@" ; do
|
| 62 |
if [ -f ${FILE} ]
|
| 63 |
then
|
| 64 |
chflags noschg ${FILE}
|
| 65 |
fi
|
| 66 |
done
|
| 67 |
|
| 68 |
ewarn "Done"
|
| 69 |
ewarn
|
| 70 |
return 0
|
| 71 |
}
|
| 72 |
|
| 73 |
lock-file() {
|
| 74 |
local FILE
|
| 75 |
|
| 76 |
ewarn
|
| 77 |
ewarn "Portage will modify flags on the following files:"
|
| 78 |
ewarn "${@}"
|
| 79 |
|
| 80 |
for FILE in "$@" ; do
|
| 81 |
if [ -f ${FILE} ]
|
| 82 |
then
|
| 83 |
chflags schg ${FILE}
|
| 84 |
fi
|
| 85 |
done
|
| 86 |
|
| 87 |
ewarn "Done"
|
| 88 |
ewarn
|
| 89 |
return 0
|
| 90 |
}
|
| 91 |
|
| 92 |
recursive-make() {
|
| 93 |
local DIR
|
| 94 |
|
| 95 |
if [ -d $1 ] ; then
|
| 96 |
cd $1;
|
| 97 |
else
|
| 98 |
die "Error in ebuild"
|
| 99 |
fi
|
| 100 |
|
| 101 |
for DIR in * ; do
|
| 102 |
if [ -d ${DIR} ] ; then
|
| 103 |
einfo "Entering ${DIR}"
|
| 104 |
cd ${DIR}
|
| 105 |
emake || die "Emake of ${DIR} failed"
|
| 106 |
cd ..
|
| 107 |
fi
|
| 108 |
done
|
| 109 |
return 0
|
| 110 |
}
|
| 111 |
|
| 112 |
recursive-b-install() {
|
| 113 |
local DIR
|
| 114 |
|
| 115 |
if [ -d $1 ] ; then
|
| 116 |
cd $1;
|
| 117 |
else
|
| 118 |
die "Error in ebuild"
|
| 119 |
fi
|
| 120 |
|
| 121 |
for DIR in * ; do
|
| 122 |
if [ -d ${DIR} ] ; then
|
| 123 |
cd ${DIR}
|
| 124 |
dobin ${DIR} || die "No binary named ${DIR}"
|
| 125 |
doman *.gz
|
| 126 |
cd ..
|
| 127 |
fi
|
| 128 |
done
|
| 129 |
return 0
|
| 130 |
}
|
| 131 |
|
| 132 |
recursive-sb-install() {
|
| 133 |
local DIR
|
| 134 |
|
| 135 |
if [ -d $1 ] ; then
|
| 136 |
cd $1;
|
| 137 |
else
|
| 138 |
die "Error in ebuild"
|
| 139 |
fi
|
| 140 |
|
| 141 |
for DIR in * ; do
|
| 142 |
if [ -d ${DIR} ] ; then
|
| 143 |
cd ${DIR}
|
| 144 |
dosbin ${DIR} || die "No binary named ${DIR}"
|
| 145 |
doman *.gz
|
| 146 |
cd ..
|
| 147 |
fi
|
| 148 |
done
|
| 149 |
return 0
|
| 150 |
}
|
| 151 |
|
| 152 |
# Consider this testing for future versions of freebsd sources ebuild
|
| 153 |
#
|
| 154 |
#freebsd-kernel-unpack() {
|
| 155 |
# # I based this piece of code from install.sh in src dir.
|
| 156 |
# einfo "Unpacking from ${DISTDIR} to ${WORKDIR}"
|
| 157 |
# cat ${DISTDIR}/ssys.?? | tar --unlink -xpzf - -C ${WORKDIR}
|
| 158 |
#}
|
| 159 |
|
| 160 |
src_compile() {
|
| 161 |
return 0
|
| 162 |
}
|