Commit 9d436863 authored by Seblu's avatar Seblu
Browse files

up linux seblu kernel


git-svn-id: https://seblu.net/s/archpkg@231 02741741-5192-46b8-8916-7152b19231d9
parent d5060497
Loading
Loading
Loading
Loading
+33 −35
Original line number Diff line number Diff line
@@ -3,20 +3,19 @@

shopt -s nullglob

pkgbase=linux-seblu
pkgname=$pkgbase
pkgver=3.3.3
kernelver=3.3.3
kernelsuf=-seblu
pkgname=linux$kernelsuf-$kernelver
pkgver=1
pkgrel=1
[[ ${pkgver##*rc} != $pkgver ]] && testing='testing'
kernelver=${pkgver//_/-}
kernelsuf=${pkgbase#linux}
[[ ${kernelver##*rc} != $kernelver ]] && testing='testing'
arch=('x86_64')
license=('GPL2')
url='http://www.kernel.org'
options=('!strip')
makedepends=('xmlto' 'docbook-xsl')
source=(
  "http://www.kernel.org/pub/linux/kernel/v3.0/$testing/linux-${kernelver}.tar.xz"
  "http://www.kernel.org/pub/linux/kernel/v3.0/$testing/linux-$kernelver.tar.xz"
  'config.x86_64'
  'config.i686'
)
@@ -31,15 +30,15 @@ build() {

  if (( NOEXTRACT == 0 )); then
    # patching sources
    for _f in ../*.patch; do
      msg2 "  Applying patch $(basename $_f)"
    for _f in "$srcdir"/*.patch; do
      msg2 "  Applying patch ${_f##*/}"
      patch -N -p1 -i "$_f"
    done

	  # loading default config
    # use make localmodconfig to check .config is correct
    msg2 'Copying config'
    install ../config.$CARCH .config
    install "$srcdir"/config.$CARCH .config

	  # removing last dot if zero
	  #sed -ri 's/^SUBLEVEL = 0$/SUBLEVEL =/' Makefile
@@ -47,14 +46,14 @@ build() {

	# updating suffixe in config (must be the right!)
	msg2 'Setting kernel suffix'
	sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${kernelsuf}\"|g" .config
	sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"$kernelsuf\"|g" .config

  # define current build version
  echo $((pkgrel - 1)) > .version
  echo $((pkgver - 1)) > .version

  # Preapre compilation
  msg2 "Preparing compilation"
  yes "" | make config &>/dev/null
  msg2 'Preparing compilation'
  yes '' | make config &>/dev/null
  nice -n 19 make prepare &>/dev/null
  cpucount=$(grep -c processor /proc/cpuinfo 2>/dev/null)
  jc=$((${cpucount:-1}))
@@ -68,10 +67,9 @@ package() {
  cd linux-$kernelver
  # get real compiled kernel version
  compver=$(make kernelrelease)
  pkgname=linux-${compver}
  pkgdesc="The Linux Kernel, version $compver"
  provides=('linux' 'linux-headers' 'linux-docs')
  depends=('coreutils' 'linux-firmware' 'module-init-tools' 'mkinitcpio')
  depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio')
  install='install'

  sed -ri "s/pkgname=.*/pkgname='$pkgname'/" "$startdir/install"
@@ -81,34 +79,34 @@ package() {
  make INSTALL_MOD_PATH="$pkgdir" modules_install

  # install kernel and map
  cp arch/x86/boot/bzImage "$pkgdir/boot/kernel-${compver}"
  cp arch/x86/boot/bzImage "$pkgdir/boot/kernel-$compver"

  # install mkinitcpio preset file for kernel
  install -d "${pkgdir}/etc/mkinitcpio.d/"
  cat > "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset" << EOF 
# mkinitcpio preset file for ${pkgname}
  install -d "$pkgdir/etc/mkinitcpio.d/"
  cat > "$pkgdir/etc/mkinitcpio.d/$pkgname.preset" << EOF
# mkinitcpio preset file for $pkgname

ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/kernel-${compver}"
ALL_kver="/boot/kernel-$compver"

PRESETS=('default' 'fallback')

#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-${compver}.img"
default_image="/boot/initramfs-$compver.img"
#default_options=""

#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-${compver}-fallback.img"
fallback_image="/boot/initramfs-$compver-fallback.img"
fallback_options="-S autodetect"
EOF

  # setup current version package (used by install script)
  install -d "${pkgdir}/usr/share/${pkgname}"
  cat > "${pkgdir}/usr/share/${pkgname}/info" << EOF
KERNEL_NAME=${pkgname}
KERNEL_VERSION=${kernelver}
KERNEL_SUFFIX=${kernelsuf}
KERNEL_BUILD=${compver}
  install -d "$pkgdir/usr/share/$pkgname"
  cat > "$pkgdir/usr/share/$pkgname/info" << EOF
KERNEL_NAME=$pkgname
KERNEL_VERSION=$kernelver
KERNEL_SUFFIX=$kernelsuf
KERNEL_BUILD=$compver
EOF

  # remove build and source links

configs/x86_64-3.0

0 → 100644
+4889 −0

File added.

Preview size limit exceeded, changes collapsed.

configs/x86_64-3.1

0 → 100644
+4966 −0

File added.

Preview size limit exceeded, changes collapsed.

configs/x86_64-3.2

0 → 100644
+5001 −0

File added.

Preview size limit exceeded, changes collapsed.

+0 −0

File moved.

Loading