vp-build/srcpkgs/aufs2-kmod/template
Juan RP 85cc462e1d Major infrastructure changes, part 2.
* Moved helpers, common and triggers dirs into xbps-src, where
  they belong.
* Renamed the templates dir to srcpkgs, it was so redundant before.
* Make it possible to add subpkgs with no restriction in names, for
  example udev now has a subpkgs called "libgudev". Previously
  subpkgs were named "${sourcepkg}-${pkgname}".
* xbps-src: changed to look for template files in current directory.
  That means that most arguments from the targets have been removed.
* xbps-src: added a reinstall target, to remove + install.
* xbps-src: do not overwrite binpkgs by default, skip them.

And more that I forgot because it's a mega-commit that I've been
working for some days already...

--HG--
extra : convert_revision : 0f466878584d1e6895d2a234f07ea1b2d1e61b3e
2009-11-22 08:31:44 +01:00

42 lines
1.5 KiB
Plaintext

# Template file for 'aufs2-kmod'
pkgname=aufs2-kmod
version=2.6.31_20090910
wrksrc=aufs2-${version}
distfiles="ftp://ftp.archlinux.org/other/aufs2/aufs2-${version}.tar.bz2"
build_style=custom-install
short_desc="Another UnionFS Implementation for the Linux kernel"
maintainer="Juan RP <xtraeme@gmail.com>"
checksum=76725760e5d44727f861a14cfe53f7749df911b0fe1110f72585eabe8fa7983b
long_desc="
This packages provides the kernel module for aufs2, another unionfs
implementation for the Linux kernel."
Add_dependency run kernel "-2.6.31.2_1"
Add_dependency build kernel-headers "-2.6.31.2_1"
do_install()
{
local _kver kver inot64
cd ${wrksrc} || return 1
sed -i -e 's|CONFIG_AUFS_HINOTIFY =.*|CONFIG_AUFS_HINOTIFY = y|' \
-e 's|CONFIG_AUFS_EXPORT =.*|CONFIG_AUFS_EXPORT = y|' \
-e 's|CONFIG_AUFS_SHWH =.*|CONFIG_AUFS_SHWH = y|' \
-e 's|CONFIG_AUFS_BDEV_LOOP =.*|CONFIG_AUFS_BDEV_LOOP = y|' \
-e 's|CONFIG_AUFS_BR_RAMFS =.*|CONFIG_AUFS_BR_RAMFS = y|' \
-e 's|CONFIG_AUFS_DEBUG =.*|CONFIG_AUFS_DEBUG =|' \
config.mk || return 1
[ "${xbps_machine}" = "x86_64" ] && inot64="y"
sed -i "s|CONFIG_AUFS_INO_T_64 =.*|CONFIG_AUFS_INO_T_64 =${inot64}|" \
config.mk || return 1
_kver=$(basename /usr/src/kernel-headers*)
kver=$(${XBPS_PKGDB_CMD} getpkgversion ${_kver})
make KDIR=/usr/src/kernel-headers-${kver} || return 1
install -D -m644 fs/aufs/aufs.ko \
${DESTDIR}/lib/modules/${kver}/kernel/fs/aufs/aufs.ko \
|| return 1
install -D -m 644 include/linux/aufs_type.h \
${DESTDIR}/usr/src/kernel-headers-${kver}/include/linux/aufs_type.h
}