summaryrefslogtreecommitdiff
path: root/libre/linux-libre-api-headers/PKGBUILD
blob: add637d2ab00e38b8e7f858abbaebcab08f37a43 (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
# $Id$
# Maintainer (Arch):  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor (Arch): Allan McRae <allan@archlinux.org>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
# Contributor: André Silva <emulatorman@hyperbola.info>

# parabola changes and rationale (based on core/linux-api-headers):
#  - changing upstream source url to linux-libre
#  - change arch from (any) to explicit list, since headers differ across arches

# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc

pkgname=linux-libre-api-headers
pkgver=4.16.1_gnu
_basever=${pkgver%.*_gnu}
pkgrel=1
pkgdesc='Kernel headers sanitized for use in userspace'
arch=(x86_64 i686 armv7h)
url='http://www.gnu.org/software/libc'
license=(GPL2)
provides=("linux-api-headers=${pkgver%_*}")
conflicts=('linux-api-headers')
replaces=('linux-api-headers')
source=(https://linux-libre.fsfla.org/pub/linux-libre/releases/${_basever}-gnu/linux-libre-${_basever}-gnu.tar.xz{,.sign}
        https://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver//_/-}/patch-${_basever}-gnu-${pkgver//_/-}.xz{,.sign})
sha256sums=('5bd4ee95a0a9d7d2f962504f4b684b441b07f5a136e8bb8ad959f2d29ab9b913'
            'SKIP'
            '984dc455b9569a77f33512ae3e6f9598361031e83b72d8f6a979a9872caefba5'
            'SKIP')
validpgpkeys=('474402C8C582DAFBE389C427BCB7CF877E7D47A7') # Alexandre Oliva

prepare() {
  cd linux-${pkgver%.*}
  patch -p1 -i "$srcdir/patch-${_basever}-gnu-${pkgver//_/-}"
}

build() {
  cd linux-${pkgver%.*}

  make mrproper
  make headers_check
}

package() {
  cd linux-${pkgver%.*}
  make INSTALL_HDR_PATH="$pkgdir/usr" headers_install

  # use headers from libdrm
  rm -r "$pkgdir/usr/include/drm"
  
  # clean-up unnecessary files generated during install
  find "$pkgdir" \( -name .install -o -name ..install.cmd \) -delete
}