Package Details: cmigemo-git rel.1_2.r38.g5c014a8-2

Git Clone URL: https://aur.archlinux.org/cmigemo-git.git (read-only, click to copy)
Package Base: cmigemo-git
Description: An implementation of Migemo in C
Upstream URL: http://www.kaoriya.net/software/cmigemo/
Licenses: custom, MIT
Conflicts: cmigemo
Provides: cmigemo
Submitter: yuki-san
Maintainer: None
Last Packager: yuki-san
Votes: 7
Popularity: 0.001035
First Submitted: 2013-09-11 04:04 (UTC)
Last Updated: 2015-06-11 07:10 (UTC)

Dependencies (3)

Required by (3)

Sources (1)

Latest Comments

TheRealOne78 commented on 2024-06-02 15:20 (UTC) (edited on 2024-06-02 15:27 (UTC) by TheRealOne78)

Hello, I've noticed a few packages flagged out of date on my system, so I've made a patch. Enjoy

From 294871b6cb4ff7e5bd77a37a2e5b96ffd41b7d62 Mon Sep 17 00:00:00 2001
From: TheRealOne78 <bajcsielias78@gmail.com>
Date: Sun, 2 Jun 2024 18:13:38 +0300
Subject: [PATCH] adjust pkgver() to remove the 'rel.' prefix; change build
 params to respect LDFLAGS (ELF files should be built with RELRO); remove
 insecure RUNPATHs.

---
 PKGBUILD | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index de2ee44..95dce6c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,12 @@
 # Maintainer: yuki-san <yuki.from.akita _at_ gmail.com>

 pkgname=cmigemo-git
-pkgver=rel.1_2.r38.g5c014a8
-pkgrel=2
+pkgver=rel.1_2.r49.ge0f6145
+pkgrel=1
 pkgdesc="An implementation of Migemo in C"
-arch=( 'i686' 'x86_64' )
+arch=('i686' 'x86_64')
 url="http://www.kaoriya.net/software/cmigemo/"
-license=('MIT' 'custom' )
+license=('MIT' 'custom')
 makedepends=('git' 'nkf' 'curl')
 provides=('cmigemo')
 conflicts=('cmigemo')
@@ -16,12 +16,14 @@ options=(!makeflags)

 pkgver() {
   cd "$srcdir/${pkgname%-git}"
-  git describe --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
+  git describe --tags | sed -E 's/^[^0-9]*//; s/([^-]*-g)/r\1/; s/-/./g'
 }

 build() {
   cd "$srcdir/${pkgname%-git}"

+  export LDFLAGS+="-z,relro,-z,now"
+
   ./configure --prefix=/usr
   make gcc
   make gcc-dict
@@ -33,6 +35,10 @@ package() {
   make prefix="$pkgdir"/usr docdir="$pkgdir"/usr/share/doc/cmigemo-git gcc-install
   install -d -m 755 "$pkgdir"/usr/share/licenses/cmigemo-git
   install -c -m 644 doc/LICENSE_j.txt "$pkgdir"/usr/share/licenses/cmigemo-git
+
+  find "$pkgdir" -type f -exec file {} \; | grep 'ELF' | cut -d: -f1 | while read -r binary; do
+    patchelf --remove-rpath "$binary"
+  done
 }

 # vim:set ts=2 sw=2 et:
-- 
2.45.1