aboutsummaryrefslogtreecommitdiffstats
path: root/libkeccak-musl/PKGBUILD
blob: 57e4f79e2b8e05ac445b9ae5dc5aa4eeffb8019e (plain) (blame)
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
# Maintainer: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@kth.se>

pkgname=libkeccak-musl
_pkgname=libkeccak
pkgver=1.4
pkgrel=1
pkgdesc='Keccak-family hashing library (musl-version)'
arch=('x86_64' 'i686')
url='https://codeberg.org/maandree/libkeccak'
license=('custom:ISC')
_compiler=gcc
depends=('glibc' 'musl' "${_compiler}")
source=("${_pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
b2sums=('645ae0cb8bb8c8f512487eec876bc63bd8c2e2a5243e3ebe32aca2e4cc79a3271a18a8295d097f6a1e536444bcf1af6331507ccf814bab2ae838c005434ca84f')

prepare() {
  cd ${_pkgname}
  sed -i 's#FLAGS\s\+=#FLAGS +=#g' optimised.mk
}

build() {
  cd ${_pkgname}
  make CONFIGFILE=optimised.mk PREFIX=/usr/lib/musl CC="musl-${_compiler} -std=c99"
}

check() {
  cd ${_pkgname}
  make CONFIGFILE=optimised.mk PREFIX=/usr/lib/musl CC="musl-${_compiler} -std=c99" check
}

package() {
  cd ${_pkgname}
  make CONFIGFILE=optimised.mk PREFIX=/usr/lib/musl DESTDIR="${pkgdir}" install
  rm -r -- "${pkgdir}/usr/lib/musl/share"
}