~alpine/aports

main/snappy-static: add package for static library v1 SUPERSEDED

: 1
 main/snappy-static: add package for static library

 1 files changed, 14 insertions(+), 2 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/aports/patches/3271/mbox | git am -3
Learn more about email & git

[PATCH] main/snappy-static: add package for static library Export this patch

From: Sascha Brawer <sascha@brawer.ch>

https://gitlab.alpinelinux.org/alpine/aports/issues/11212
---
 main/snappy/APKBUILD | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/main/snappy/APKBUILD b/main/snappy/APKBUILD
index 3ad4a42437..54718c7ac1 100644
--- a/main/snappy/APKBUILD
+++ b/main/snappy/APKBUILD
@@ -2,18 +2,27 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=snappy
pkgver=1.1.8
pkgrel=0
pkgrel=1
pkgdesc="Fast compression and decompression library"
url="https://google.github.io/snappy/"
arch="all"
license="BSD-3-Clause"
makedepends="cmake"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-static"
source="$pkgname-$pkgver.tar.gz::https://github.com/google/snappy/archive/$pkgver.tar.gz
	optimize-mips-s390x.patch
	"

build() {
	# Build static library
	cmake . \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=/usr/lib \
		-DBUILD_SHARED_LIBS=OFF
	cmake --build .

	# Build shared library
	cmake . \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
@@ -29,6 +38,9 @@ check() {
package() {
	make DESTDIR="$pkgdir" install

	install -d "$pkgdir"/../snappy-static/usr/lib
	install -m644 libsnappy.a "$pkgdir"/../snappy-static/usr/lib/libsnappy.a

	local file; for file in AUTHORS CONTRIBUTING.md COPYING NEWS README.md \
		format_description.txt framing_format.txt; do
		install -m644 -D $file "$pkgdir"/usr/share/doc/$pkgname/$file
-- 
2.24.1