79f09e
%define __cmake_in_source_build 1
79f09e
79f09e
Name:           libcomps
79f09e
Version:        0.1.18
79f09e
Release:        1%{?dist}
79f09e
Summary:        Comps XML file manipulation library
79f09e
79f09e
License:        GPLv2+
79f09e
URL:            https://github.com/rpm-software-management/libcomps
79f09e
Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
79f09e
79f09e
BuildRequires:  gcc-c++
79f09e
BuildRequires:  cmake
79f09e
BuildRequires:  gcc
79f09e
BuildRequires:  libxml2-devel
79f09e
BuildRequires:  check-devel
79f09e
BuildRequires:  expat-devel
79f09e
BuildRequires:  zlib-devel
79f09e
79f09e
%description
79f09e
Libcomps is library for structure-like manipulation with content of
79f09e
comps XML files. Supports read/write XML file, structure(s) modification.
79f09e
79f09e
%package devel
79f09e
Summary:        Development files for libcomps library
79f09e
Requires:       %{name}%{?_isa} = %{version}-%{release}
79f09e
79f09e
%description devel
79f09e
Development files for libcomps library.
79f09e
79f09e
%package doc
79f09e
Summary:        Documentation files for libcomps library
79f09e
Requires:       %{name} = %{version}-%{release}
79f09e
BuildArch:      noarch
79f09e
BuildRequires:  doxygen
79f09e
79f09e
%description doc
79f09e
Documentation files for libcomps library.
79f09e
79f09e
%package -n python-%{name}-doc
79f09e
Summary:        Documentation files for python bindings libcomps library
79f09e
Requires:       %{name} = %{version}-%{release}
79f09e
BuildArch:      noarch
79f09e
BuildRequires:  python3-sphinx
79f09e
79f09e
79f09e
%description -n python-%{name}-doc
79f09e
Documentation files for python bindings libcomps library.
79f09e
79f09e
%package -n python3-%{name}
79f09e
Summary:        Python 3 bindings for libcomps library
79f09e
BuildRequires:  python3-devel
79f09e
BuildRequires: make
79f09e
%{?python_provide:%python_provide python3-%{name}}
79f09e
Requires:       %{name}%{?_isa} = %{version}-%{release}
79f09e
Obsoletes:      platform-python-%{name} < %{version}-%{release}
79f09e
79f09e
%description -n python3-%{name}
79f09e
Python3 bindings for libcomps library.
79f09e
79f09e
%prep
79f09e
%autosetup -p1 -n %{name}-%{version}
79f09e
79f09e
mkdir build-py3
79f09e
mkdir build-doc
79f09e
79f09e
%build
79f09e
pushd build-py3
79f09e
  %cmake ../libcomps/
79f09e
  %make_build
79f09e
popd
79f09e
79f09e
pushd build-doc
79f09e
  %cmake ../libcomps/
79f09e
  make %{?_smp_mflags} docs
79f09e
  make %{?_smp_mflags} pydocs
79f09e
popd
79f09e
79f09e
%install
79f09e
pushd build-py3
79f09e
  %make_install
79f09e
popd
79f09e
79f09e
%check
79f09e
pushd build-py3
79f09e
  make test
79f09e
  make pytest
79f09e
popd
79f09e
79f09e
%if %{undefined ldconfig_scriptlets}
79f09e
%post -p /sbin/ldconfig
79f09e
%postun -p /sbin/ldconfig
79f09e
%else
79f09e
%ldconfig_scriptlets
79f09e
%endif
79f09e
79f09e
%files
79f09e
%license COPYING
79f09e
%doc README.md
79f09e
%{_libdir}/%{name}.so.*
79f09e
79f09e
%files devel
79f09e
%{_libdir}/%{name}.so
79f09e
%{_libdir}/pkgconfig/%{name}.pc
79f09e
%{_includedir}/%{name}/
79f09e
79f09e
%files doc
79f09e
%doc build-doc/docs/libcomps-doc/html
79f09e
79f09e
%files -n python-%{name}-doc
79f09e
%doc build-doc/src/python/docs/html
79f09e
79f09e
%files -n python3-%{name}
79f09e
%{python3_sitearch}/%{name}/
79f09e
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
79f09e
79f09e
%changelog
79f09e
* Mon Oct 25 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 0.1.18-1
79f09e
- Update to 0.1.18
79f09e
- Don't print empty requires
79f09e
- Remove Python 2 support
79f09e
79f09e
* Mon Aug 16 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 0.1.16-4
79f09e
- Fix issues detected by static analyzers
79f09e
79f09e
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.1.16-3
79f09e
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
79f09e
  Related: rhbz#1991688
79f09e
79f09e
* Tue Apr 27 2021 Pavla Kratochvilova <pkratoch@redhat.com> - 0.1.16-1
79f09e
- Update to 0.1.16
79f09e
- Fix a crash when clearing COMPS_ObjRTree (RhBug:1888343)
79f09e
- Fix memory leaks and resource leaks
79f09e
79f09e
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.1.15-7
79f09e
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
79f09e
79f09e
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.15-6
79f09e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
79f09e
79f09e
* Fri Aug 07 2020 Nicola Sella <nsella@redhat.com> - 0.1.15-5
79f09e
- spec: Fix building with new cmake macros
79f09e
79f09e
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.15-4
79f09e
- Second attempt - Rebuilt for
79f09e
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
79f09e
79f09e
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.15-3
79f09e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
79f09e
79f09e
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 0.1.15-2
79f09e
- Rebuilt for Python 3.9
79f09e
79f09e
* Wed Apr 01 2020 Ales Matej <amatej@redhat.com> - 0.1.15-1
79f09e
- Update to 0.1.15
79f09e
- Do not skip type=mandatory in xml output (RhBug:1771224)
79f09e
79f09e
* Fri Jan 31 2020 Ales Matej <amatej@redhat.com> - 0.1.14-4
79f09e
- Fix global header variable defined without extern for gcc-10
79f09e
79f09e
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.14-3
79f09e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
79f09e
79f09e
* Sat Dec 14 2019 Jeff Law <law@redhat.com> - 0.1.14-2
79f09e
- Fix inline vs static inline issue for gcc-10
79f09e
79f09e
* Fri Nov 29 2019 Ales Matej <amatej@redhat.com> - 0.1.14-1
79f09e
- Update to 0.1.14
79f09e
79f09e
* Fri Nov 29 2019 Ales Matej <amatej@redhat.com> - 0.1.12-1
79f09e
- Update to 0.1.12
79f09e
79f09e
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.1.11-5
79f09e
- Rebuilt for Python 3.8.0rc1 (#1748018)
79f09e
79f09e
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 0.1.11-4
79f09e
- Rebuilt for Python 3.8
79f09e
79f09e
* Wed Jul 31 2019 Miro Hrončok <mhroncok@redhat.com> - 0.1.11-3
79f09e
- Fix Python method descriptors for Python 3.8 (#1734777)
79f09e
79f09e
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.11-2
79f09e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
79f09e
79f09e
* Mon Mar 11 2019 Pavla Kratochvilova <pkratoch@redhat.com> - 0.1.11-1
79f09e
- Update to 0.1.11
79f09e
79f09e
* Wed Feb 13 2019 Pavla Kratochvilova <pkratoch@redhat.com> - 0.1.10-1
79f09e
- Update to 0.1.10
79f09e
79f09e
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.9-2
79f09e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
79f09e
79f09e
* Tue Nov 27 2018 Marek Blaha <mblaha@redhat.com> - 0.1.8-15
79f09e
- Disable Python 2 bindings for Fedora >= 30
79f09e
79f09e
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-14
79f09e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
79f09e
79f09e
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 0.1.8-13
79f09e
- Rebuilt for Python 3.7
79f09e
79f09e
* Tue Feb 20 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.1.8-12
79f09e
- Update Python 2 dependency declarations to new packaging standards
79f09e
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
79f09e
79f09e
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-11
79f09e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
79f09e
79f09e
* Wed Jan 31 2018 Igor Gnatenko <ignatenko@redhat.com> - 0.1.8-10
79f09e
- Switch to %%ldconfig_scriptlets
79f09e
79f09e
* Tue Nov 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.1.8-9
79f09e
- Use better Obsoletes for platform-python
79f09e
79f09e
* Fri Nov 03 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.1.8-8
79f09e
- Remove platform-python subpackage
79f09e
79f09e
* Fri Sep 01 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.1.8-7
79f09e
- Disable platform python on old releases
79f09e
79f09e
* Thu Aug 10 2017 Lumír Balhar <lbalhar@redhat.com> - 0.1.8-6
79f09e
- Add Platform Python subpackage (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack)
79f09e
79f09e
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-5
79f09e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
79f09e
79f09e
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-4
79f09e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
79f09e
79f09e
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-3
79f09e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
79f09e
79f09e
* Tue Dec 13 2016 Stratakis Charalampos <cstratak@redhat.com> - 0.1.8-2
79f09e
- Rebuild for Python 3.6
79f09e
79f09e
* Thu Sep 22 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.1.8-1
79f09e
- Update to 0.1.8
79f09e
79f09e
* Tue Aug 09 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.1.7-6
79f09e
- Add %%{?system_python_abi}
79f09e
79f09e
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.7-5
79f09e
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
79f09e
79f09e
* Tue Apr 12 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.1.7-4
79f09e
- Adopt to new packaging guidelines
79f09e
- Use %%license macro
79f09e
- Fix file ownerships
79f09e
79f09e
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.7-3
79f09e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
79f09e
79f09e
* Wed Oct 14 2015 Robert Kuska <rkuska@redhat.com> - 0.1.7-2
79f09e
- Rebuilt for Python3.5 rebuild
79f09e
79f09e
* Thu Jul 02 2015 Jindrich Luza <jluza@redhat.com> 0.1.7
79f09e
- added langpacks to union process
79f09e
- comps DOCTYPE read-write-read fix
79f09e
- support biarchonly attribute
79f09e
- fixed rhbz#1073885 rhbz#1073890 rhbz#1073907 rhbz#1073979
79f09e
- fix rhbz#1073079
79f09e
- comps_*_match() now support fnmatching
79f09e
- added libpycomps.MATCH_IGNORECASE as matching flag
79f09e
- added group.packages_match
79f09e
- added comps.groups_match, comps.categories_match, comps.entironments_match
79f09e
- PyCOMPS_Package hash
79f09e
- cmake-2.6, python-2.6, RHEL-6 compatible
79f09e
- '_arch' attribute change to 'arch'
79f09e
- empty 'arch' attribute will be ommited from output from now
79f09e
79f09e
* Wed Jan 29 2014 Jindrich Luza <jluza@redhat.com> 0.1.6
79f09e
- version bumped
79f09e
- added libcomps.MDict.keys()
79f09e
-         libcomps.MDict.values()
79f09e
-         libcomps.MDict.items()
79f09e
-         libcomps.MDict.clear()
79f09e
-         libcomps.MDict.update()
79f09e
-         libcomps.MDict.copy()
79f09e
- COMPS_List replaced with COMPS_HSList
79f09e
- added missing basearchonly to DocGroupPackage
79f09e
- python3/CMakeLists.txt fixed
79f09e
- added explicit attributes support for xml options
79f09e
- added arch_filter test for python
79f09e
- insert method in libcomps.Sequence
79f09e
- Unioning is now accomplished with replace x append policy
79f09e
- Weaker package equality check (comparing only name now)
79f09e
- Fixed leeks in unioning
79f09e
- modified test_merge_comps test_libcomps
79f09e
- dictionaries are now storing keys in alphabetical order
79f09e
- comps parser redesigned
79f09e
- change python/tests directory composition
79f09e
- added elem attributes check in parser
79f09e
- xml output '_arch' attribute support
79f09e
- parser and xml output defaults options for specify defaults values
79f09e
- comps object validation in python
79f09e
- added validity checker before append/set object to list (python only)
79f09e
- .validate() method
79f09e
- added libcomps.Dict.keys
79f09e
-         libcomps.Dict.values
79f09e
-         libcomps.Dict.items
79f09e
-         libcomps.Dict.clear
79f09e
-         libcomps.Dict.update
79f09e
-         libcomps.Dict.copy
79f09e
- added xml output options (comps.xml_str([options = {}]), comps.xml_f(options = {}))
79f09e
79f09e
* Wed Oct 23 2013 Jindrich Luza <jluza@redhat.com> 0.1.4-4
79f09e
- group.uservisible is true by default now.
79f09e
- fixed comps_mobjradix parent node problem
79f09e
- implemented bindings for blacklist, whiteout and langpacks
79f09e
- COMPS_Logger redesigned
79f09e
79f09e
* Tue Oct 08 2013 Jindrich Luza <jluza@redhat.com> 0.1.5
79f09e
- version bump
79f09e
- PyCOMPS_Sequence.__getitem__["objectid"] implemented for libcomps.GroupList, libcomps.CategoryList, libcomps.EnvList
79f09e
- added missing files
79f09e
- missing display_order fix for libcomps.Environment
79f09e
79f09e
* Tue Oct 01 2013 Jindrich Luza <jluza@redhat.com> 0.1.4
79f09e
- added missing files
79f09e
- architectural redesign finished
79f09e
- fixed #1003986 by Gustavo Luiz Duarte guidelines (but not tested on ppc)
79f09e
- fixed bug #1000449
79f09e
- fixed bug #1000442
79f09e
- added GroupId.default test
79f09e
- some minor unreported bugs discovered during testing fixed
79f09e
- finished default attribute support in groupid object
79f09e
- Comps.get_last_parse_errors and Comps.get_last_parse_log has been renamed
79f09e
-   as Comps.get_last_errors and Comps.get_last_log
79f09e
- version bumped. Python bindings is now easier.
79f09e
- added missing files
79f09e
79f09e
* Tue Aug 20 2013 Jindrich Luza <jluza@redhat.com> 0.1.3
79f09e
- finished default attribute support in groupid object
79f09e
- Comps.get_last_parse_errors and Comps.get_last_parse_log has been renamed
79f09e
-   as Comps.get_last_errors and Comps.get_last_log
79f09e
- finished default attribute support in groupid object
79f09e
- Comps.get_last_parse_errors and Comps.get_last_parse_log has been renamed
79f09e
-   as Comps.get_last_errors and Comps.get_last_log
79f09e
79f09e
* Thu Jul 18 2013 Jindrich Luza <jluza@redhat.com> 0.1.2
79f09e
- automatic changelog system
79f09e
- fixed issue #14
79f09e
- libcomps.Dict is now behave more like python dict. Implemented iter(libcomps.Dict)
79f09e
- libcomps.iteritems() and libcomps.itervalues()
79f09e
- remaked error reporting system.
79f09e
-     libcomps.Comps.fromxml_f and libcomps.Comps.fromxml_str now return
79f09e
-     -1, 0 or 1. 0 means parse procedure completed without any problem,
79f09e
-     1 means there's some errors or warnings but not fatal. -1 indicates
79f09e
-     fatal error problem (some results maybe given, but probably incomplete
79f09e
-     and invalid)
79f09e
- errors catched during parsing can be obtained by calling
79f09e
-     libcomps.Comps.get_last_parse_errors
79f09e
- all log is given by
79f09e
-     libcomps.Comps.get_last_parse_log
79f09e
- prop system complete
79f09e
- fixed issue 1
79f09e
- fixed issue 3
79f09e
- added <packagereq requires=...> support
79f09e
- new prop system in progress....
79f09e
- separated doc package
79f09e
- some minor fixes in CMakeFiles
79f09e
- improved integrated tests
79f09e
79f09e
* Tue Jun 25 2013 Jindrich Luza <jluza@redhat.com> 0.1.1-1
79f09e
- Automatic commit of package [libcomps] release [0.1.1-1].
79f09e