# # spec file for package perl-SQL-Translator # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: perl-SQL-Translator Version: 0.11024 Release: 28.2 #Upstream: Artistic-1.0 or GPL-1.0+ %define cpan_name SQL-Translator Summary: Manipulate Structured Data Definitions (Sql and More) License: (Artistic-1.0 or GPL-1.0+) and GPL-2.0 Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/SQL-Translator/ Source0: https://cpan.metacpan.org/authors/id/I/IL/ILMARI/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Carp::Clan) BuildRequires: perl(DBI) >= 1.54 BuildRequires: perl(Digest::SHA) BuildRequires: perl(File::ShareDir) >= 1.0 BuildRequires: perl(JSON) >= 2.0 BuildRequires: perl(Moo) >= 1.000003 BuildRequires: perl(Package::Variant) >= 1.001001 BuildRequires: perl(Parse::RecDescent) >= 1.967009 BuildRequires: perl(Sub::Quote) BuildRequires: perl(Test::Differences) BuildRequires: perl(Test::Exception) >= 0.310000 BuildRequires: perl(Test::More) >= 0.88 BuildRequires: perl(Try::Tiny) >= 0.04 BuildRequires: perl(XML::Writer) >= 0.500 BuildRequires: perl(YAML) >= 0.66 Requires: perl(Carp::Clan) Requires: perl(DBI) >= 1.54 Requires: perl(Digest::SHA) Requires: perl(File::ShareDir) >= 1.0 Requires: perl(Moo) >= 1.000003 Requires: perl(Package::Variant) >= 1.001001 Requires: perl(Parse::RecDescent) >= 1.967009 Requires: perl(Sub::Quote) Requires: perl(Try::Tiny) >= 0.04 Recommends: perl(GD) Recommends: perl(Graph::Directed) Recommends: perl(GraphViz) Recommends: perl(Spreadsheet::ParseExcel) >= 0.41 Recommends: perl(Template) >= 2.20 Recommends: perl(Text::RecordParser) >= 0.02 Recommends: perl(XML::LibXML) >= 1.69 %{perl_requires} %description This documentation covers the API for SQL::Translator. For a more general discussion of how to use the modules and scripts, please see SQL::Translator::Manual. SQL::Translator is a group of Perl modules that converts vendor-specific SQL table definitions into other formats, such as other vendor-specific SQL, ER diagrams, documentation (POD and HTML), XML, and Class::DBI classes. The main focus of SQL::Translator is SQL, but parsers exist for other structured data formats, including Excel spreadsheets and arbitrarily delimited text files. Through the separation of the code into parsers and producers with an object model in between, it's possible to combine any parser with any producer, to plug in custom parsers or producers, or to manipulate the parsed data via the built-in object model. Presently only the definition parts of SQL are handled (CREATE, ALTER), not the manipulation of data (INSERT, UPDATE, DELETE). %prep %setup -q -n %{cpan_name}-%{version} find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644 # MANUAL BEGIN sed -i -e 's/use inc::Module::Install/use lib q[.];\nuse inc::Module::Install/' Makefile.PL # MANUAL END %build %{__perl} Makefile.PL INSTALLDIRS=vendor %{__make} %{?_smp_mflags} %check %{__make} test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc AUTHORS Changes README %changelog * Wed Jan 10 2018 coolo@suse.com - updated to 0.11024 see /usr/share/doc/packages/perl-SQL-Translator/Changes 0.11024 2018-01-09 * Remove temporary diagnostics added in 0.11023_01 0.11023_02 2017-12-08 * Make maybe_plan skip on unrecognised failures to load modules 0.11023_01 2017-12-07 * Add diagnostics to t/postgresql-rename-table-and-field.t that's failing mysteriously on some smokers * Fri Dec 8 2017 coolo@suse.com - updated to 0.11023 see /usr/share/doc/packages/perl-SQL-Translator/Changes 0.11023 2017-12-05 * Fix error handling for Test::PostgreSQL 1.20 * Tue Dec 5 2017 coolo@suse.com - updated to 0.11022 see /usr/share/doc/packages/perl-SQL-Translator/Changes 0.11022 2017-12-04 * Add support for monotonically increasing SQLite autoincs (GH#47) * Add support for CHECK constraint in SQLite producer (GH#57) * Add support for CHECK constraint in POD producer (GH#63) * Fix forgotten quoting in the MySQL DROP TABLE diff producer (GH#50) * Fix Pg grammar parsing of UUID, time, timetz columns (RT#100196, GH#52) * Add support for USING and WHERE on indexes in PostgreSQL producer and parser (RT#63814, GH#52) * Improve add_trigger consistency between producers (GH#48) * Add trigger 'scope' attribute support to JSON, YAML and XML producers, and XML and SQLite parsers (RT#119997) * Declare dependencies in deterministic order (RT#102859) * Multiple speedups of naive internal debugging mechanism (GH#54) * Remove dependency on List::MoreUtils ( http://is.gd/lmu_cac_debacle ) * Fix parsing of strings with leading whitespace for MySQL, Oracle, PostgreSQL, SQLServer and SQLite * Fix parsing of MySQL column comments (RT#83380) * Fix multi-line comments in YAML, JSON and PostgreSQL producers * Fix identifier quoting in PostgreSQL diff producer * Fix incorrect type conversion from various BigInt AutoIncrement to the PostgreSQL-specific bigserial (GH#72) * Fix missing semicolons between PostGIS statements * Fix string and identifier quoting in PostGIS statements * Fix intermittent test failures (RT#108460) * Fix relying on exact serialisation for JSON/YAML tests (RT#121901) * Tue Oct 3 2017 coolo@suse.com - patch the Makefile to build with perl 5.26 * Sat Feb 7 2015 coolo@suse.com - updated to 0.11021 * Fix Oracle producer generating an unnecessary / at the end in case there are no triggers * Skip HTML tests if CGI is not installed (RT#98027) * Fix JSON and YAML tests if the defaults have been tweaked (RT#98824) * Fixes for parsing and producing identifiers and values that need quoting and escaping for SQLite, MySQL, PostgreSQL, SQLServer and Oracle (RT#90700, RT#31034) * Add support for ALTER TABLE ... ADD CONSTRAINT to Oracle parser * Add trigger support to Oracle parser (RT#62927) * Fix erroneous PostgreSQL floating point type translations (RT#99725) * Remove executable bit from Parser/JSON.pm (RT#100532) * Update the Free Software Foundation's address (RT#100531) * Provide default index names for SQLite (GH#45) * Fix SQLite diffing on perl 5.8.1 * Fix multi-column indexes in Parser::DBI::PostgreSQL * Fix array data types in Parser::PostgreSQL (GH#49) * Fix multidimensional sizes in Parser::PostgreSQL * Tue Dec 2 2014 coolo@suse.com - require YAML, actually required by Translator:YAML * Tue Sep 16 2014 coolo@suse.com - updated to 0.11020 * Fix test failure if Test::PostgreSQL is installed but not working 0.11019 2014-09-02 * Add Json and hstore types to Pg Parser (cloudinstustrie) * Fix DROP TABLE in SQL Server Producer * Fix Pg DBI parser test (Dagfinn Ilmari Mannsåker) * Remove spurious warnings (Matt Phillips, Wallace Reis) * Fix MySQL producer for columns with scalar ref in 'ON UPDATE' (Wallace Reis) * Fix handling of views in MySQL DBI parser * Fix handling of renamed fields in SQLite diff (Peter Mottram) * Check numeric equality of default values in numeric-type fields (Wallace Reis) * Fix handling of renamed fields in renamed tables in Pg diff (Peter Mottram) * Mon Nov 25 2013 coolo@suse.com - updated to 0.11018 * Apply quotes to fix tables that are reserved words, DBI::SQLServer (Jonathan C. Otsuka) * Add DECIMAL_DIGITS to field size for scale info, DBI::SQLServer (Jonathan C. Otsuka) * De-linkify XML namespace in docs (RT#81838) * Allow both single and double quotes for values in MySQL parser * Fix diff for altering two things per column - add ; at the end * Call all diff methods in list context (it can be merged later) * Fix Pg diff issue with drop constraint on primary keys * SQLite support for SET NULL, SET DEFAULT and NO ACTION in FK clauses * Clean up properly after Parser::DBI::PostgreSQL tests * Fix typos in error messages * Add SQL_TINYINT and SQL_BIGINT to the type map in SQL::Translator::Schema::Field * Add JSON parser and producer (Jon Jensen) * Clean up TTSchema doc some (Gavin Shelley) * Mon Aug 5 2013 cfarrell@suse.com - license update: (Artistic-1.0 or GPL-1.0+) and GPL-2.0 See e.g. script/sqlt * Tue Jul 30 2013 coolo@suse.com - updated to 0.11016 * Allow passing an arrayref to SQLT->filename (lost in Mooification) * Fix stupid missing version number in SQL::Translator::Schema::Object * Relicense under Perl 5 terms * Remove SQL::Translator::Schema::Graph as announced in 0.11011 * Remove a number of no longer needed deps * Fix missing dep (List::MoreUtils) * Convert SQL::Translator, ::Schema and ::Schema::* to Moo * Fix leaks by weakening circular references between schema objects * Make MySQL producer add NULL after every nullable field, conforming to SQL standard, and avoiding MySQL bugs - remove sqlite.patch which was declined upstream * Wed Jan 11 2012 cfarrell@suse.com - license update: GPL-2.0 See Translator.pm - this is GPL-2.0 * Wed Jan 11 2012 coolo@suse.com - update to 0.11010 * Add "if exists" to drop view statements in Pg. * Fix MySQL producer to properly quote all table names on output (patch from geistteufel) * Correctly create and parse FK constraints in SQLite * Correct postgis geography type insertion and linebreak fix for multiple geometry/geography columns * made PostgreSQL producer consistent with other producers in terms of quoting and allowing functions in constraints and indices * Add distinction of autoinc and regular primary keys to the GraphViz producer * Fix odd invocation of Test::More::pass() in t/36-filters.t (RT#64728) * Quote everything in SQL Server * Turn off constraints before dropping tables in SQL Server * Make true unique constraints if needed in SQL Server * Fixed Producer::PostgresSQL to output array type after type size, i.e. varchar(64)[] rather than varchar[](64) * Wed Dec 1 2010 coolo@novell.com - switch to perl_requires macro * Sun Oct 17 2010 chris@computersalat.de - fix build o auto directory is included in the perl package - fix deps o IO::Scalar 2.11 > 2.110 o XML::Writer 0.5 > 0.500 * Thu Oct 14 2010 jw@novell.com - added sqlite.patch to implement more SQLite syntax. Upstreamed as https://rt.cpan.org/Ticket/Display.html?id=62153 * Tue Oct 12 2010 jw@novell.com - initial package 0.11006 * created by cpanspec 1.78.02