Loading PKGBUILD +22 −20 Original line number Diff line number Diff line Loading @@ -63,6 +63,9 @@ pkgname=$pkgname$kernelsuf-$kernelver # small hack to avoid makepkg to check checksum #SKIPCHECKSUMS=1 # Because kernel compilation is heavy IO process we are nice people _nice='nice -n 19' prepare() { # priorize upstream patch if [[ -e patch-$kernelver ]]; then Loading @@ -74,18 +77,18 @@ prepare() { for _f in "$srcdir"/*.patch; do [[ -r "$_f" ]] || continue msg2 "Applying patch: ${_f##*/}" patch -N -p1 -i "$_f" $_nice patch -N -p1 -i "$_f" done # loading default config # use make localmodconfig to check .config is correct msg2 'Copying config' install "$srcdir"/config.$CARCH .config install "$srcdir/config.$CARCH.$kernelver" .config # removing last dot if zero #sed -ri 's/^SUBLEVEL = 0$/SUBLEVEL =/' Makefile # updating suffixe in config (must be the right!) # force suffixe in config (must be the right!) msg2 'Setting kernel suffix' sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"$kernelsuf\"|g" .config } Loading @@ -101,14 +104,12 @@ build() { # Preapre compilation 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})) yes '' | $_nice make config &>/dev/null $_nice make prepare &>/dev/null # Compiling sources msg2 "Compiling (jobs=$jc)" nice -n 19 make -j $jc bzImage modules msg2 'Compiling' $_nice make bzImage modules } package() { Loading @@ -124,13 +125,13 @@ package() { # installing modules # disable DEPMOD because it fail due to poor hack in scripts/depmod.sh make INSTALL_MOD_PATH="$pkgdir/usr" DEPMOD=/bin/true modules_install $_nice make INSTALL_MOD_PATH="$pkgdir/usr" DEPMOD=/bin/true modules_install # do manual depmod call depmod -b "$pkgdir/usr" -- "$compver" $_nice depmod -b "$pkgdir/usr" -- "$compver" # install kernel and map install -D -m644 arch/x86/boot/bzImage "$pkgdir/boot/vmlinuz-$compver" $_nice install -D -m644 arch/x86/boot/bzImage "$pkgdir/boot/vmlinuz-$compver" # install mkinitcpio preset file for kernel install -d "$pkgdir/etc/mkinitcpio.d/" Loading Loading @@ -168,7 +169,7 @@ EOF # copy documentation install -d "$pkgdir/usr/src/linux-$compver" cp -r Documentation "$pkgdir/usr/src/linux-$compver" $_nice cp -r Documentation "$pkgdir/usr/src/linux-$compver" # copy headers copy_headers Loading @@ -178,7 +179,8 @@ EOF chmod -R u=rwX,go=rX "$pkgdir/usr/src/linux-$compver" # gzip -9 all modules to safe 100MB of space find "$pkgdir" -name '*.ko' -exec gzip -9 {} \; msg2 'Gzip modules harder' $_nice find "$pkgdir" -name '*.ko' -exec gzip -9 {} \; } copy_headers() { Loading Loading @@ -289,7 +291,7 @@ copy_headers() { cp fs/xfs/xfs_sb.h "$pkgdir/usr/src/linux-$compver/fs/xfs/xfs_sb.h" # copy in Kconfig files for i in `find . -name "Kconfig*"`; do for i in $(find . -name "Kconfig*"); do install -d "$pkgdir/usr/src/linux-$compver"/$(echo $i | sed 's|/Kconfig.*||') cp "$i" "$pkgdir/usr/src/linux-$compver/$i" done Loading @@ -298,16 +300,16 @@ copy_headers() { find "$pkgdir/usr/src/linux-$compver/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do case "$(file -bi "$binary")" in *application/x-sharedlib*) # Libraries (.so) strip $STRIP_SHARED "$binary";; $_nice strip $STRIP_SHARED "$binary";; *application/x-archive*) # Libraries (.a) strip $STRIP_STATIC "$binary";; $_nice strip $STRIP_STATIC "$binary";; *application/x-executable*) # Binaries strip $STRIP_BINARIES "$binary";; $_nice strip $STRIP_BINARIES "$binary";; esac done # remove unneeded architectures rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa} $_nice rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa} } # vim:set ts=2 sw=2 ft=sh et: install +1 −1 Original line number Diff line number Diff line # arg 1: the new package version # arg 2: the old package version pkgname='linux-seblu-3.7.2' pkgname='' post_install () { source /usr/share/$pkgname/info Loading Loading
PKGBUILD +22 −20 Original line number Diff line number Diff line Loading @@ -63,6 +63,9 @@ pkgname=$pkgname$kernelsuf-$kernelver # small hack to avoid makepkg to check checksum #SKIPCHECKSUMS=1 # Because kernel compilation is heavy IO process we are nice people _nice='nice -n 19' prepare() { # priorize upstream patch if [[ -e patch-$kernelver ]]; then Loading @@ -74,18 +77,18 @@ prepare() { for _f in "$srcdir"/*.patch; do [[ -r "$_f" ]] || continue msg2 "Applying patch: ${_f##*/}" patch -N -p1 -i "$_f" $_nice patch -N -p1 -i "$_f" done # loading default config # use make localmodconfig to check .config is correct msg2 'Copying config' install "$srcdir"/config.$CARCH .config install "$srcdir/config.$CARCH.$kernelver" .config # removing last dot if zero #sed -ri 's/^SUBLEVEL = 0$/SUBLEVEL =/' Makefile # updating suffixe in config (must be the right!) # force suffixe in config (must be the right!) msg2 'Setting kernel suffix' sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"$kernelsuf\"|g" .config } Loading @@ -101,14 +104,12 @@ build() { # Preapre compilation 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})) yes '' | $_nice make config &>/dev/null $_nice make prepare &>/dev/null # Compiling sources msg2 "Compiling (jobs=$jc)" nice -n 19 make -j $jc bzImage modules msg2 'Compiling' $_nice make bzImage modules } package() { Loading @@ -124,13 +125,13 @@ package() { # installing modules # disable DEPMOD because it fail due to poor hack in scripts/depmod.sh make INSTALL_MOD_PATH="$pkgdir/usr" DEPMOD=/bin/true modules_install $_nice make INSTALL_MOD_PATH="$pkgdir/usr" DEPMOD=/bin/true modules_install # do manual depmod call depmod -b "$pkgdir/usr" -- "$compver" $_nice depmod -b "$pkgdir/usr" -- "$compver" # install kernel and map install -D -m644 arch/x86/boot/bzImage "$pkgdir/boot/vmlinuz-$compver" $_nice install -D -m644 arch/x86/boot/bzImage "$pkgdir/boot/vmlinuz-$compver" # install mkinitcpio preset file for kernel install -d "$pkgdir/etc/mkinitcpio.d/" Loading Loading @@ -168,7 +169,7 @@ EOF # copy documentation install -d "$pkgdir/usr/src/linux-$compver" cp -r Documentation "$pkgdir/usr/src/linux-$compver" $_nice cp -r Documentation "$pkgdir/usr/src/linux-$compver" # copy headers copy_headers Loading @@ -178,7 +179,8 @@ EOF chmod -R u=rwX,go=rX "$pkgdir/usr/src/linux-$compver" # gzip -9 all modules to safe 100MB of space find "$pkgdir" -name '*.ko' -exec gzip -9 {} \; msg2 'Gzip modules harder' $_nice find "$pkgdir" -name '*.ko' -exec gzip -9 {} \; } copy_headers() { Loading Loading @@ -289,7 +291,7 @@ copy_headers() { cp fs/xfs/xfs_sb.h "$pkgdir/usr/src/linux-$compver/fs/xfs/xfs_sb.h" # copy in Kconfig files for i in `find . -name "Kconfig*"`; do for i in $(find . -name "Kconfig*"); do install -d "$pkgdir/usr/src/linux-$compver"/$(echo $i | sed 's|/Kconfig.*||') cp "$i" "$pkgdir/usr/src/linux-$compver/$i" done Loading @@ -298,16 +300,16 @@ copy_headers() { find "$pkgdir/usr/src/linux-$compver/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do case "$(file -bi "$binary")" in *application/x-sharedlib*) # Libraries (.so) strip $STRIP_SHARED "$binary";; $_nice strip $STRIP_SHARED "$binary";; *application/x-archive*) # Libraries (.a) strip $STRIP_STATIC "$binary";; $_nice strip $STRIP_STATIC "$binary";; *application/x-executable*) # Binaries strip $STRIP_BINARIES "$binary";; $_nice strip $STRIP_BINARIES "$binary";; esac done # remove unneeded architectures rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa} $_nice rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa} } # vim:set ts=2 sw=2 ft=sh et:
install +1 −1 Original line number Diff line number Diff line # arg 1: the new package version # arg 2: the old package version pkgname='linux-seblu-3.7.2' pkgname='' post_install () { source /usr/share/$pkgname/info Loading