patchelfcrc/AUR/PKGBUILD

41 lines
1.2 KiB
Bash

# Maintainer: Mario Hüttel <mario (dot) huettel (!) gmx (dot) net>
pkgname=patchelfcrc
pkgver=5e7f697
pkgrel=1
pkgdesc="Tool for patching CRC checksums of sections into ELF binaries"
arch=('i686' 'x86_64')
url="https://git.shimatta.de/mhu/patchelfcrc"
licence=('GPLv2')
depends=('libelf' 'libxml2')
makedepends=('cmake' 'pandoc' 'git' 'gvim')
provides=('patchelfcrc')
source=("${pkgname}-git"::"git+https://git.shimatta.de/mhu/patchelfcrc" "git+https://git.shimatta.de/3rd-party/libfort.git" "git+https://git.shimatta.de/mhu/linklist-lib")
sha1sums=('SKIP' 'SKIP' 'SKIP')
pkgver () {
_date=`date +"%Y%m%d"`
cd "${srcdir}/${pkgname}-git"
echo "$(echo "$(sh ./gen-version-string.sh)" | sed 's/-/_/g')"
}
build () {
mkdir "$srcdir/$pkgname-git/build"
cd "$srcdir/$pkgname-git/build"
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j12
}
prepare () {
cd "${pkgname}-git"
git submodule init
git config submodule.libfort.url "$srcdir/libfort"
git config submodule.linklist-lib "$srcdir/linklist-lib"
git submodule update
}
package () {
install -Dm755 "$srcdir/$pkgname-git/build/patchelfcrc" "$pkgdir/usr/bin/patchelfcrc"
install -Dm644 "$srcdir/$pkgname-git/build/man/patchelfcrc.1.gz" "$pkgdir/usr/share/man/man1/patchelfcrc.1.gz"
}