updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / unifiedkernel / PKGBUILD
blob9822ae94672ac1f257573769042823fb8a63da81
1 # Archlive <http://archlive-pkg.googlecode.com>
3 #  Transfer unifiedkernel ubuntu package to Arch
5 pkgname=unifiedkernel
6 pkgver=0.3.0
7 pkgrel=1
8 ##############################
9 #  CUSTOMIZATION
10 _base_kver=2.6.34
11 _kernver=${_base_kver}-uk-${pkgver}
13 kver_file=unifiedkernel.kver
14 preset_file=unifiedkernel.preset
15 kernel_name=vmlinuz-${_kernver}
16 default_img=unifiedkernel.img
17 fallback_img=unifiedkernel-fallback.img
18 install_file=kernel26.install
19 ##############################
20 [ "${install_file}" != "kernel26.install" ] && cp -f $startdir/kernel26.install $startdir/${install_file}
21 url="http://www.longene.org/"
22 pkgdesc="The Linux Kernel and modules, with unifiedkernel patch and module"
23 arch=('i686')
24 license=('GPL2')
25 depends=('coreutils' 'module-init-tools' 'mkinitcpio>=0.5.15')
26 makedepends=('binutils')
27 backup=()
28 provides=("kernel26=${_base_kver}" "kernel26-headers=${_base_kver}" "kernel26-firmware=${_base_kver}")
29 conflicts=('kernel24' 'kernel24-scsi' 'kernel26-scsi')
30 install=${install_file}
31 source=(
32         $pkgname-$pkgver-kernel.deb::"http://www.longene.org/fileDownload.php?id=57&page=download"
33         # source code
34         # longene-0.3.0.tar.bz2::"http://www.longene.org/fileDownload.php?id=49&page=download"
35         # Full source 2.6.24
36         # longene-0.3.0-linux-2.6.24.tar.bz2::"http://www.longene.org/fileDownload.php?id=56&page=download"
37         unifiedkerneld
38         )
39 md5sums=()
41 build()
43         cd $srcdir
44         ar x $pkgname-$pkgver-kernel.deb
45         tar -xpf data.tar.gz -C $pkgdir/
46         rm -rf $pkgdir/etc
48         msg2 "Updating module dependencies..."
49         depmod -a -b $pkgdir ${_kernver}
51         msg2 "Installing rc scripts"
52         install -Dm755 $startdir/unifiedkerneld $pkgdir/etc/rc.d/unifiedkerneld
54         mkdir -p $pkgdir/etc/mkinitcpio.d
56         msg2 "Generating ${kver_file}..."
57         echo -e "# DO NOT EDIT THIS FILE\nALL_kver='$_kernver'" \
58                 > "$pkgdir/etc/mkinitcpio.d/${kver_file}" || return 1
60         msg2 "Generating preset file..."
61         echo -e "# mkinitcpio preset file for $pkgname\n \
62                 \n########################################\
63                 \n# DO NOT EDIT THIS LINE:\
64                 \nsource /etc/mkinitcpio.d/${kver_file}\
65                 \n########################################\
66                 \nALL_config=\"/etc/mkinitcpio.conf\"\
67                 \n\nPRESETS=('default' 'fallback')\
68                 \n\n#default_config=\"/etc/mkinitcpio.conf\" \
69                 \ndefault_image=\"/boot/${default_img}\" \
70                 \n#default_options=\"\" \
71                 \n#fallback_config=\"/etc/mkinitcpio.conf\" \
72                 \nfallback_image=\"/boot/${fallback_img}\" \
73                 \nfallback_options=\"-S autodetect\" "\
74                 > "$pkgdir/etc/mkinitcpio.d/${preset_file}" || return 1
76         msg2 "Update install scripts..."
77         sed -i "s%pkgname=.*%pkgname=${pkgname}%g;\
78                 s%kernelname=.*%kernelname=${kernel_name}%g;\
79                 s%default_img=.*%default_img=${default_img}%g;\
80                 s%fallback_img=.*%fallback_img=${fallback_img}%g;\
81                 s%preset_file=.*%preset_file=${preset_file}%g"\
82                 $startdir/${install_file} || return 1
84 md5sums=('6ce591073b32ec52e6bde202f480a467'
85          '2e10f33b2f3552b04cd1dc63f01b6ba0')