-
-
Save EndlessEden/bc53a5cfb802aac9728f9d85dde4b5b0 to your computer and use it in GitHub Desktop.
updated PKGBUILD - All areas fixed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: GreenRaccoon23 <GreenRaccoon a t gmail d o t com> | |
pkgname=snappy-git | |
pkgver=1.1.9.r13.gcbb83a1 | |
pkgrel=1 | |
pkgdesc='A fast compressor/decompressor library' | |
arch=('any') | |
url="https://google.github.io/snappy/" | |
license=('BSD') | |
depends=('glibc' 'gcc-libs') | |
conflicts=("${pkgname%-*}" "$pkgname") | |
checkdepends=('zlib') | |
makedepends=('git' 'benchmark-git') | |
provides=("$pkgname" 'snappy') | |
source=($pkgname::"git+https://github.com/google/${pkgname%-*}.git" | |
"https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/snappy/trunk/snappy.pc" | |
"system_gtest.patch::https://github.com/google/snappy/commit/114df35e84ad95b6d5afbcf69aa85a14ff029000.patch" | |
"fix_inline.patch::https://gist.githubusercontent.com/EndlessEden/9bf6e8554c9490762bffa9e08d5b1aef/raw/927d24f468d346a7b6b795785c2074f4bb39d719/fix_inline.patch") | |
md5sums=('SKIP' | |
'SKIP' | |
'SKIP' | |
'SKIP') | |
sha256sums=('SKIP' | |
'd210ff4d3ffe9a987b974a8387d967af66a93bf90d72fedce94a2159d937813e' | |
'ca96fd9e72f35ea63af82f19ff1ca93441bf5ea6b3f53ef4b974e83c249d8e3e' | |
'9840c787881205eabddb811e09187214b5d5b72c56a3f12e324075ec661393dd') | |
pkgver() { | |
cd "$srcdir"/"$pkgname" | |
( set -o pipefail | |
git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || | |
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | |
) | |
} | |
prepare() { | |
cd "$srcdir"/"$pkgname" | |
patch -p1 < ../system_gtest.patch # https://github.com/google/snappy/pull/132 | |
patch -p1 snappy.cc < ../fix_inline.patch # https://github.com/google/snappy/pull/128 | |
} | |
build() { | |
cd "$srcdir"/"$pkgname" | |
# compile without assertions | |
CXXFLAGS+=\ -DNDEBUG | |
cmake \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
-DCMAKE_INSTALL_LIBDIR=/usr/lib \ | |
-DCMAKE_BUILD_TYPE=RELEASE \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DSNAPPY_USE_BUNDLED_GTEST=OFF \ | |
-DSNAPPY_USE_BUNDLED_BENCHMARK_LIB=OFF \ | |
. | |
make | |
} | |
package() { | |
cd "$srcdir"/"$pkgname" | |
make DESTDIR="$pkgdir" install | |
install -m644 -D COPYING "$pkgdir/usr/share/licenses/snappy/LICENSE" | |
# upstream dropped the pkgconfig file and isn't interested in adding it back. | |
# https://github.com/google/snappy/pull/55 | |
install -Dm644 "$srcdir/snappy.pc" "$pkgdir/usr/lib/pkgconfig/snappy.pc" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment