summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fdafb3dffcbde28aa478e4dcb3578a81704429d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Marc Schulte <bomba@nerdstube.de>

pkgbase=tlp-git
pkgname=(
  tlp-git
  tlp-rdw-git
)
pkgver=1.2.2.r4.3c7b9f3
pkgrel=1
arch=(any)
url=https://linrunner.de/en/tlp/tlp.html
license=(GPL2)
makedepends=(git)
source=(git+https://github.com/linrunner/TLP.git)
sha256sums=(SKIP)

pkgver() {
  cd TLP

  echo "$(git describe --tags | sed 's/-/.r/; s/-g/./')"
}

package_tlp-git() {
  pkgdesc='Linux Advanced Power Management'
  depends=(
    hdparm
    iw
    pciutils
    rfkill
    usbutils
    util-linux
  )
  optdepends=(
    'acpi_call: ThinkPad battery functions, Sandy Bridge and newer'
    'bash-completion: Bash completion'
    'ethtool: Disable Wake On Lan'
    'lsb-release: Display LSB release version in tlp-stat'
    'smartmontools: Display S.M.A.R.T. data in tlp-stat'
    'tp_smapi: ThinkPad battery functions'
    'x86_energy_perf_policy: Set energy versus performance policy on x86 processors'
  )
  provides=(tlp)
  conflicts=(
    laptop-mode-tools
    pm-utils
    tlp
  )
  backup=(etc/default/tlp)

  export TLP_NO_INIT=1
  export TLP_SBIN=/usr/bin
  export TLP_SYSD=/usr/lib/systemd/system
  export TLP_ULIB=/usr/lib/udev
  export TLP_WITH_ELOGIND=0
  export TLP_WITH_SYSTEMD=1

  make DESTDIR="${pkgdir}" -C TLP install-tlp install-man-tlp
}

package_tlp-rdw-git() {
  pkgdesc='Linux Advanced Power Management - Radio Device Wizard'
  depends=(
    networkmanager
    tlp
  )
  provides=(tlp-rdw)
  conflicts=(tlp-rdw)

  make DESTDIR="${pkgdir}" -C TLP install-rdw install-man-rdw
}

# vim: ts=2 sw=2 et: