summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f671afafecbd07176b6e35cb088c876b8c42d5fd (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
# Maintainer: Markus Meissner <coder@safemailbox.de>

pkgname=asus-fan-dkms-git 
pkgver=v0.9.1.r58.g41d132c
pkgrel=1
_realname=asus-fan
_modname=asus_fan
pkgdesc="Kernel module allowing to control (both) fan inside various ASUS laptops"
arch=('i686' 'x86_64')
url="http://github.com/daringer/asus-fan"
md5sums=('SKIP')
license=('GPL')
depends=('dkms')
install=asus-fan-dkms-git.install
conflicts=('asus-fan-dkms')
makedepends=('git')

source=("${pkgname}::git+https://github.com/daringer/asus-fan.git")

pkgver() {
	  cd "${srcdir}/${pkgname}"
	  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
    }

package() {
  cd "${srcdir}/${pkgname}"

  #mkdir -p ${pkgdir}/usr/sbin 
  mkdir -p ${pkgdir}/usr/bin
  mkdir -p ${pkgdir}/usr/lib/systemd/system
  install -m 775 misc/asus-fan-create-symlinks.sh ${pkgdir}/usr/bin/asus-fan-create-symlinks.sh
  install -m 664 misc/systemd/asus-fan.service ${pkgdir}/usr/lib/systemd/system/asus-fan.service

  echo "Installing asus-fan.service for systemd"

  ksrcdir="/usr/src/${_modname}-git"
  mkdir -p ${pkgdir}${ksrcdir}
  make -f Makefile.dkms DESTDIR=${pkgdir}${ksrcdir} src_install 
}