Info2: <<
Package: libspdylay7
# Deprecated. Made obsolete by HTTP/2 protocol.
Version: 1.4.0
Revision: 4
Distribution: 10.9, 10.10, 10.11, 10.12, 10.13, 10.14, 10.14.5, 10.15
Description: Library implements SPDY protocol
DescDetail: <<
	%n implements the 2, 3 and 3.1 SPDY protocols.
<<
Maintainer: Daniel Johnson <daniel@daniel-johnson.org>
Homepage: https://tatsuhiro-t.github.io/spdylay/
License: BSD

Source: https://github.com/tatsuhiro-t/spdylay/releases/download/v%v/spdylay-%v.tar.xz
Source-Checksum: SHA256(1a133578dd330f5ff3b1c25798c0594e39858e6a050513e5d7ec31eda6e89341)

Depends: %n-shlibs (= %v-%r)

BuildDepends: <<
	fink (>= 0.32),
	fink-package-precedence,
	libevent2.1.7 (>= 2.1.12-2),
	libiconv-dev,
	libxml2,
	openssl300-dev,
	pkgconfig
<<
GCC: 4.0
BuildDependsOnly: true

ConfigureParams: <<
	--enable-silent-rules \
	--enable-dependency-tracking \
	--disable-static \
	--disable-examples \
	--disable-xmltest \
	ZLIB_CFLAGS=" " ZLIB_LIBS=-lz
<<
SetCPPFLAGS: -I%b/lib/includes

CompileScript: <<
	%{default_script}
	fink-package-precedence --prohibit-bdep=%n .
<<

# System Integrity Protection on 10.11 breaks use of DYLD_LIBRARY_PATH.
# Use install_name_tool to temporarily change the install_name to allow tests.
InfoTest: <<
	TestDepends: cunit1
	TestScript: <<
		#!/bin/sh -ev
		[[ ! -f /usr/bin/python ]] && perl -pi -e 's|env python|$&3|g' tests/end_to_end.py
		install_name_tool -id %b/lib/.libs/libspdylay.7.dylib  %b/lib/.libs/libspdylay.7.dylib
		# https://github.com/tatsuhiro-t/spdylay/issues/151
		#make check || exit 2
		# Given we want to allow a test to fail, we MUST
                # continue through with fixing install_name so that
                # InstallScript installs a valid file.
		make check ||
		install_name_tool -id %p/lib/libspdylay.7.dylib  %b/lib/.libs/libspdylay.7.dylib
		fink-package-precedence --prohibit-bdep=%n . || exit 2
	<<
<<

InstallScript: <<
	make install DESTDIR=%d
	rm -r %i/share/doc
	# Don't propagate dependency on zlib since system doesn't have zlib.pc.
	perl -pi -e 's/Requires.private: zlib//' %i/lib/pkgconfig/libspdylay.pc
<<

DocFiles: AUTHORS ChangeLog COPYING NEWS README.rst

SplitOff: <<
	Package: %N-shlibs
	Files: lib/libspdylay.7.dylib
	Shlibs: %p/lib/libspdylay.7.dylib 10.0.0 %n (>= 1.3.2-1)
	DocFiles: AUTHORS ChangeLog COPYING NEWS README.rst
<<

SplitOff2: <<
	Package: spdycat
	Description: SPDY client and server programs
	DescDetail: <<
		Contains the following programs:
		spdycat - Download via SPDY protocol
		spdyd   - SPDY server
		shprx   - Reverse proxy for SPDY/HTTP
		
		See README.rst for usage.
	<<
		Depends: <<
		%N-shlibs (>= %v-%r),
		libevent2.1.7-shlibs (>= 2.1.12-2),
		libiconv,
		libxml2-shlibs,
		openssl300-shlibs
	<<
	Files: bin
	DocFiles: AUTHORS ChangeLog COPYING NEWS README.rst
<<
<<