initial import
This commit is contained in:
64
snappy/PKGBUILD
Normal file
64
snappy/PKGBUILD
Normal file
@@ -0,0 +1,64 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=snappy
|
||||
pkgver=1.1.8
|
||||
_debver=$pkgver
|
||||
_debrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="A fast compressor/decompressor library"
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://google.github.io/snappy/"
|
||||
license=('Modified-BSD')
|
||||
depends=('glibc' 'gcc-libs')
|
||||
checkdepends=('zlib')
|
||||
makedepends=('cmake' 'clang' 'quilt')
|
||||
options=('staticlibs')
|
||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/google/snappy/archive/${pkgver}.tar.gz"
|
||||
"https://deb.debian.org/debian/pool/main/s/snappy/snappy_${_debver}-${_debrel}.debian.tar.xz"
|
||||
"snappy.pc")
|
||||
sha512sums=('efe18ff1b3edda1b4b6cefcbc6da8119c05d63afdbf7a784f3490353c74dced76baed7b5f1aa34b99899729192b9d657c33c76de4b507a51553fa8001ae75c1c'
|
||||
'753704332bfd232d8b56d6bd7e1c46eabb2ac2aa0f78803c1c606c455fe78cea5b5836fdeac1dc63ff169d12058d7cbdcf5581c2fd63f24aa140f9b2c14fb45e'
|
||||
'fceacd1173cd0ac8236a4a7eb4a5c776dcc3d39f89ab7795e1fad8f3af57f64bdd68f62d137cd7e6e619e6bebec62e8d4ee1ec95c8652ce92c920de63cda7789')
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
# compile without assertions
|
||||
CXXFLAGS+=\ -DNDEBUG
|
||||
|
||||
# export CXX=clang++
|
||||
|
||||
cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
|
||||
-DBUILD_SHARED_LIBS=yes \
|
||||
.
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
make DESTDIR="$pkgdir" install
|
||||
install -m644 -D COPYING "$pkgdir/usr/share/licenses/snappy/COPYING"
|
||||
|
||||
# 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"
|
||||
}
|
||||
Reference in New Issue
Block a user