Package: nulib2
Version: 2.2.2
Revision: 1
Description: Apple II ShrinkIt archive utility
DescDetail: <<
	NuLib2 is a command-line archive utility, along the lines of "PKZIP". 
	It allows you to perform many common operations on NuFX archives, such
	as those created by the Apple II "ShrinkIt" utility, as well as Binary
	II archives.  Files with extensions "SHK", "SDK", "BXY", "BSE", "SEA",
	"BNY", and "BQY" are handled.

	You can add, delete, extract, test, and list files in a NuFX archive. 
	Compressed disk images can be extracted to files, and vice-versa,
	making it a handy utility to have when using an Apple II emulator.
<<
Maintainer: Daniel Johnson <daniel@daniel-johnson.org>
License: BSD
Homepage: http://www.nulib.com/

Source: https://codeload.github.com/fadden/%n/tar.gz/v%v
SourceRename: %n-%v.tar.gz
Source-Checksum: SHA256(eba4639bf62eccdd95e191d985efe2804c44e48f0837b210bb4e363e0f63b219)

PatchScript: <<
	#!/bin/bash -ev
	darwinvers=`uname -r | cut -f 1 -d .`
	if [ $darwinvers -gt 11 ]; then
		perl -pi -e 's,extern inline,inline,; s,/\*\*/,inline,' nufxlib/NufxLibPriv.h
	fi
<<

Depends: bzip2-shlibs
BuildDepends: bzip2-dev

UseMaxBuildJobs: false

ConfigureParams: --enable-bzip2 --mandir='${prefix}/share/man'

CompileScript: <<
	cd nufxlib && ./configure %c && make
	cd nulib2 && ./configure %c && make
<<

InstallScript: cd nulib2 && %{default_script}

DocFiles: README.md nulib2/ChangeLog.txt nulib2/COPYING nulib2/README.txt nufxlib/COPYING-LIB nufxlib/NOTES.txt