Permalink
Browse files

ubuntu-sources ebuild based on 12.04 LTS, masked

  • Loading branch information...
1 parent 9ab6be4 commit 9500163b4a5b9be5f52e5e97eb4bafb05ae45a36 @angryvincent angryvincent committed Apr 30, 2012
@@ -1,4 +1,9 @@
# Martin Scholz (13 Apr 2012)
+# Oleg Vinichenko ( 30 Apr 2012)
+# new ubuntu-sources ebuild for desktop users
+# based on Ubuntu 12.04 LTS, hardmasked for testing
+>=sys-kernel/ubuntu-sources-3.2.0.23.36
+
# new nginx 1.1.7 - 1.1.14 for removal at 30 Apr. 2012 till then all versions
# up to 1.1.14 will stay stable, 1.1.15 is stabilized with that push and
# versions up to 1.1.18 have the mp4 added, so please report build errors
@@ -1,4 +1,5 @@
DIST linux-2.6.32.tar.bz2 64424138 RMD160 b93742cbaf8174f2200d2dbef0d47a26c618039c SHA1 410b4fc818023bfef60064e973ff0ab46d3bfb19 SHA256 5099786d80b8407d98a619df00209c2353517f22d804fdd9533b362adcb4504e
DIST linux-2.6.35.tar.bz2 69305709 RMD160 f5d91abb4fa72fac812578d830b22180d85a0e6f SHA1 4cb1fbfbeedcd658ca37739679c65dfaa136bf4e SHA256 18b2e2c336032e366c942622b77302cb05fc034fb19018f086a4ebc9ed41bfcf
DIST linux_2.6.32-32.62.diff.gz 5241290 RMD160 d17374f8ce7bb39ed27b060f3d78db0a87397a1a SHA1 f1a5bf8d3ebdf5db228b2a952d592c2e123cd5c4 SHA256 5f3650f80d55ed0ae5d3e9d5362284e636687cdd6f868fde747a3c6e7528be4c
+DIST linux_2.6.32-41.88.diff.gz 5508432 RMD160 b874398f49a75167a27221a8682c3705a3528db7 SHA1 a88dc633407ffb7e10ba0ad7bbcfb5ed814e8c03 SHA256 72e767261f25a2dc9a6d5a967861a5b5fefea28e6741a72770df1ce9dbb4760c
DIST linux_2.6.35-28.50.diff.gz 3770041 RMD160 4a549c5581532c6e5c8c27421be82cf7e80876a2 SHA1 48ef6a4da5a5cdf25ef9cab27dc421ae87015b4a SHA256 7be4f4890ab9701ecf05c67f4d09f3eb936ba8478106b6bef3f558f7aa49d8dc
@@ -0,0 +1,23 @@
+diff -urN linux-2.6.32/Makefile linux-2.6.32.gcc//Makefile
+--- linux-2.6.32/Makefile 2011-12-27 01:18:30.858772823 +0000
++++ linux-2.6.32.gcc//Makefile 2011-12-27 01:19:47.321762282 +0000
+@@ -219,8 +219,8 @@
+ else if [ -x /bin/bash ]; then echo /bin/bash; \
+ else echo sh; fi ; fi)
+
+-HOSTCC = gcc
+-HOSTCXX = g++
++HOSTCC = gcc-4.4.5
++HOSTCXX = g++-4.4.5
+ HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
+ HOSTCXXFLAGS = -O2
+
+@@ -306,7 +306,7 @@
+
+ AS = $(CROSS_COMPILE)as
+ LD = $(CROSS_COMPILE)ld
+-CC = $(CROSS_COMPILE)gcc
++CC = $(CROSS_COMPILE)gcc-4.4.5
+ CPP = $(CC) -E
+ AR = $(CROSS_COMPILE)ar
+ NM = $(CROSS_COMPILE)nm
@@ -0,0 +1,150 @@
+# Copyright 2011 Funtoo Technologies
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit mount-boot
+
+SLOT=$PVR
+CKV=2.6.32
+KV_FULL=${PN}-${PVR}
+EXTRAVERSION=-41.88
+KERNEL_ARCHIVE="linux-${CKV}.tar.bz2"
+KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/${KERNEL_ARCHIVE}"
+RESTRICT="binchecks strip"
+
+LICENSE="GPL-2"
+KEYWORDS="*"
+IUSE="binary"
+DEPEND="binary? ( >=sys-kernel/genkernel-3.4.12.6-r4 ) =sys-devel/gcc-4.4.5*"
+RDEPEND="binary? ( >=sys-fs/udev-160 )"
+DESCRIPTION="Ubuntu Server sources (and optional binary kernel)"
+HOMEPAGE="http://www.openvz.org"
+MAINPATCH="linux_${CKV}${EXTRAVERSION}.diff.gz"
+SRC_URI="${KERNEL_URI} http://archive.ubuntu.com/ubuntu/pool/main/l/linux/${MAINPATCH}"
+S="$WORKDIR/linux-${CKV}"
+
+src_unpack() {
+ unpack ${KERNEL_ARCHIVE}
+}
+
+apply() {
+ p=$1; shift
+ case "${p##*.}" in
+ gz)
+ ca="gzip -dc"
+ ;;
+ bz2)
+ ca="bzip2 -dc"
+ ;;
+ xz)
+ ca="xz -dc"
+ ;;
+ *)
+ ca="cat"
+ ;;
+ esac
+ [ ! -e $p ] && die "patch $p not found"
+ echo "Applying patch $p"; $ca $p | patch $* || die "patch $p failed"
+}
+
+pkg_setup() {
+ case $ARCH in
+ x86)
+ defconfig_src=i386-config.flavour.generic-pae-full
+ ;;
+ amd64)
+ defconfig_src=amd64-config.flavour.server-full
+ ;;
+ *)
+ die "unsupported ARCH: $ARCH"
+ ;;
+ esac
+ defconfig_src="${S}/configs/${defconfig_src}"
+ unset ARCH; unset LDFLAGS #will interfere with Makefile if set
+}
+
+src_prepare() {
+ apply $DISTDIR/$MAINPATCH -p1
+ apply $FILESDIR/$PVR/gcc-4.4.5.patch -p1
+
+ sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" Makefile || die
+ sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' Makefile || die
+ rm -f .config >/dev/null
+
+ # Ubuntu:
+
+ chmod +x debian/scripts/config-check || die
+ chmod +x debian/scripts/misc/splitconfig.pl || die
+ chmod +x debian/scripts/misc/kernelconfig || die
+ install -d ${TEMP}/configs || die
+ sed -i -e 's:^tmpdir=.*$:tmpdir=$TEMP/configs:' debian/scripts/misc/kernelconfig || die
+
+ DROOT="debian" debian/scripts/misc/kernelconfig defaultconfig || die
+
+ make -s mrproper || die "make mrproper failed"
+ make -s include/linux/version.h || die "make include/linux/version.h failed"
+
+ mv "${TEMP}/configs" "${S}" || die
+}
+
+src_compile() {
+ ! use binary && return
+ install -d ${WORKDIR}/out/{lib,boot}
+ install -d ${T}/{cache,twork}
+ install -d $WORKDIR/build $WORKDIR/out/lib/firmware
+ DEFAULT_KERNEL_SOURCE="${S}" CMD_KERNEL_DIR="${S}" genkernel ${GKARGS} \
+ --no-save-config \
+ --kernel-config="$defconfig_src" \
+ --kernname="${PN}" \
+ --build-src="$S" \
+ --build-dst=${WORKDIR}/build \
+ --makeopts="${MAKEOPTS}" \
+ --firmware-dst=${WORKDIR}/out/lib/firmware \
+ --cachedir="${T}/cache" \
+ --tempdir="${T}/twork" \
+ --logfile="${WORKDIR}/genkernel.log" \
+ --bootdir="${WORKDIR}/out/boot" \
+ --lvm \
+ --luks \
+ --iscsi \
+ --module-prefix="${WORKDIR}/out" \
+ all || die "genkernel failed"
+}
+
+src_install() {
+ # copy sources into place:
+ dodir /usr/src
+ cp -a ${S} ${D}/usr/src/linux-${P} || die
+ cd ${D}/usr/src/linux-${P}
+ # prepare for real-world use and 3rd-party module building:
+ make mrproper || die
+ cp $defconfig_src .config || die
+ yes "" | make oldconfig || die
+ # if we didn't use genkernel, we're done. The kernel source tree is left in
+ # an unconfigured state - you can't compile 3rd-party modules against it yet.
+ use binary || return
+ make prepare || die
+ make scripts || die
+ # OK, now the source tree is configured to allow 3rd-party modules to be
+ # built against it, since we want that to work since we have a binary kernel
+ # built.
+ cp -a ${WORKDIR}/out/* ${D}/ || die "couldn't copy output files into place"
+ # module symlink fixup:
+ rm -f ${D}/lib/modules/*/source || die
+ rm -f ${D}/lib/modules/*/build || die
+ cd ${D}/lib/modules
+ # module strip:
+ find -iname *.ko -exec strip --strip-debug {} \;
+ # back to the symlink fixup:
+ local moddir="$(ls -d 2*)"
+ ln -s /usr/src/linux-${P} ${D}/lib/modules/${moddir}/source || die
+ ln -s /usr/src/linux-${P} ${D}/lib/modules/${moddir}/build || die
+}
+
+pkg_postinst() {
+ if [ ! -e ${ROOT}usr/src/linux ]
+ then
+ ln -s linux-${P} ${ROOT}usr/src/linux
+ fi
+}
@@ -0,0 +1,4 @@
+DIST amd64-config.flavour.generic 140236 RMD160 25fbe027cc0dae17a92bf7769e916e1385273c7b SHA1 da694dd3f57549f13f9f6b0b2be95cda7ff1d233 SHA256 49f96039ecb23843e311a24ad54e39153a71fa19ff3d62c6404011d9f6520a2b
+DIST i386-config.flavour.generic 147273 RMD160 5076da70fce4aaa94b15ac1463e7723b6d8f3394 SHA1 89d6b406177fda1adfb5394c25db97bd44ce74ba SHA256 d04f836cf4763aa72b9ad909eb17b0ef0542a785c00d51c9bf22b384414936b0
+DIST linux_3.2.0-23.36.diff.gz 2714337 RMD160 91815ab4149bf32e8f9b93edd6cac5e99dd38b6a SHA1 cb28244161c6c84c3653687a8bc1d55ea324b3b7 SHA256 d2b25969a7c7bae406e47be1c0fd52090ddd9ffdde723d66195dbd45bd123ffd
+DIST linux_3.2.0.orig.tar.gz 98621205 RMD160 abb746f30967a16290a881ed423f6cdb3a901297 SHA1 591f0741ea1b21fa35967cb74170be9f5d3e62d9 SHA256 ac093c899c5f967fc71816fbd18ca3f73673e64d2a99253bcbc2570c91527f7e
@@ -0,0 +1,6 @@
+<pkgmetadata>
+<herd>funtoo</herd>
+<maintainer>
+ <email>funtoo-dev@googlegroups.com</email>
+</maintainer>
+</pkgmetadata>
@@ -0,0 +1,147 @@
+# Copyright 2011 Funtoo Technologies
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit mount-boot
+
+SLOT=$PVR
+CKV=3.2.0
+KV_FULL=${PN}-${PVR}
+EXTRAVERSION=-23.36
+KERNEL_ARCHIVE="linux_${CKV}.orig.tar.gz"
+KERNEL_URI="http://archive.ubuntu.com/ubuntu/pool/main/l/linux/${KV_MAJOR}.${KV_MINOR}/${KERNEL_ARCHIVE}"
+RESTRICT="binchecks strip"
+
+LICENSE="GPL-2"
+KEYWORDS="*"
+IUSE="binary"
+DEPEND="binary? ( >=sys-kernel/genkernel-3.4.12.6-r4 )"
+RDEPEND="binary? ( >=sys-fs/udev-160 )"
+DESCRIPTION="Ubuntu Server sources (and optional binary kernel)"
+HOMEPAGE="http://www.openvz.org"
+MAINPATCH="linux_${CKV}${EXTRAVERSION}.diff.gz"
+SRC_URI="${KERNEL_URI} http://archive.ubuntu.com/ubuntu/pool/main/l/linux/${MAINPATCH}
+ http://kernel.ubuntu.com/~kernel-ppa/configs/precise/amd64-config.flavour.generic
+ http://kernel.ubuntu.com/~kernel-ppa/configs/precise/i386-config.flavour.generic"
+S="$WORKDIR/linux-3.2"
+
+src_unpack() {
+ cd ${WORKDIR}
+ unpack ${KERNEL_ARCHIVE}
+}
+
+apply() {
+ p=$1; shift
+ case "${p##*.}" in
+ gz)
+ ca="gzip -dc"
+ ;;
+ bz2)
+ ca="bzip2 -dc"
+ ;;
+ xz)
+ ca="xz -dc"
+ ;;
+ *)
+ ca="cat"
+ ;;
+ esac
+ [ ! -e $p ] && die "patch $p not found"
+ echo "Applying patch $p"; $ca $p | patch $* || die "patch $p failed"
+}
+
+pkg_setup() {
+ case $ARCH in
+ i386)
+ defconfig_src=i386
+ ;;
+ amd64)
+ defconfig_src=amd64
+ ;;
+ *)
+ die "unsupported ARCH: $ARCH"
+ ;;
+ esac
+ defconfig_src="${DISTDIR}/${defconfig_src}-config.flavour.generic"
+ unset ARCH; unset LDFLAGS #will interfere with Makefile if set
+}
+
+src_prepare() {
+ cd ${WORKDIR}/linux-3.2
+ apply $DISTDIR/$MAINPATCH -p1
+
+ sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" Makefile || die
+ sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' Makefile || die
+ rm -f .config >/dev/null
+
+ # Ubuntu:
+
+ install -d ${TEMP}/configs || die
+ make -s mrproper || die "make mrproper failed"
+ make -s include/linux/version.h || die "make include/linux/version.h failed"
+
+ mv "${TEMP}/configs" "${S}" || die
+}
+
+src_compile() {
+ ! use binary && return
+ install -d ${WORKDIR}/out/{lib,boot}
+ install -d ${T}/{cache,twork}
+ install -d $WORKDIR/build $WORKDIR/out/lib/firmware
+ DEFAULT_KERNEL_SOURCE="${S}" CMD_KERNEL_DIR="${S}" genkernel ${GKARGS} \
+ --no-save-config \
+ --kernel-config="$defconfig_src" \
+ --kernname="${PN}" \
+ --build-src="$S" \
+ --build-dst=${WORKDIR}/build \
+ --makeopts="${MAKEOPTS}" \
+ --firmware-dst=${WORKDIR}/out/lib/firmware \
+ --cachedir="${T}/cache" \
+ --tempdir="${T}/twork" \
+ --logfile="${WORKDIR}/genkernel.log" \
+ --bootdir="${WORKDIR}/out/boot" \
+ --lvm \
+ --luks \
+ --iscsi \
+ --module-prefix="${WORKDIR}/out" \
+ all || die "genkernel failed"
+}
+
+src_install() {
+ # copy sources into place:
+ dodir /usr/src
+ cp -a ${S} ${D}/usr/src/linux-${P} || die
+ cd ${D}/usr/src/linux-${P}
+ # prepare for real-world use and 3rd-party module building:
+ make mrproper || die
+ cp $defconfig_src .config || die
+ yes "" | make oldconfig || die
+ # if we didn't use genkernel, we're done. The kernel source tree is left in
+ # an unconfigured state - you can't compile 3rd-party modules against it yet.
+ use binary || return
+ make prepare || die
+ make scripts || die
+ # OK, now the source tree is configured to allow 3rd-party modules to be
+ # built against it, since we want that to work since we have a binary kernel
+ # built.
+ cp -a ${WORKDIR}/out/* ${D}/ || die "couldn't copy output files into place"
+ # module symlink fixup:
+ rm -f ${D}/lib/modules/*/source || die
+ rm -f ${D}/lib/modules/*/build || die
+ cd ${D}/lib/modules
+ # module strip:
+ find -iname *.ko -exec strip --strip-debug {} \;
+ # back to the symlink fixup:
+ local moddir="$(ls -d 2*)"
+ ln -s /usr/src/linux-${P} ${D}/lib/modules/${moddir}/source || die
+ ln -s /usr/src/linux-${P} ${D}/lib/modules/${moddir}/build || die
+}
+
+pkg_postinst() {
+ if [ ! -e ${ROOT}usr/src/linux ]
+ then
+ ln -s linux-${P} ${ROOT}usr/src/linux
+
+ fi
+}

0 comments on commit 9500163

Please sign in to comment.