# Original: yuki-san # Modified: TheRealOne78 pkgname=cmigemo-git pkgver=1_2.r49.ge0f6145 pkgrel=1 pkgdesc="An implementation of Migemo in C" arch=('i686' 'x86_64') url="http://www.kaoriya.net/software/cmigemo/" license=('MIT' 'custom') makedepends=('git' 'nkf' 'curl') provides=('cmigemo') conflicts=('cmigemo') source=("${pkgname%-git}"::'git+https://github.com/koron/cmigemo.git') md5sums=('SKIP') options=(!makeflags) pkgver() { cd "$srcdir/${pkgname%-git}" 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 } package() { cd "$srcdir/${pkgname%-git}" 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: