diff options
author | Tim Schumacher | 2019-03-01 19:10:09 +0100 |
---|---|---|
committer | Tim Schumacher | 2019-03-01 19:10:09 +0100 |
commit | e08d648249d5696f31ec352ac6a8c15d048b2395 (patch) | |
tree | 5cfec3e4b77a84360934465eb53da4d26c9f5033 /PKGBUILD | |
parent | a780d225231adcdc23fafd41c18c8ee6bc343f38 (diff) | |
download | aur-e08d648249d5696f31ec352ac6a8c15d048b2395.tar.gz |
gitahead: Make it source-built
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 43 |
1 files changed, 26 insertions, 17 deletions
@@ -6,45 +6,54 @@ pkgname=gitahead pkgrel=1 pkgver=2.5.4 -pkgdesc='The most powerful git gui' +pkgdesc='Understand your Git history!' url='http://gitahead.scitools.com/' arch=('x86_64') license=('custom') depends=('curl') +makedepends=('cmake' 'ninja') source=( - "gitahead-${pkgver}.bin::https://github.com/gitahead/gitahead/releases/download/v${pkgver}/GitAhead-${pkgver}.sh" + "git+https://github.com/gitahead/gitahead#tag=v${pkgver}" "gitahead-license" "gitahead.desktop" "gitahead.png" "gitahead.sh" ) -sha256sums=('9c8cc220b2ad46945f7247855dd6f4b04336e95acdf3eb94b8444d9ef696c943' +sha256sums=('SKIP' 'd71bfb48c954d213986816fc29478c7f80c8bd2dd10d2889bf51897d649eedd6' '6070ebf6752f55f8b7d8a79107ce491c3acf04310eeb9a8242b83cfb4df055f2' '66cb53fc57eb2ce2e6cd02ff392476fdfb91b723b76ef5da1856e9b5dc1b5c75' 'ba4e21c675ce7f49e6df27df1f29d1bb99c47679c4981657a2a4cf5d59930b4a') prepare() { - gzip_offset=$(grep -baoU -m 1 "$(printf '\x1f\x8b')" gitahead-${pkgver}.bin | awk '{print $1}' FS=':') + cd "$srcdir/gitahead" + git submodule update --init --recursive +} - if [ -z "${gzip_offset}" ]; then - echo "error: No GZip header found" - return 1 - fi +build() { + # Building openssl + echo "--- Building openssl ---" + cd "$srcdir/gitahead/dep/openssl/openssl" + ./config -fPIC + make - dd if=gitahead-${pkgver}.bin of=gitahead-${pkgver}.tar.gz iflag=skip_bytes skip=${gzip_offset} 2> /dev/null - mkdir -p gitahead-${pkgver} - bsdtar xf gitahead-${pkgver}.tar.gz -C gitahead-${pkgver} + echo "--- Building gitahead ---" + # Build gitahead + if [ ! -d "$srcdir/gitahead-build" ]; then + mkdir "$srcdir/gitahead-build" + fi + cd "$srcdir/gitahead-build" + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${pkgdir}/opt/gitahead" ../gitahead + ninja } package() { - install -d "${pkgdir}/opt" - cp -R "${srcdir}/gitahead-${pkgver}" "${pkgdir}/opt/gitahead" + cd "$srcdir/gitahead-build" + + ninja install - find "${pkgdir}/opt/gitahead/" -type f -exec chmod 644 {} \; - chmod 755 "${pkgdir}/opt/gitahead/GitAhead" - chmod 755 "${pkgdir}/opt/gitahead/indexer" - chmod 755 "${pkgdir}/opt/gitahead/relauncher" + # TODO: Figure out how to only call GitAheads install routine + rm -rf "${pkgdir}/opt/gitahead/"{bin,include,lib,lib64,share} install -D -m644 "${srcdir}/gitahead-license" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -D -m755 "${srcdir}/gitahead.sh" "${pkgdir}/usr/bin/gitahead" |