Add a build condition for disabling Excel file format support

epel9
Petr Písař 7 years ago
parent b8deb17a94
commit 47d8350b45

@ -1,3 +1,6 @@
# Enable Excel file format support
%bcond_without perl_SQL_Translator_enables_excel
Name: perl-SQL-Translator Name: perl-SQL-Translator
Summary: Manipulate structured data definitions (SQL and more) Summary: Manipulate structured data definitions (SQL and more)
Version: 0.11023 Version: 0.11023
@ -62,7 +65,9 @@ BuildRequires: perl(overload)
BuildRequires: perl(Package::Variant) >= 1.001001 BuildRequires: perl(Package::Variant) >= 1.001001
BuildRequires: perl(Pod::Usage) BuildRequires: perl(Pod::Usage)
BuildRequires: perl(Scalar::Util) BuildRequires: perl(Scalar::Util)
%if %{with perl_SQL_Translator_enables_excel}
BuildRequires: perl(Spreadsheet::ParseExcel) >= 0.41 BuildRequires: perl(Spreadsheet::ParseExcel) >= 0.41
%endif
BuildRequires: perl(Storable) BuildRequires: perl(Storable)
BuildRequires: perl(Sub::Quote) BuildRequires: perl(Sub::Quote)
BuildRequires: perl(Template) >= 2.20 BuildRequires: perl(Template) >= 2.20
@ -100,7 +105,9 @@ Requires: perl(JSON) >= 2.0
Requires: perl(overload) Requires: perl(overload)
Requires: perl(Package::Variant) >= 1.001001 Requires: perl(Package::Variant) >= 1.001001
Requires: perl(Parse::RecDescent) >= 1.967009 Requires: perl(Parse::RecDescent) >= 1.967009
%if %{with perl_SQL_Translator_enables_excel}
Requires: perl(Spreadsheet::ParseExcel) >= 0.41 Requires: perl(Spreadsheet::ParseExcel) >= 0.41
%endif
Requires: perl(Template) >= 2.20 Requires: perl(Template) >= 2.20
Requires: perl(Test::More) >= 0.88 Requires: perl(Test::More) >= 0.88
Requires: perl(Text::RecordParser) >= 0.02 Requires: perl(Text::RecordParser) >= 0.02
@ -120,7 +127,7 @@ SQL::Translator is a group of Perl modules that converts vendor-specific
SQL table definitions into other formats, such as other vendor-specific SQL table definitions into other formats, such as other vendor-specific
SQL, ER diagrams, documentation (POD and HTML), XML, and Class::DBI SQL, ER diagrams, documentation (POD and HTML), XML, and Class::DBI
classes. The main focus of SQL::Translator is SQL, but parsers exist classes. The main focus of SQL::Translator is SQL, but parsers exist
for other structured data formats, including Excel spreadsheets and for other structured data formats%{?with_perl_SQL_Translator_enables_excel:, including Excel spreadsheets} and
arbitrarily delimited text files. Through the separation of the code into arbitrarily delimited text files. Through the separation of the code into
parsers and producers with an object model in between, its possible to parsers and producers with an object model in between, its possible to
combine any parser with any producer, to plug in custom parsers or combine any parser with any producer, to plug in custom parsers or
@ -143,6 +150,11 @@ sed -i -e '/^inc\//d' MANIFEST
sed -i -e '1 s|^#!/usr/bin/env perl|#!%{__perl}|' script/* sed -i -e '1 s|^#!/usr/bin/env perl|#!%{__perl}|' script/*
# Fix permission, CPAN RT#100532 # Fix permission, CPAN RT#100532
chmod -x lib/SQL/Translator/Parser/JSON.pm chmod -x lib/SQL/Translator/Parser/JSON.pm
%if %{without perl_SQL_Translator_enables_excel}
# Remove Excel support
rm lib/SQL/Translator/Parser/Excel.pm
sed -i -e '/^lib\/SQL\/Translator\/Parser\/Excel\.pm/d' MANIFEST
%endif
%build %build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1

Loading…
Cancel
Save