Christoph Reiter a2ee04bf00 More CPEs
2024-03-24 20:09:34 +01:00

55 lines
1.4 KiB
Bash

# Maintainer: Alexey Pavlov <alexpux@gmail.com>
pkgname=('libyaml' 'libyaml-devel')
pkgver=0.2.5
pkgrel=2
pkgdesc="YAML 1.1 library"
arch=('i686' 'x86_64')
url="https://pyyaml.org/wiki/LibYAML"
msys2_references=(
"cpe: cpe:/a:pyyaml:libyaml"
)
license=('spdx:MIT')
makedepends=('autotools' 'gcc')
source=(https://pyyaml.org/download/libyaml/yaml-${pkgver}.tar.gz
'yaml-0.1.7-fix-undefined.patch')
sha256sums=('c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4'
'fba2535decf076c0a6b260db01e163e665c5fc92fe7edaa90246d31810082387')
prepare() {
cd "${srcdir}/yaml-${pkgver}"
patch -p1 -i ${srcdir}/yaml-0.1.7-fix-undefined.patch
autoreconf -fiv
}
build() {
cd "${srcdir}/yaml-${pkgver}"
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
./configure \
--build=${CYGWIN_CHOST} \
--prefix=/usr
make
make DESTDIR="$srcdir/dest" install
install -m644 -D LICENSE ${srcdir}/dest/usr/share/licenses/${pkgname}/LICENSE
}
package_libyaml() {
groups=('libraries')
install -dm755 ${pkgdir}/usr/bin
install -m755 -t ${pkgdir}/usr/bin ${srcdir}/dest/usr/bin/*.dll
cp -rf ${srcdir}/dest/usr/share ${pkgdir}/usr/
}
package_libyaml-devel() {
groups=('development')
depends=("libyaml=${pkgver}")
install -dm755 ${pkgdir}/usr
cp -rf ${srcdir}/dest/usr/include ${pkgdir}/usr/
cp -rf ${srcdir}/dest/usr/lib ${pkgdir}/usr/
}