# -*- coding: ascii; tab-width: 4 -*-
Package: gnulib
Version: 20231002
Revision: 1
Description: GNU portability library
DescDetail: <<
	Gnulib, the GNU portability library, is a macro system and C
	declarations and definitions for commonly-used API elements and
	abstracted system behaviors. It can be used to improve portability and
	other functionality in your programs.
<<
DescUsage: <<
	Please install the following to properly use gnulib-tool:
	autoconf2.6,
	automake1.15,
	gettext-tools,
	libtool2
<<
DescPackaging: <<
	gnulib doesn't make official releases. Use a snapshot from the
	repo at git://git.savannah.gnu.org/gnulib.git
	
	Separate docs archive contains a pre-built MODULES.html file since
	it takes a loooooooong time to generate it.
<<
# Note that multiple licenses are used among the various modules,
# usually GPL but many are GPL/LGPL dual licensed.
License: GPL
Homepage: http://www.gnu.org/software/gnulib/
Maintainer: Daniel Johnson <daniel@daniel-johnson.org>

Source: https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=snapshot;h=0346e2edf270eeef64bc537136b20ff07f3ecf27;sf=tgz
SourceRename: %n-0346e2e.tar.gz
Source-Checksum: SHA256(cb046123104d0a70476eb55977e03c89d98cae213d67a5eff567401a3e7f8a3b)
Source2: mirror:sourceforge:fink/miscellaneous/repackaged/%n-0346e2e_MODULES.html.gz
Source2-Checksum: SHA256(49142cdfca44b8cecd9730b198cbc3769d77b0a83fa6bdc5ba4315753016870f)

Recommends: <<
	autoconf2.6,
	automake1.15,
	gettext-tools,
	libtool2
<<
Depends: <<
	sed
<<
BuildDepends: <<
	coreutils,
	texinfo (>= 5-1)
<<

PatchScript: <<
	perl -pi -e 's,\tdate ,\tgdate ,' doc/Makefile
	perl -pi -e 's, date , gdate ,' MODULES.html.sh
<<

CompileScript: <<
	make info html
#	The following can take an hour or so to run...
#	make regen
#	...so instead we use our pre-generated file:
	gzip -cd ../*_MODULES.html.gz > MODULES.html
<<

# self-tests are *very* long (see debian package for ideas)

InstallScript: <<
	mkdir -p %i/bin
	perl -pi -e 's, gnulib_dir=.*$, gnulib_dir=%p/share/gnulib,' gnulib-tool
	
	mkdir -p %i/share/%n
	cp -pR build-aux posix-modules config doc lib m4 modules top tests MODULES.html.sh MODULES.html Makefile %i/share/%n
	install -m 0755 check-module gnulib-tool %i/share/%n
	ln -s %p/share/%n/check-module %i/bin
	ln -s %p/share/%n/gnulib-tool %i/bin
	
	# Using 'cp -p' and 'install -m' mean we don't need to set a lot
	# of perms manually or keep changing to keep up with whatever
	# files are added/removed in each version -- dmacks
#	chmod 0755 %i/share/%n/build-aux/config.guess
#	chmod 0755 %i/share/%n/build-aux/config.sub
#	chmod 0755 %i/share/%n/build-aux/gendocs.sh
#	chmod 0644 %i/share/%n/doc/gendocs_template
#	chmod 0755 %i/share/%n/lib/config.charset
#	chmod 0644 %i/share/%n/m4/fflush.m4
#	chmod 0644 %i/share/%n/modules/canonicalize-lgpl
#	chmod 0644 %i/share/%n/modules/fflush
#	chmod 0644 %i/share/%n/modules/fflush-tests
#	chmod 0644 %i/share/%n/tests/test-base64.c
#	chmod 0755 %i/share/%n/tests/test-closein.sh
#	chmod 0644 %i/share/%n/tests/test-fflush.c
#	chmod 0755 %i/share/%n/tests/test-posix_spawn1.in.sh
#	chmod 0755 %i/share/%n/tests/test-posix_spawn2.in.sh

	mkdir -p %i/share/info
	install -m 644 doc/gnulib.info %i/share/info
<<

DocFiles: ChangeLog COPYING DEPENDENCIES NEWS README doc/gnulib.html
InfoDocs: %n.info