~alpine/aports

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

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

Details
Message ID
<20200211081932.508-1-sascha@brawer.ch>
DKIM signature
missing
Download raw message
Patch: +14 -2
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
Reply to thread Export thread (mbox)