47 lines
1.4 KiB
Bash
47 lines
1.4 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgname=libinih
|
|
pkgbasename=inih
|
|
pkgver=53
|
|
_debver=53
|
|
_debrel=1
|
|
pkgrel=1
|
|
pkgdesc='A simple .INI file parser written in C'
|
|
arch=('i686' 'x86_64')
|
|
url='https://github.com/benhoyt/inih'
|
|
license=('Modidied-BSD')
|
|
depends=('gcc-libs' 'glibc')
|
|
makedepends=('meson' 'quilt')
|
|
source=("https://github.com/benhoyt/inih/archive/refs/tags/r${pkgver}.tar.gz"
|
|
"https://deb.debian.org/debian/pool/main/libi/libinih/libinih_${_debver}-${_debrel}.debian.tar.xz")
|
|
sha512sums=('99bc40c294b521e9973184bfb30d60c129735991f33b387b3d023827a34672b0489eadf91e38895ea725168dbc7b27bb02c1975debe7573b4b209d0e947b2100'
|
|
'f59207d44cfc5f222785fa76502922d71e61b0ad18815040328357498dbe12214976b1b148a609a3d0bf34adce18bece28f770cf80d751b7148d375d1d79e180')
|
|
|
|
prepare() {
|
|
cd ${pkgbasename}-r${pkgver}
|
|
|
|
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
|
# Debian patches
|
|
export QUILT_PATCHES=debian/patches
|
|
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
|
export QUILT_DIFF_ARGS='--no-timestamps'
|
|
|
|
mv "$srcdir"/debian .
|
|
|
|
quilt push -av
|
|
fi
|
|
}
|
|
|
|
build() {
|
|
hyperbola-meson ${pkgbasename}-r${pkgver} build \
|
|
-Ddefault_library=shared \
|
|
-Ddistro_install=true \
|
|
-Dwith_INIReader=true
|
|
meson compile -C build
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" meson install -C build
|
|
install -Dm644 "${srcdir}/${pkgbasename}-r${pkgver}/LICENSE.txt" -t "${pkgdir}"/usr/share/licenses/$pkgname
|
|
}
|