mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
community/libscfg: new aport
C library for scfg https://sr.ht/~emersion/libscfg
This commit is contained in:
parent
7a1a173384
commit
039d8b73c8
35
community/libscfg/APKBUILD
Normal file
35
community/libscfg/APKBUILD
Normal file
@ -0,0 +1,35 @@
|
||||
# Contributor: Hannes Braun <hannes@hannesbraun.net>
|
||||
# Maintainer: Hannes Braun <hannes@hannesbraun.net>
|
||||
pkgname=libscfg
|
||||
pkgver=0.1.1
|
||||
pkgrel=0
|
||||
pkgdesc="C library for scfg"
|
||||
url="https://sr.ht/~emersion/libscfg"
|
||||
arch="all"
|
||||
license="MIT"
|
||||
makedepends="meson"
|
||||
subpackages="$pkgname-dev $pkgname-doc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~emersion/libscfg/archive/v$pkgver.tar.gz
|
||||
set-so-version.patch
|
||||
"
|
||||
builddir="$srcdir/$pkgname-v$pkgver"
|
||||
|
||||
build() {
|
||||
abuild-meson . output
|
||||
meson compile -C output
|
||||
}
|
||||
|
||||
check() {
|
||||
meson test --no-rebuild --print-errorlogs -C output
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" meson install --no-rebuild -C output
|
||||
|
||||
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
8f4821d22cd26509c40d77d2a5585fb891259618aeb03611b5f2e3b620a88b7f24cc9bf05b6ad3f99c3c35f855e2ba8a1df13460ff2fe53152d78d03fd8dd6ce libscfg-0.1.1.tar.gz
|
||||
6c4b47c04f25e65e3a3f0c6ab589b46b99fcc50280adc0e30a38cbdfcfd627d420c69e8b53080ee13c3ed3cb2938e7fe1652dd2108ce1ca41143f3c6ec69f85e set-so-version.patch
|
||||
"
|
37
community/libscfg/set-so-version.patch
Normal file
37
community/libscfg/set-so-version.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 3bdba8c2bc3c3625d9751501ab42b047ec01addf Mon Sep 17 00:00:00 2001
|
||||
From: Simon Ser <contact@emersion.fr>
|
||||
Date: Wed, 6 Mar 2024 19:22:45 +0100
|
||||
Subject: [PATCH] build: set library version and soversion
|
||||
|
||||
---
|
||||
meson.build | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index f426e0c..8877259 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -11,6 +11,11 @@ project(
|
||||
],
|
||||
)
|
||||
|
||||
+version = meson.project_version()
|
||||
+version_major = version.split('.')[0]
|
||||
+version_minor = version.split('.')[1]
|
||||
+assert(version_major == '0')
|
||||
+
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
add_project_arguments(cc.get_supported_arguments([
|
||||
@@ -28,6 +33,8 @@ scfg_lib = library(
|
||||
files('scfg.c'),
|
||||
include_directories: scfg_inc,
|
||||
install: true,
|
||||
+ version: version,
|
||||
+ soversion: version_minor,
|
||||
)
|
||||
|
||||
scfg = declare_dependency(
|
||||
--
|
||||
2.45.0
|
||||
|
Loading…
Reference in New Issue
Block a user