summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD42
1 files changed, 26 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6d3d76b97025..287db06a262d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,40 @@
-# Maintainer: Caltlgin Stsodaat <contact@fossdaily.xyz>
+# Maintainer: Joe Baldino <pedanticdm@gmx.us>
+# Contributor: Caltlgin Stsodaat <contact@fossdaily.xyz>
pkgname=crex
pkgver=0.2.5
-pkgrel=2
+pkgrel=4
pkgdesc='Explore, test, and check regular expressions in the terminal'
arch=('x86_64')
url='https://octobanana.com/software/crex'
license=('MIT')
makedepends=('cmake')
-source=("https://github.com/octobanana/${pkgname}/archive/${pkgver}.tar.gz")
-sha256sums=('c6a166b7a1e696a7babeaf7c5728eece1624704a18357f827129fc95ef2ecc56')
+depends=('gcc-libs')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/octobanana/${pkgname}/archive/refs/tags/${pkgver}.tar.gz"
+ '0001-ArchLinux-changes-to-CMakeLists.txt.patch')
+sha256sums=('c6a166b7a1e696a7babeaf7c5728eece1624704a18357f827129fc95ef2ecc56'
+ '407177d9486ca4758b0853114cfaa88aeafdb862c07c3ba683f017fbc79c9c18')
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+ patch --forward --strip=1 \
+ --input="${srcdir}/0001-ArchLinux-changes-to-CMakeLists.txt.patch"
+}
build() {
- export CFLAGS+=" ${CPPFLAGS}"
- export CXXFLAGS+=" ${CPPFLAGS}"
- cmake -B build -S "${pkgname}-${pkgver}" \
- -DCMAKE_BUILD_TYPE='None' \
- -DCMAKE_INSTALL_PREFIX='/usr' \
- -Wno-dev
- make -C build
+ # -DNDEBUG prevents (assert) file paths being compiled into the binary
+ # See: https://wiki.archlinux.org/title/CMake_package_guidelines#CMake_undesired_behaviors
+ CFLAGS="${CFLAGS} -DNDEBUG" CXXFLAGS="${CXXFLAGS} -DNDEBUG" \
+ cmake -B build -S "${pkgname}-${pkgver}" \
+ -DCMAKE_BUILD_TYPE='None' \
+ -DCMAKE_INSTALL_PREFIX='/usr' \
+ -DCMAKE_SKIP_RPATH='TRUE'
+ cmake --build build
}
package() {
- install -Dm755 "build/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
- install -Dm644 "${pkgname}-${pkgver}/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
- install -Dm644 "${pkgname}-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
+ DESTDIR="${pkgdir}" cmake --install build
-# vim: ts=2 sw=2 et: \ No newline at end of file
+ install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" "${pkgname}-${pkgver}/README.md"
+ install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" "${pkgname}-${pkgver}/LICENSE"
+}