summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/cloop')
-rw-r--r--sys-apps/cloop/Manifest6
-rw-r--r--sys-apps/cloop/cloop-0.68.ebuild16
-rw-r--r--sys-apps/cloop/cloop-1.0.ebuild38
3 files changed, 50 insertions, 10 deletions
diff --git a/sys-apps/cloop/Manifest b/sys-apps/cloop/Manifest
index 3c0b6058fdee..2eb2e3ee2437 100644
--- a/sys-apps/cloop/Manifest
+++ b/sys-apps/cloop/Manifest
@@ -1,5 +1,5 @@
-MD5 aee28e83d2d3a04a7c5aa432faaf0843 cloop-0.68.ebuild 1842
-MD5 b729267870d9ef122c22b9c8b7811e60 cloop-1.0.ebuild 1842
-MD5 da0aef807460a2c4bfc02d39ca257245 ChangeLog 505
+MD5 fc97b5e2afe2985fb35dc3b127e64642 cloop-0.68.ebuild 1842
+MD5 3db0f939da34558d619d860bd53d6885 cloop-1.0.ebuild 1842
+MD5 c2f7050d70e06e429c1cc8d0469cc3ee ChangeLog 505
MD5 35d772e2810697ea7458e58d4cd8dac1 files/digest-cloop-1.0 62
MD5 a2d81d30f83079df12804981e490bd8c files/digest-cloop-0.68 64
diff --git a/sys-apps/cloop/cloop-0.68.ebuild b/sys-apps/cloop/cloop-0.68.ebuild
index 350ee90ff8b0..2eac923a5b3b 100644
--- a/sys-apps/cloop/cloop-0.68.ebuild
+++ b/sys-apps/cloop/cloop-0.68.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/cloop/cloop-0.68.ebuild,v 1.2 2003/08/26 13:34:47 stuart Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/cloop/cloop-0.68.ebuild,v 1.3 2003/08/26 14:17:05 stuart Exp $
inherit kernel-mod
@@ -30,11 +30,23 @@ badversion () {
die "cloop ${PV} only works with Linux 2.4"
}
+badconfig () {
+ eerror "You have not enabled the zlib compression and/or decompression options"
+ eerror "in your Linux kernel."
+ eerror
+ eerror "You must configure both options to be compiled into your kernel; cloop"
+ eerror "will not compile if the zlib options are compiled as modules"
+ die
+}
+
src_compile() {
kernel-mod_getversion
-
[ "$KV_MAJOR" = "2" ] && [ "$KV_MINOR" != "4" ] && badversion
+ . ${KERNEL_DIR}/.config || die "kernel has not been configured yet"
+ [ "$CONFIG_ZLIB_INFLATE" != "y" ] && badconfig
+ [ "$CONFIG_ZLIB_DEFLATE" != "y" ] && badconfig
+
kernel-mod_src_compile
}
diff --git a/sys-apps/cloop/cloop-1.0.ebuild b/sys-apps/cloop/cloop-1.0.ebuild
index d2e4251dbd58..23a6493e9cd8 100644
--- a/sys-apps/cloop/cloop-1.0.ebuild
+++ b/sys-apps/cloop/cloop-1.0.ebuild
@@ -1,6 +1,8 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/cloop/cloop-1.0.ebuild,v 1.1 2003/08/25 20:33:17 stuart Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/cloop/cloop-1.0.ebuild,v 1.2 2003/08/26 14:17:05 stuart Exp $
+
+inherit kernel-mod
MY_PV="${PV}-1"
MY_P="${PN}_${MY_PV}"
@@ -13,20 +15,43 @@ KEYWORDS="~x86"
IUSE=""
DEPEND=""
-KERNEL_DIR="${KERNEL_DIR:-/usr/src/linux}"
-
# Run-time dependencies, same as DEPEND if RDEPEND isn't defined:
#RDEPEND=""
S=${WORKDIR}/${PN}-${PV}
+badversion () {
+ eerror "This version of cloop will only compile against Linux 2.4.x"
+ eerror "Please change where /usr/src/linux points to, or export the KERNEL_DIR"
+ eerror "environment variable like this:"
+ eerror
+ eerror " KERNEL_DIR=\"<dir>\" emerge cloop"
+
+ die "cloop ${PV} only works with Linux 2.4"
+}
+
+badconfig () {
+ eerror "You have not enabled the zlib compression and/or decompression options"
+ eerror "in your Linux kernel."
+ eerror
+ eerror "You must configure both options to be compiled into your kernel; cloop"
+ eerror "will not compile if the zlib options are compiled as modules"
+ die
+}
+
src_compile() {
+ kernel-mod_getversion
+ [ "$KV_MAJOR" = "2" ] && [ "$KV_MINOR" != "4" ] && badversion
+
+ . ${KERNEL_DIR}/.config || die "kernel has not been configured yet"
+ [ "$CONFIG_ZLIB_INFLATE" != "y" ] && badconfig
+ [ "$CONFIG_ZLIB_DEFLATE" != "y" ] && badconfig
- emake KERNEL_DIR=${KERNEL_DIR} || die
+ kernel-mod_src_compile
}
src_install() {
- insinto /lib/modules/misc
+ insinto /lib/modules/$KV_VERSION_FULL/misc
doins cloop.o
dobin create_compressed_fs compressloop
doman debian/create_compressed_fs.1
@@ -35,5 +60,8 @@ src_install() {
pkg_postinst () {
einfo "Adding /dev/cloop device"
+ if [ -e /dev/cloop ] ; then
+ rm -f /dev/cloop
+ fi
mknod /dev/cloop b 240 0 || die
}