summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD57
2 files changed, 76 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..98e3c064d76
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = ctre
+ pkgdesc = A Compile time PCRE (almost) compatible regular expression matcher
+ pkgver = 2.10
+ pkgrel = 1
+ url = https://github.com/hanickadot/compile-time-regular-expressions/
+ arch = any
+ license = Apache-2.0
+ makedepends = git
+ makedepends = cmake
+ makedepends = make
+ optdepends = gcc: c++ compiler
+ optdepends = clang: c++ compiler
+ provides = compile-time-regular-expressions
+ conflicts = compile-time-regular-expressions
+ source = https://github.com/hanickadot/compile-time-regular-expressions//archive/v2.10.tar.gz
+ sha512sums = SKIP
+
+pkgname = ctre
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..267faa2c3f6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Ruijie Yu (first.last@outlook.com)
+pkgname=ctre
+_pkgname=compile-time-regular-expressions
+pkgver=2.10
+pkgrel=1
+pkgdesc='A Compile time PCRE (almost) compatible regular expression matcher'
+url="https://github.com/hanickadot/$_pkgname/"
+arch=(any)
+license=(Apache-2.0)
+depends=()
+optdepends=(
+'gcc: c++ compiler'
+'clang: c++ compiler'
+)
+makedepends=(git cmake make)
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+source=(
+ # extracted: ctre-2.10
+ "$url/archive/v$pkgver.tar.gz"
+)
+sha512sums=(SKIP)
+_cmake_config=Release
+
+_extracted="$_pkgname-$pkgver"
+
+prepare() {
+ cd "${srcdir}/${_extracted}"
+ cmake \
+ --warn-uninitialized \
+ --warn-unused-vars \
+ -S . -B build
+}
+
+build() {
+ cmake \
+ --build "${srcdir}/${_extracted}/build" \
+ --config "$_cmake_config" \
+ -j
+}
+
+check() {
+ cd "${srcdir}/${_extracted}/build"
+ ctest \
+ --no-tests=ignore \
+ --output-on-failure \
+ --progress
+}
+
+package() {
+ cmake \
+ --install "${srcdir}/${_extracted}/build" \
+ --prefix "${pkgdir}/usr/" \
+ --config "$_cmake_config"
+}
+
+