#
# spec file for package abi-compliance-checker
#
# Copyright (c) 2017 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:           abi-compliance-checker
Version:        2.2
Release:        1.1
Summary:        A Compliance Checker For library ABIs
License:        GPL-2.0+ or LGPL-2.0+
Group:          Development/Tools/Other
Url:            http://ispras.linuxfoundation.org/index.php/ABI_compliance_checker
Source0:        https://github.com/lvc/abi-compliance-checker/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  help2man
Requires:       abi-dumper >= 1.1
Requires:       binutils
Requires:       coreutils
Requires:       cpio
Requires:       diffutils
Requires:       file
Requires:       gcc
Requires:       gzip
Requires:       perl-base
Requires:       rpm
Requires:       tar
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
ABI Compliance Checker (ACC) is an easy-to-use tool for checking
backward binary compatibility (BC) of a shared C/C++ library.
It checks header files along with shared libraries of old and new
versions and analyzes changes in Application Binary Interface (ABI)
that may cause compatibility problems: changes in calling stack,
v-table changes, removed symbols, etc. Breakage of the binary
compatibility may result in crashing or incorrect behavior of
applications built with an old version of the library if they run on
a new one. The tool is intended for library developers and operating
system maintainers who are interested in ensuring binary
compatibility, i.e. allow old applications to run with newer library
versions without the need to recompile.

%prep
%setup -q

%build
chmod 0755 %{name}.pl

%install
mkdir -vp %{buildroot}%{_prefix}
env \
	"DESTDIR=%{buildroot}"  \
	perl Makefile.pl -install \
	--prefix=%{_prefix}
# Generate man page with help2man
mkdir -p %{buildroot}%{_mandir}/man1
ln -s %{name}.pl %{name}
help2man -h "--info" -N -o %{name}.1 ./%{name}
install -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1
%fdupes %{buildroot}

%files
%defattr(-,root,root)
%doc README LICENSE doc GPL-2.0 LGPL-2.0
%{_bindir}/*
%{_datadir}/%{name}
%{_mandir}/man*/*

%changelog
* Sun Sep  3 2017 astieger@suse.com
- update to 2.2:
  * Improve support for Fortran
  * Fix analysis of inline functions
  * Fix analysis of calling conventions
  * Fix handling of C++ keywords in C code
  * Fix -lang option
  * Fix handling of errors when compressing ABI dumps
  * Fix style of the report
* Wed Jul  5 2017 astieger@suse.com
- update to 2.1:
  * Show added v-table symbols for public classes
  * Fixed analysis of static methods
  * Fixed analysis of typedefs
  * Fixed analysis of zero-size structs
  * Fixed logs
  * Fixed analysis of static libraries on Windows
  * Fixed search for files on Windows
  * Documented -skip-internal-types option in -help
  * Add noindex meta tag to report if no changes detected
* Sat Mar 25 2017 astieger@suse.com
- update to 2.0:
  * faster on big libraries
  * Add a module to create ABI dump from AST tree
  * Add a module to create AST dump
  * Add a module to parse GCC AST
  * Add a module to find system files and automatically generate include paths
  * Add a module to mangle C++ symbols
  * Add a module to read ELF binaries
  * Add a module to handle type attributes
  * Add a module to handle XML descriptors
  * Add a module to filter symbols
  * Add a module to handle input data
  * Add a module for logging
  * Partial support for GCC 6
  * Compare versioned data types
  * Add -filter option: a path to XML descriptor with skip_* rules
    to filter analyzed symbols in the report
  * Added -keep-cxx option to check ZS, ZNS and _ZNKS* symbols
  * Fix automatic generation of include paths
  * Fix report for removed virtual symbols
  * Fix XML-format ABI dumps
  * Fix source-compatibility reports
  * Fix counter of checked data types
  * Fix lists of affected symbols
  * Fix analysis of standard C++ libraries
  * Fix analysis of added and removed virtual methods
  * Fix style of the report
  * Fix analysis of alias symbols
  * Uncover changed typedefs properly
  * Fix Parameter_From_Register and Parameter_To_Register rules
  * Fix analysis of data types derived from template instances
  * Enable -headers-only option automatically if header file is
    used as input library descriptor
  * Fix analysis of template instances
  * Fix analysis of static data
  * Fix error message if modules are not installed
  * Fix analysis of versioned symbols
  * Fix -ext option
  * Fix -use-dumps option
  * Fix -debug option
  * Fix console output
* Fri Jan 13 2017 astieger@suse.com
- update to 1.99.25:
  * test-abi-dumper: compare ABI dumps created by the ABI Dumper
    tool
  * Do not list a symbol as removed in the source-compatibility
    report if it is presented in the dynsym table
* Thu Oct  6 2016 davejplater@gmail.com
- Update to 1.99.24
- Upstream changes:
  Improvements
  * Support for Clang
  * Improved a module to compare operating systems
  * Improved support for C++ keywords in C code
  New Options
  * -skip-typedef-uncover: do not report a problem if type is
    covered or uncovered by typedef (useful for broken debug info)
  * -skip-unidentified: skip header files in 'headers' and
    'include_preamble' sections of the XML descriptor that cannot
    be found
  * -disable-constants-check: do not check for changes in
    constants
  * -skip-added-constants: do not detect added constants
  * -skip-removed-constants: do not detect removed constants
  Bug Fixes
  * Do not show GCC version in the source compatibility report
  * Renamed CPU Type column to Arch in the report
  * Support for ABI dumps v3.3
  * The -cpp-compatible option is now enabled by default
* Wed Sep 14 2016 astieger@suse.com
- update to 1.99.23:
  * Fixed lists of affected symbols in the XML-format report
  * Added -disable-quick-empty-report option
  * Improved generation of quick empty reports
  * Improved SysCheck.pm module for analysis of operating systems
* Fri Jul 15 2016 astieger@suse.com
- Update to 1.99.22:
  * New style of the report
  * -old-style: generate old-style report
  * Fixed handling of patterns in -skip-* options
  * Fixed rounding of the BC rate in the report
* Tue May 31 2016 astieger@suse.com
- Update to 1.99.21:
  * Up to 4 times faster on big libraries
  * Show compatibility rate instead of verdict in the report
  * Highlight the numbers of high/medium/low severity problems in the report
  * Show percentage of affected methods in the problem description
  * New Options:
  - count-symbols: count public symbols in the ABI dump
  * Fixed quick comparison of equal ABI dumps
- includes changes from 1.99.20:
  * Use regular expressions instead of wildcards in -skip-* options
- includes changes from 1.99.19:
  * Support for GCC 5.1
- includes changes from 1.99.18:
  * Fixed comparison of qualifiers in parameter data types
  * Fixed problem descriptions in the report
  * Reduced size of the report
  * Fixed console output
- includes changes from 1.99.17:
  * Added a check for changes in parameters of function pointers
  * Fixed comparison of virtual table entries
  * Do not show time stamp in the report
  * Fixed -skip-symbols option
  * Fixed detection of the GCC version number
- includes changes from 1.99.16:
  * Do not check private part of the ABI when comparing ABI dumps
    created by the ABI Dumper tool with use of the -public-headers option
  * New option: -check-private-abi: enable check of the private ABI
  * Fixed counting of checked data types
- License is GPL-2.0+ or LGPL-2.0+
* Sat Dec 12 2015 davejplater@gmail.com
- Update to version 1.99.15
- Used --info with help2man to obtain a better man page.
- Upstream changes see :
  /usr/share/doc/packages/abi-compliance-checker/doc/Changes.html
* Wed Nov  5 2014 boris@steki.net
- add buildroot definition on SLE 11 target
* Thu Aug 28 2014 olaf@aepfle.de
- Update to abi-compliance-checker-1.99.9.1
  commit 6bdaa96
* Mon Mar  5 2012 davejplater@gmail.com
- Update to abi-compliance-checker-1.96.8
- Upstream changes : See :
  /usr/share/doc/packages/abi-compliance-checker/doc/Changes.html
* Mon Jun 20 2011 pth@suse.de
- Remove needless echo in %%%%build
* Fri Jun 17 2011 davejplater@gmail.com
- Added help2man generator for man page to spec file.
* Thu Jun 16 2011 davejplater@gmail.com
- Created package.