Christoph Reiter 11a162b0e5 repo: make file executable permissions match the cygwin derived status
In case we have a git clone from Linux that is accessed via cygwin git
the files executable status will be derived from the file content (shebang)
and won't match the git repo, leading to a initially dirty tree.

This can be worked around by setting "core.filemode=false", but let's try
to match the cygwin permissions with the in-repo permissions so this isn't
needed.
2024-04-14 15:17:42 +02:00

66 lines
1.7 KiB
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/'
msys2_repository_url="https://github.com/fukuchi/libqrencode"
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/
}