From 7ba0f23117b78674f571ea2ea8eb28c8efd3d1af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Giedrius=20Statkevi=C4=8Dius?= Date: Tue, 5 May 2015 18:14:24 +0300 Subject: [PATCH] linux-tools: added a freefall subpkg --- srcpkgs/freefall | 1 + srcpkgs/linux-tools/files/freefall/run | 3 +++ srcpkgs/linux-tools/template | 15 ++++++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 120000 srcpkgs/freefall create mode 100644 srcpkgs/linux-tools/files/freefall/run diff --git a/srcpkgs/freefall b/srcpkgs/freefall new file mode 120000 index 00000000000..7d7f1b46a52 --- /dev/null +++ b/srcpkgs/freefall @@ -0,0 +1 @@ +./linux-tools \ No newline at end of file diff --git a/srcpkgs/linux-tools/files/freefall/run b/srcpkgs/linux-tools/files/freefall/run new file mode 100644 index 00000000000..51a9f293b47 --- /dev/null +++ b/srcpkgs/linux-tools/files/freefall/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec freefall ${OPTS:=/dev/sda} diff --git a/srcpkgs/linux-tools/template b/srcpkgs/linux-tools/template index 2fed7434efc..c17ebb2d685 100644 --- a/srcpkgs/linux-tools/template +++ b/srcpkgs/linux-tools/template @@ -15,7 +15,7 @@ homepage="http://www.kernel.org" distfiles="http://ftp.kernel.org/pub/linux/kernel/v4.x/linux-${version}.tar.xz" checksum=0f2f7d44979bc8f71c4fc5d3308c03499c26a824dd311fdf6eef4dee0d7d5991 -subpackages="cpupower libcpupower libcpupower-devel libusbip libusbip-devel usbip perf" +subpackages="cpupower libcpupower libcpupower-devel libusbip libusbip-devel usbip perf freefall" if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then makedepends+=" libnuma-devel" @@ -46,6 +46,9 @@ do_build() { make ${makejobs} fi + cd ${wrksrc}/Documentation/laptops + $CC ${CFLAGS} ${LDFLAGS} -o freefall freefall.c + cd ${wrksrc}/tools/usb/usbip # fix missing man page sed -i 's/usbip_bind_driver.8//' Makefile.am @@ -63,6 +66,9 @@ do_install() { docdir='/usr/share/doc/cpupower' \ install install-man + # freefall + vbin "${wrksrc}/Documentation/laptops/freefall" + # perf cd ${wrksrc}/tools/perf make WERROR=0 DESTDIR=${DESTDIR}/usr \ @@ -164,3 +170,10 @@ usbip_package() { fi } } +freefall_package() { + short_desc="Disk protection for HP/DELL machines" + pkg_install() { + vmove usr/bin/freefall + vsv freefall + } +}