オープンソース・ソフトウェアの開発とダウンロード

Subversion リポジトリの参照

Contents of /trunk/1.8.x/ccs-patch/specs/build-debian_squeeze.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6407 - (show annotations) (download) (as text)
Tue Apr 21 08:15:55 2015 UTC (9 years, 1 month ago) by kumaneko
File MIME type: text/x-sh
File size: 2444 byte(s)


1 #! /bin/sh
2 #
3 # This is kernel build script for debian squeeze's 2.6.32 kernel.
4 #
5
6 update_maintainer () {
7 for i in debian*/control debian*/control.stub*
8 do
9 cp -p $i $i.orig
10 sed -i -e 's/Maintainer: .*/Maintainer: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>/' -- $i
11 touch -r $i.orig $i
12 rm $i.orig
13 done
14 }
15
16 die () {
17 echo $1
18 exit 1
19 }
20
21 generate_meta_package() {
22 [ -r $1 ] || die "Can't find $1 ."
23 dpkg-deb -x $1 tmp
24 dpkg-deb -e $1 tmp/DEBIAN
25 for dir in tmp/usr/share/doc/* tmp/usr/share/bug/*
26 do
27 mv ${dir} ${dir}-ccs
28 done
29 sed -i -e 's:-686:-686-ccs:' -- tmp/DEBIAN/md5sums tmp/DEBIAN/control
30 dpkg-deb -b tmp && mv tmp.deb $2
31 rm -fR tmp
32 }
33
34 export CONCURRENCY_LEVEL=`grep -c '^processor' /proc/cpuinfo` || die "Can't export."
35
36 apt-get -y install wget zlib1g-dev debian-keyring
37
38 # Download TOMOYO Linux patches.
39 mkdir -p /root/rpmbuild/SOURCES/
40 cd /root/rpmbuild/SOURCES/ || die "Can't chdir to /root/rpmbuild/SOURCES/ ."
41 if [ ! -r ccs-patch-1.8.3-20150421.tar.gz ]
42 then
43 wget -O ccs-patch-1.8.3-20150421.tar.gz 'http://sourceforge.jp/frs/redir.php?f=/tomoyo/49684/ccs-patch-1.8.3-20150421.tar.gz' || die "Can't download patch."
44 fi
45
46 # Install kernel source packages.
47 cd /usr/src/ || die "Can't chdir to /usr/src/ ."
48 apt-get install build-essential kernel-package || die "Can't install packages."
49 apt-get install linux-source-2.6.32 || die "Can't install kernel source."
50 rm -fR linux-source-2.6.32
51 tar -jxf linux-source-2.6.32.tar.bz2
52
53 # Apply patches and create kernel config.
54 cd linux-source-2.6.32 || die "Can't chdir to linux-source-2.6.32/ ."
55 tar -zxf /root/rpmbuild/SOURCES/ccs-patch-1.8.3-20150421.tar.gz || die "Can't extract patch."
56 patch -p1 < patches/ccs-patch-2.6.32-debian-squeeze.diff || die "Can't apply patch."
57 cat /boot/config-2.6.32-5-686 config.ccs > .config || die "Can't create config."
58
59 # Start compilation.
60 make-kpkg --append-to-version -5-686-ccs --revision `sed -e 's/ /-/' version.Debian` --initrd configure || die "Failed to build kernel package."
61 update_maintainer
62 make-kpkg --append-to-version -5-686-ccs --revision `sed -e 's/ /-/' version.Debian` --initrd binary-arch || die "Failed to build kernel package."
63
64 # Generate meta packages.
65 wget http://ftp.jp.debian.org/debian/pool/main/l/linux-latest-2.6/linux-image-2.6-686_2.6.32+29_i386.deb
66 generate_meta_package linux-image-2.6-686_2.6.32+29_i386.deb linux-image-2.6-686-ccs_2.6.32+29_i386.deb
67
68 exit 0

Properties

Name Value
svn:executable *

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26