diff --git a/templates/klibc-module-init-tools/build.diff b/templates/klibc-module-init-tools/build.diff new file mode 100644 index 00000000000..e3f94277f1b --- /dev/null +++ b/templates/klibc-module-init-tools/build.diff @@ -0,0 +1,11 @@ +--- Makefile.in.orig 2009-03-08 01:47:08.023659652 +0100 ++++ Makefile.in 2009-03-08 01:48:53.801346700 +0100 +@@ -251,7 +251,7 @@ EXTRA_modinfo_SOURCES = backwards_compat + MAN5 = modprobe.conf.5 modules.dep.5 depmod.conf.5 + MAN8 = depmod.8 insmod.8 lsmod.8 rmmod.8 modprobe.8 modinfo.8 + SGML = $(addprefix doc/, $(MAN5:%.5=%.sgml) $(MAN8:%.8=%.sgml)) +-man_MANS = $(MAN5) $(MAN8) ++man_MANS = + TESTSUITE := $(shell find tests -type f ! -name '*~') tests/vg-suppressions + EXTRA_DIST = generate-modprobe.conf modprobe.devfs FAQ CODING stress_modules.sh install-with-care $(SGML) $(man_MANS) $(TESTSUITE) + sbin_SCRIPTS = generate-modprobe.conf diff --git a/templates/klibc-module-init-tools/template b/templates/klibc-module-init-tools/template new file mode 100644 index 00000000000..f6887e2e705 --- /dev/null +++ b/templates/klibc-module-init-tools/template @@ -0,0 +1,36 @@ +# Template file for 'klibc-module-init-tools' +pkgname=klibc-module-init-tools +version=3.6 +wrksrc="module-init-tools-${version}" +distfiles=" +http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/module-init-tools-$version.tar.bz2" +build_style=custom-install +short_desc="Tools for managing kernel modules for initramfs" +maintainer="Juan RP " +checksum=64a0b3b058f2236be1a8138356306c91e5f23f149a131428e4c7d97b1c050728 +long_desc=" + The module-init-tools package provides many of the utilities + needed by Linux systems for managing loadable Linux Kernel Modules. This + includes depmod, insmod, rmmod, modprobe and tools like modinfo. + + This package uses klibc for use in the initramfs." + +Add_dependency build klibc-devel +Add_dependency run klibc + +do_install() +{ + local destdir=$XBPS_DESTDIR/$pkgname-$version + + cd $wrksrc + CFLAGS="${CFLAGS} -DCONFIG_NO_BACKWARDS_COMPAT" \ + CC=klcc LD=klcc ./configure --prefix= + # klibc lacks getc_unlocked, so use getc instead + sed 's|getc_unlocked|getc|g' -i *.c + make || return 1 + + install -d ${destdir}/usr/lib/klibc/bin + for f in depmod modinfo modprobe insmod lsmod rmmod; do + install -s -m755 ${f} ${destdir}/usr/lib/klibc/bin + done +}