diff options
author | Andreas Grapentin <andreas@grapentin.org> | 2018-02-13 10:16:29 +0100 |
---|---|---|
committer | Andreas Grapentin <andreas@grapentin.org> | 2018-02-13 12:23:50 +0100 |
commit | f625cfccee2287e9b079b05d59e4179088b86bc3 (patch) | |
tree | 9eeeba8e4e44dd1394259128153f1e45795051b1 /libre/linux-libre-tools | |
parent | 1ab533cdce918676f5c6387e5140fe6fc3e4d69f (diff) | |
download | abslibre-f625cfccee2287e9b079b05d59e4179088b86bc3.tar.gz abslibre-f625cfccee2287e9b079b05d59e4179088b86bc3.tar.bz2 abslibre-f625cfccee2287e9b079b05d59e4179088b86bc3.zip |
libre/linux-libre-tools: updated to 4.15_gnu
Diffstat (limited to 'libre/linux-libre-tools')
-rw-r--r-- | libre/linux-libre-tools/PKGBUILD | 248 |
1 files changed, 142 insertions, 106 deletions
diff --git a/libre/linux-libre-tools/PKGBUILD b/libre/linux-libre-tools/PKGBUILD index c95a4c505..be6ab7214 100644 --- a/libre/linux-libre-tools/PKGBUILD +++ b/libre/linux-libre-tools/PKGBUILD @@ -1,89 +1,93 @@ +# $Id$ +# Maintainer (Arch): Sébastien Luttringer # Maintainer: David P. <megver83@parabola.nu> -# Maintainer (Arch): Sébastien Luttringer <seblu@archlinux.org> # Contributor: André Silva <emulatorman@hyperbola.info> # Contributor: Luke Shumaker <lukeshu@sbcglobal.net> # Contributor: Márcio Silva <coadde@hyperbola.info> -_pkgdesc='Linux-libre kernel' +# parabola changes and rationale (adapted from core/linux-tools): +# - changed upstream source url to linux-libre +# - removed hyperV support + pkgbase=linux-libre-tools -_pkgname=( +pkgname=( 'cgroup_event_listener' 'cpupower' 'libtraceevent' + 'linux-libre-tools-meta' 'perf' 'tmon' 'usbip' ) case "$CARCH" in - x86_64|i686) - _pkgname+=( - 'turbostat' - 'x86_energy_perf_policy' - ) - ;; + x86_64|i686) pkgname+=('turbostat' 'x86_energy_perf_policy') ;; + armv7h) pkgname+=('gpio-utils' 'iio-utils') ;; esac -pkgname=("${pkgbase}-meta" "${_pkgname[@]/#/${pkgbase}-}") - -_pkgbasever=4.12-gnu -_pkgver=${_pkgbasever} -_srcname=linux-${_pkgbasever%-*} -_archpkgver=${_pkgver%-*} -pkgver=${_pkgver//-/_} +pkgver=4.15_gnu pkgrel=1 license=('GPL2') -arch=('i686' 'x86_64' 'armv7h') +arch=('x86_64' 'i686' 'armv7h') url='https://linux-libre.fsfla.org/' options=('!strip') - -makedepends=('asciidoc' 'xmlto') +makedepends=('git') # split packages need all package dependencies set manually in makedepends -declare -A _depends -_depends[perf]='perl python2 libnewt elfutils libunwind audit' -makedepends_i686=('numactl') # also perf's +# kernel source deps +makedepends+=('asciidoc' 'xmlto') +# perf deps +makedepends+=('perl' 'python2' 'slang' 'elfutils' 'libunwind' 'audit' 'gtk2') makedepends_x86_64=('numactl') -_depends[cpupower]='pciutils' -_depends[usbip]='glib2 sysfsutils libsystemd' -makedepends+=(systemd) # libsystemd for runtime, systemd for make. IDK, it's what Arch does -_depends[tmon]='ncurses' -makedepends+=(${_depends[@]}) - +makedepends_i686=('numactl') +# cpupower deps +makedepends+=('pciutils') +# usbip deps +makedepends+=('glib2' 'sysfsutils' 'udev') +# tmon deps +makedepends+=('ncurses') groups=("$pkgbase") -source=("https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz" - "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasever}/linux-libre-${_pkgbasever}.tar.xz.sign" - #"https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz" - #"https://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasever}-${_pkgver}.xz.sign" +source=("https://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver//_/-}/linux-libre-${pkgver//_/-}.tar.xz"{,.sign} +# "https://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver%.*}-gnu/patch-${pkgver%.*}-gnu-${pkgver//_/-}.xz"{,.sign} 'cpupower.default' 'cpupower.systemd' 'cpupower.service' 'usbipd.service') -sha256sums=('8a5e5d69a71480d90f9e8db9f8c6fdad71adb1e445b4d80eb81adf1de7fbff98' +sha256sums=('e6556514286f9cd6b46f5d5769b2cc3c61ac7d6fa9c9c400e3c2fb5949490186' 'SKIP' '4fa509949d6863d001075fa3e8671eff2599c046d20c98bb4a70778595cd1c3f' 'd2e8e5e8b22c6089a91f573aa1c59e442a1f3b67a2c9f047abe3b57d3d6558cc' 'fa2560630576464739ede14c9292249f4007f36a684bc378add174fc88394550' '2e187734d8aec58a3046d79883510d779aa93fb3ab20bd3132c1a607ebe5498f') -validpgpkeys=( - '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva -) +validpgpkeys=('474402C8C582DAFBE389C427BCB7CF877E7D47A7') # Alexandre Oliva prepare() { - cd $_srcname - - # add upstream patch - if [ "${_pkgbasever}" != "${_pkgver}" ]; then - patch -p1 -i "${srcdir}/patch-${_pkgbasever}-${_pkgver}" - fi + cd linux-${pkgver%_*} + + # Fix "unwind-libunwind.c:109:11: error: ‘EINVAL’ undeclared" on i686 + # Not sure why this wasn't an issue until now... + sed -i '1i #include <errno.h>' tools/perf/arch/x86/util/unwind-libunwind.c + + # apply patch from the source array (should be a pacman feature) + local filename + for filename in "${source[@]}"; do + filename="${filename##*/}" + if [[ "$filename" =~ \.patch$ ]]; then + msg2 "Applying patch $filename" + patch -p1 -N -i "$srcdir/$filename" + elif [[ "$filename" =~ ^patch- ]]; then + msg2 "Applying linux $filename" + patch -p1 -N -i "$srcdir/${filename%.*}" + fi + done } build() { msg2 'libtraceevent' - pushd $_srcname/tools/lib/traceevent + pushd linux-${pkgver%_*}/tools/lib/traceevent make popd msg2 'perf' - pushd $_srcname/tools/perf + pushd linux-${pkgver%_*}/tools/perf make -f Makefile.perf \ prefix=/usr \ lib=lib/perf \ @@ -92,72 +96,95 @@ build() { PYTHON=python2 \ PYTHON_CONFIG=python2-config \ PERF_VERSION=$pkgver-$pkgrel \ + DESTDIR="$pkgdir" \ all man popd msg2 'cpupower' - pushd $_srcname/tools/power/cpupower - # we cannot use --as-needed - #LDFLAGS=${LDFLAGS:+"$LDFLAGS,--no-as-needed"} + pushd linux-${pkgver%_*}/tools/power/cpupower make VERSION=$pkgver-$pkgrel popd + if [[ "$CARCH" == x86_64 ]] || [[ "$CARCH" == i686 ]]; then + msg2 'x86_energy_perf_policy' + pushd linux-${pkgver%_*}/tools/power/x86/x86_energy_perf_policy + make + popd + fi + msg2 'usbip' - pushd $_srcname/tools/usb/usbip + pushd linux-${pkgver%_*}/tools/usb/usbip ./autogen.sh ./configure --prefix=/usr --sbindir=/usr/bin make popd msg2 'tmon' - pushd $_srcname/tools/thermal/tmon + pushd linux-${pkgver%_*}/tools/thermal/tmon make popd msg2 'cgroup_event_listener' - pushd $_srcname/tools/cgroup + pushd linux-${pkgver%_*}/tools/cgroup make popd - case "$CARCH" in - x86_64|i686) - msg2 'x86_energy_perf_policy' - pushd $_srcname/tools/power/x86/x86_energy_perf_policy - make - popd - - msg2 'turbostat' - pushd $_srcname/tools/power/x86/turbostat - make - popd - ;; - esac + if [[ "$CARCH" == x86_64 ]] || [[ "$CARCH" == i686 ]]; then + msg2 'turbostat' + pushd linux-${pkgver%_*}/tools/power/x86/turbostat + make + fi + + if [[ "$CARCH" == armv7h ]]; then + msg2 'gpio' + pushd linux-${pkgver%_*}/tools/gpio + make -j1 + popd + + msg2 'iio' + pushd linux-${pkgver%_*}/tools/iio + make -j1 + popd + fi } -_package_meta() { - pkgdesc="${_pkgdesc} tools meta package" +package_linux-libre-tools-meta() { + pkgdesc='GNU/Linux-libre kernel tools meta package' groups=() - depends=("${_pkgname[@]/#/${pkgbase}-}") + depends=( + 'cgroup_event_listener' + 'cpupower' + 'libtraceevent' + 'perf' + 'tmon' + 'usbip' + ) + depends_x86_64=('turbostat' 'x86_energy_perf_policy') + depends_i686=('turbostat' 'x86_energy_perf_policy') + depends_armv7h=('gpio-utils' 'iio-utils') replaces=(linux-tools-meta) conflicts=(linux-tools-meta acpidump) - provides=(linux-tools-meta=$_archpkgver) + provides=(linux-tools-meta) } -_package_libtraceevent() { - pkgdesc="${_pkgdesc} trace event library" +package_libtraceevent() { + pkgdesc='GNU/Linux-libre kernel trace event library' depends=('glibc') - cd $_srcname/tools/lib/traceevent + cd linux-${pkgver%_*}/tools/lib/traceevent install -dm 755 "$pkgdir/usr/lib" install -m 644 libtraceevent.so "$pkgdir/usr/lib" } -_package_perf() { - pkgdesc="${_pkgdesc} performance auditing tool" - depends=('binutils') +package_perf() { + pkgdesc='GNU/Linux-libre kernel performance auditing tool' + depends=('perl' 'python2' 'slang' 'elfutils' 'libunwind' 'binutils' + 'audit') + depends_x86_64=('numactl') + depends_i686=('numactl') optdepends=('gtk2: support GTK2 browser for perf report') - cd $_srcname/tools/perf + cd linux-${pkgver%_*}/tools/perf make -f Makefile.perf \ prefix=/usr \ lib=lib/perf \ @@ -169,48 +196,53 @@ _package_perf() { DESTDIR="$pkgdir" \ install install-man cd "$pkgdir" + # add linker search path + mkdir "$pkgdir/etc/ld.so.conf.d" + echo '/usr/lib/perf' > "$pkgdir/etc/ld.so.conf.d/$pkgname.conf" # move completion in new directory install -Dm644 etc/bash_completion.d/perf usr/share/bash-completion/completions/perf - rm -r etc + rm -r etc/bash_completion.d # no exec on usr/share find usr/share -type f -exec chmod a-x {} \; } -_package_cpupower() { - pkgdesc="${_pkgdesc} tool to examine and tune power saving related features of your processor" +package_cpupower() { + pkgdesc='GNU/Linux-libre kernel tool to examine and tune power saving related features of your processor' backup=('etc/default/cpupower') - depends=('bash') - replaces=('cpufrequtils') + depends=('bash' 'pciutils') conflicts=('cpufrequtils') + replaces=('cpufrequtils') install=cpupower.install - pushd $_srcname/tools/power/cpupower + pushd linux-${pkgver%_*}/tools/power/cpupower make \ DESTDIR="$pkgdir" \ sbindir='/usr/bin' \ + libdir='/usr/lib' \ mandir='/usr/share/man' \ docdir='/usr/share/doc/cpupower' \ install install-man popd # install startup scripts - install -Dm 644 cpupower.default "$pkgdir/etc/default/cpupower" - install -Dm 644 cpupower.service "$pkgdir/usr/lib/systemd/system/cpupower.service" - install -Dm 755 cpupower.systemd "$pkgdir/usr/lib/systemd/scripts/cpupower" + install -Dm 644 $pkgname.default "$pkgdir/etc/default/$pkgname" + install -Dm 644 $pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service" + install -Dm 755 $pkgname.systemd "$pkgdir/usr/lib/systemd/scripts/$pkgname" } -_package_x86_energy_perf_policy() { +package_x86_energy_perf_policy() { pkgdesc='Read or write MSR_IA32_ENERGY_PERF_BIAS' depends=('glibc') - cd $_srcname/tools/power/x86/x86_energy_perf_policy + cd linux-${pkgver%_*}/tools/power/x86/x86_energy_perf_policy install -Dm 755 x86_energy_perf_policy "$pkgdir/usr/bin/x86_energy_perf_policy" install -Dm 644 x86_energy_perf_policy.8 "$pkgdir/usr/share/man/man8/x86_energy_perf_policy.8" } -_package_usbip() { +package_usbip() { pkgdesc='An USB device sharing system over IP network' + depends=('glib2' 'sysfsutils' 'libsystemd') - pushd $_srcname/tools/usb/usbip + pushd linux-${pkgver%_*}/tools/usb/usbip make install DESTDIR="$pkgdir" popd # module loading @@ -220,40 +252,44 @@ _package_usbip() { install -Dm 644 usbipd.service "$pkgdir/usr/lib/systemd/system/usbipd.service" } -_package_tmon() { - pkgdesc="Monitoring and Testing Tool for ${_pkgdesc} thermal subsystem" - depends=('glibc') +package_tmon() { + pkgdesc='Monitoring and Testing Tool for GNU/Linux-libre kernel thermal subsystem' + depends=('glibc' 'ncurses') - cd $_srcname/tools/thermal/tmon + cd linux-${pkgver%_*}/tools/thermal/tmon make install INSTALL_ROOT="$pkgdir" } -_package_cgroup_event_listener() { +package_cgroup_event_listener() { pkgdesc='Simple listener of cgroup events' depends=('glibc') - cd $_srcname/tools/cgroup + cd linux-${pkgver%_*}/tools/cgroup install -Dm755 cgroup_event_listener "$pkgdir/usr/bin/cgroup_event_listener" } -_package_turbostat() { +package_turbostat() { pkgdesc='Report processor frequency and idle statistics' depends=('glibc') - cd $_srcname/tools/power/x86/turbostat + cd linux-${pkgver%_*}/tools/power/x86/turbostat make install DESTDIR="$pkgdir" } -eval "package_${pkgbase}-meta() { _package_meta; }" -for _p in "${_pkgname[@]}"; do - eval " - package_${pkgbase}-${_p}() { - _package_${_p} - depends+=(${_depends[${_p}]}) - replaces+=("${_p}" "${_p}-libre" "${_p}-parabola" ${pkgbase}_${_p}) - conflicts+=("${_p}" "${_p}-libre" "${_p}-parabola" ${pkgbase}_${_p}) - provides+=(${_p}=${_archpkgver}) - }" -done +package_gpio-utils() { + pkgdesc='GPIO character device utilities' + depends=('glibc') + + cd linux-${pkgver%_*}/tools/gpio + make install DESTDIR="$pkgdir" +} + +package_iio-utils() { + pkgdesc='Industrial IO utilities' + depends=('glibc') + + cd linux-${pkgver%_*}/tools/iio + make install DESTDIR="$pkgdir" +} # vim:set ts=2 sw=2 et: |