Files
MSYS2-packages/libqrencode/PKGBUILD
Christoph Reiter 1f1a74cb26 Port everything away from PKGMETA
keep an empty PKGMETA.yml for now until all users are adjusted and
deployed.
2023-09-17 20:40:26 +02:00

66 lines
1.6 KiB
Bash

#! /usr/bin/bash
# Maintainer: micbou <contact@micbou.com>
pkgbase=libqrencode
pkgname=('libqrencode' 'libqrencode-devel')
pkgver=4.1.1
pkgrel=3
pkgdesc="QR Code encoding library"
conflicts=(${pkgbase}-git)
replaces=(${pkgbase}-git)
arch=('i686' 'x86_64')
url='https://fukuchi.org/works/qrencode/'
license=('LGPL')
makedepends=('gcc' 'autotools' 'libiconv-devel')
source=("${pkgbase}-${pkgver}.tar.gz::https://github.com/fukuchi/libqrencode/archive/v${pkgver}.tar.gz")
sha256sums=('5385bc1b8c2f20f3b91d258bf8ccc8cf62023935df2d2676b5b67049f31a049c')
msys2_references=(
'archlinux: qrencode'
)
prepare() {
cd ${srcdir}/${pkgbase}-${pkgver}
./autogen.sh
}
build() {
mkdir -p build-${pkgbase}-${pkgver}-${CHOST}
cd build-${pkgbase}-${pkgver}-${CHOST}
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
../${pkgbase}-${pkgver}/configure -C \
--prefix=/usr \
--build=${CYGWIN_CHOST} \
--with-tests
make LDFLAGS="${LDFLAGS} -no-undefined"
make DESTDIR=${srcdir}/dest install
}
check () {
cd build-${pkgbase}-${pkgver}-${CHOST}
make check
}
package_libqrencode() {
groups=('libraries')
mkdir -p ${pkgdir}/usr
cp -rf ${srcdir}/dest/usr/bin ${pkgdir}/usr/
mkdir -p ${pkgdir}/usr/share
cp -rf ${srcdir}/dest/usr/share/man ${pkgdir}/usr/share/
install -Dm644 ${srcdir}/${pkgname}-${pkgver}/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
package_libqrencode-devel() {
pkgdesc="libqrencode headers and libraries"
groups=('development')
options=('staticlibs')
depends=(libqrencode=${pkgver})
mkdir -p ${pkgdir}/usr
cp -rf ${srcdir}/dest/usr/include ${pkgdir}/usr/
cp -rf ${srcdir}/dest/usr/lib ${pkgdir}/usr/
}