business_isbn_data: new perl module recipe

This commit is contained in:
Joachim Mairböck
2025-01-06 17:56:27 +01:00
parent 977393f2bf
commit fe8e429fd9

View File

@@ -0,0 +1,63 @@
SUMMARY="Data pack for Business::ISBN"
DESCRIPTION="You don't need to load this module yourself in most cases. Business::ISBN will load \
it when it loads. You must use Business::ISBN 3.005 or later because the data structure changed \
slightly to fix a bug with ISBN13 prefixes.
These data are generated from the RangeMessage.xml file provided by the ISBN Agency. The \
distributed version matches the date in the version for this module. You can retrieve this \
yourself at https://www.isbn-international.org/range_file_generation. This file is included as \
part of the distribution and should be installed at ~lib/Business/ISBN/Data/RangeMessage.xml.
If you want to use a different RangeMessage.xml file, you can set the ISBN_RANGE_MESSAGE \
environment variable to the alternate location before you load Business::ISBN. This way, you can \
use the latest (or even earlier) data without having to install something new or wait for an \
update to this module.
If the default RangeMessage.xml or your alternate one is not available, the module falls back to \
data included in Data.pm. However, that data are likely to be older. If it does not find that \
file, it looks for RangeMessage.xml in the current directory.
The data are in %Business::ISBN::country_data (although the \"country\" part is historical). If \
you want to see where the data are from, check $Business::ISBN::country_data{_source}."
HOMEPAGE="https://metacpan.org/pod/Business::ISBN::Data"
COPYRIGHT="2002-2024, brian d foy"
LICENSE="Artistic v2.0"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/B/BR/BRIANDFOY/Business-ISBN-Data-$portVersion.tar.gz"
CHECKSUM_SHA256="3ab94945e7454e12e7232d5af43b5c7e22b8931c68b08172441d756b7f4815a4"
SOURCE_DIR="Business-ISBN-Data-$portVersion"
ARCHITECTURES="any"
PROVIDES="
business_isbn_data = $portVersion
"
REQUIRES="
haiku
vendor_perl
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:make
cmd:perl
"
BUILD()
{
perl Makefile.PL PREFIX=$prefix
make
}
INSTALL()
{
make pure_install
# remove architecture-specific files
cd $prefix
rm -r $(perl -V:vendorarch | cut -d\' -f2 | cut -d/ -f5-)
# cut extracts the quoted string and strips the prefix (which is perl's and not ours)
}
TEST()
{
make test
}