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

pkgname=libkeccak-musl
_pkgname=libkeccak
pkgver=1.3.1
pkgrel=2
pkgdesc='Keccak-family hashing library (musl-version)'
arch=('x86_64' 'i686')
url='https://github.com/maandree/libkeccak'
license=('custom:ISC')
_compiler=gcc
depends=('glibc' 'musl' "${_compiler}")
source=("${url}/archive/${pkgver}/${_pkgname}-${pkgver}.tar.gz")
b2sums=('cbd8466a8be32db633aadcc1cdfd7c09eedd0606d274d0f5e43b0055a5f87672c1ba27052fd03423779b84648379f0095310d8367cef2ed7ba70d49a66e03249')

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

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

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