Sunday, May 21, 2006

Gentoo-sources + Reiser4 + Software Suspend 2

The ebuild is based on gentoo-sources-2.6.16-r7, but I've removed the ultra1, sparc stuff. I call it r4sus2-gentoo-sources. To install:
# mkdir -p /usr/local/portage/sys-kernel/r4sus2-gentoo-sources

Copy the following r4sus2-gentoo-sources-2.6.16.ebuild to the directory just created:

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

ETYPE="sources"
K_WANT_GENPATCHES="base extras"
K_GENPATCHES_VER="9"
R4V="-2"
inherit kernel-2
detect_version
detect_arch

KEYWORDS="~amd64 ~x86"
HOMEPAGE="http://dev.gentoo.org/~dsd/genpatches http://www.suspend2.net http://www.namesys.com/v4/v4.html"

DESCRIPTION="Full sources including the Gentoo patchset, Software Suspend 2 and the Reiser4 patchset"

SUSPEND2_VERSION="2.2.5"
SUSPEND2_TARGET="2.6.16.9"
SUSPEND2_SRC="suspend2-${SUSPEND2_VERSION}-for-${SUSPEND2_TARGET}"
SUSPEND2_URI="http://www.suspend2.net/downloads/all/${SUSPEND2_SRC}.tar.bz2"

UNIPATCH_LIST="${DISTDIR}/${SUSPEND2_SRC}.tar.bz2 ${DISTDIR}/reiser4-for-${PV}${R4V}.patch.gz"
UNIPATCH_STRICTORDER="yes"

RDEPEND="${RDEPEND}
>=sys-apps/suspend2-userui-0.6.1
>=sys-power/hibernate-script-1.12"

SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ${SUSPEND2_URI} ftp://ftp.namesys.com/pub/reiser4-for-${KV_MAJOR}.${KV_MINOR}/${PV}/reiser4-for-${PV}${R4V}.patch.gz"

pkg_postinst() {
postinst_sources

echo

einfo "For more info on this patchset, and how to report problems, see:"
einfo "${HOMEPAGE}"
}


Then
# echo 'sys-kernel/r4sus2-gentoo-sources ~x86' >> /etc/portage/package.keywords
# ebuild /usr/local/portage/sys-kernel/r4sus2-gentoo-sources/r4sus2-gentoo-sources-2.6.16.ebuild digest
# USE="symlink" emerge -av r4sus2-gentoo-sources

If you just want Reiser4, don't want Software Suspend 2, you can change the ebuild to the following:

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

ETYPE="sources"
K_WANT_GENPATCHES="base extras"
K_GENPATCHES_VER="9"
R4V="-2"
inherit kernel-2
detect_version
detect_arch

KEYWORDS="~amd64 ~x86"
HOMEPAGE="http://dev.gentoo.org/~dsd/genpatches http://www.namesys.com/v4/v4.html"

DESCRIPTION="Full sources including the Gentoo patchset and the Reiser4 patchset"

UNIPATCH_LIST="${DISTDIR}/reiser4-for-${PV}${R4V}.patch.gz"

SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ftp://ftp.namesys.com/pub/reiser4-for-${KV_MAJOR}.${KV_MINOR}/${PV}/reiser4-for-${PV}${R4V}.patch.gz"

pkg_postinst() {
postinst_sources

echo

einfo "For more info on this patchset, and how to report problems, see:"
einfo "${HOMEPAGE}"
}