2008-10-28 05:02:24 +01:00
|
|
|
# Template file for 'initramfs-tools'
|
|
|
|
pkgname=initramfs-tools
|
2012-03-09 00:02:53 +01:00
|
|
|
_localver=119 # This is the XBPS version
|
2011-07-22 09:14:02 +02:00
|
|
|
_distver=0.99 # This should match debian version
|
|
|
|
version=${_distver}.${_localver}
|
2008-10-28 05:02:24 +01:00
|
|
|
short_desc="Tools for generating an initramfs"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2011-07-17 01:19:36 +02:00
|
|
|
homepage="http://code.google.com/p/xbps"
|
2011-07-10 00:02:10 +02:00
|
|
|
license="GPL-2"
|
2008-10-28 05:02:24 +01:00
|
|
|
long_desc="
|
2011-07-22 09:14:02 +02:00
|
|
|
This package contains tools to create and boot an initramfs for packaged
|
2008-10-28 05:02:24 +01:00
|
|
|
Linux kernel. The initramfs is a gzipped cpio archive. At boot time, the
|
|
|
|
kernel unpacks that archive into RAM, mounts and uses it as initial root
|
|
|
|
file system. The mounting of the real root file system occurs in early user
|
2012-01-13 15:10:43 +01:00
|
|
|
space. Any boot loader with initrd support is able to load an
|
|
|
|
initramfs archive."
|
2008-10-28 05:02:24 +01:00
|
|
|
|
2009-10-17 16:12:12 +02:00
|
|
|
noextract=yes
|
2009-02-15 23:57:15 +01:00
|
|
|
noarch=yes
|
2009-10-08 16:57:13 +02:00
|
|
|
triggers="initramfs-tools"
|
2010-05-06 02:36:18 +02:00
|
|
|
conf_files="
|
|
|
|
/etc/$pkgname/initramfs.conf
|
|
|
|
/etc/$pkgname/update-initramfs.conf
|
|
|
|
/etc/$pkgname/modules"
|
2009-02-25 06:15:20 +01:00
|
|
|
|
2011-11-09 15:54:24 +01:00
|
|
|
make_dirs="
|
|
|
|
/etc/$pkgname/hooks 0755 0 0
|
|
|
|
/etc/$pkgname/conf.d 0755 0 0
|
|
|
|
/etc/$pkgname/scripts/init-bottom 0755 0 0
|
|
|
|
/etc/$pkgname/scripts/init-premount 0755 0 0
|
|
|
|
/etc/$pkgname/scripts/init-top 0755 0 0
|
|
|
|
/etc/$pkgname/scripts/local-bottom 0755 0 0
|
|
|
|
/etc/$pkgname/scripts/local-top 0755 0 0
|
|
|
|
/usr/share/$pkgname/conf.d 0755 0 0
|
|
|
|
/usr/share/$pkgname/hooksconf.d 0755 0 0
|
|
|
|
/usr/share/$pkgname/modules.d 0755 0 0
|
|
|
|
/usr/share/$pkgname/scripts/init-premount 0755 0 0
|
|
|
|
/usr/share/$pkgname/scripts/local-top 0755 0 0
|
|
|
|
/var/lib/$pkgname 0755 0 0
|
|
|
|
"
|
|
|
|
|
2009-02-25 06:15:20 +01:00
|
|
|
Add_dependency full cpio
|
2011-01-11 14:46:44 +01:00
|
|
|
Add_dependency full util-linux
|
2009-02-25 06:15:20 +01:00
|
|
|
Add_dependency full gawk
|
|
|
|
Add_dependency full findutils
|
|
|
|
Add_dependency full sed
|
|
|
|
Add_dependency full grep
|
|
|
|
Add_dependency full gzip
|
2010-02-20 04:06:10 +01:00
|
|
|
Add_dependency full bzip2
|
|
|
|
Add_dependency full xz
|
2009-06-20 18:52:27 +02:00
|
|
|
Add_dependency full udev
|
2011-10-12 21:22:25 +02:00
|
|
|
Add_dependency full busybox ">=1.19.2" # loadkmap
|
2010-02-19 06:44:50 +01:00
|
|
|
Add_dependency full klibc-resume
|
2012-03-07 00:32:46 +01:00
|
|
|
Add_dependency full kbd ">=1.15.3_5" # switch to /usr.
|
|
|
|
Add_dependency full kmod
|
2008-10-28 05:02:24 +01:00
|
|
|
|
2012-03-07 00:32:46 +01:00
|
|
|
do_install() {
|
2008-10-28 05:02:24 +01:00
|
|
|
# /etc config files
|
2011-11-09 15:54:24 +01:00
|
|
|
vinstall $FILESDIR/conf/initramfs.conf 644 etc/$pkgname
|
|
|
|
vinstall $FILESDIR/conf/update-initramfs.conf 644 etc/$pkgname
|
2008-10-28 05:02:24 +01:00
|
|
|
|
|
|
|
# Data
|
2011-11-09 15:54:24 +01:00
|
|
|
vinstall $FILESDIR/init 744 usr/share/$pkgname
|
2012-01-13 15:10:43 +01:00
|
|
|
for f in functions local; do
|
2011-11-09 15:54:24 +01:00
|
|
|
vinstall $FILESDIR/scripts/$f 644 usr/share/$pkgname/scripts
|
2008-12-14 05:25:55 +01:00
|
|
|
done
|
2011-11-09 15:54:24 +01:00
|
|
|
vmkdir usr/share/$pkgname/scripts/init-top
|
|
|
|
install -m755 $FILESDIR/scripts/init-top/* \
|
2009-03-11 06:31:56 +01:00
|
|
|
$DESTDIR/usr/share/$pkgname/scripts/init-top
|
2011-11-09 15:54:24 +01:00
|
|
|
vmkdir usr/share/$pkgname/scripts/local-premount
|
|
|
|
install -m755 $FILESDIR/scripts/local-premount/* \
|
2009-03-11 06:31:56 +01:00
|
|
|
$DESTDIR/usr/share/$pkgname/scripts/local-premount
|
2011-11-09 15:54:24 +01:00
|
|
|
vmkdir usr/share/$pkgname/hooks
|
|
|
|
install -m755 $FILESDIR/hooks/* $DESTDIR/usr/share/$pkgname/hooks
|
|
|
|
install -m644 $FILESDIR/hook-functions $DESTDIR/usr/share/$pkgname
|
|
|
|
vinstall $FILESDIR/conf/modules 644 etc/$pkgname
|
2008-10-28 05:02:24 +01:00
|
|
|
|
|
|
|
# Examples
|
2011-11-09 15:54:24 +01:00
|
|
|
vmkdir usr/share/doc/$pkgname/examples
|
|
|
|
install -m644 $FILESDIR/docs/* $DESTDIR/usr/share/doc/$pkgname/examples
|
2008-10-28 05:02:24 +01:00
|
|
|
|
|
|
|
# Manpages
|
2011-11-09 15:54:24 +01:00
|
|
|
vmkdir usr/share/man/man5
|
2009-10-09 03:11:09 +02:00
|
|
|
install -m 644 $FILESDIR/*.5 $DESTDIR/usr/share/man/man5
|
2011-11-09 15:54:24 +01:00
|
|
|
vmkdir usr/share/man/man8
|
2009-10-09 03:11:09 +02:00
|
|
|
install -m 644 $FILESDIR/*.8 $DESTDIR/usr/share/man/man8
|
2008-10-28 05:02:24 +01:00
|
|
|
|
|
|
|
# Scripts
|
2011-11-09 15:54:24 +01:00
|
|
|
vmkdir usr/sbin
|
2009-10-09 03:11:09 +02:00
|
|
|
install -m 755 $FILESDIR/mkinitramfs $DESTDIR/usr/sbin
|
|
|
|
install -m 755 $FILESDIR/update-initramfs $DESTDIR/usr/sbin
|
2010-02-25 04:07:57 +01:00
|
|
|
sed -i -e "s|@VERSION@|${version}|g" $DESTDIR/usr/sbin/update-initramfs
|
2011-02-13 17:43:18 +01:00
|
|
|
|
|
|
|
# bash_completion.d
|
2011-11-09 15:54:24 +01:00
|
|
|
install -Dm644 $FILESDIR/bash_completion.d/initramfs-tools \
|
2011-02-13 17:43:18 +01:00
|
|
|
${DESTDIR}/etc/bash_completion.d/initramfs-tools
|
2011-07-10 00:02:10 +02:00
|
|
|
|
|
|
|
# Kernel hooks
|
|
|
|
vinstall ${FILESDIR}/kernel.d/${pkgname}.postinst \
|
|
|
|
755 etc/kernel.d/post-install 10-${pkgname}
|
|
|
|
vinstall ${FILESDIR}/kernel.d/${pkgname}.postrm \
|
|
|
|
755 etc/kernel.d/post-remove 10-${pkgname}
|
2008-10-28 05:02:24 +01:00
|
|
|
}
|