mikedep333 / rpms / libcomps

Forked from rpms/libcomps 4 years ago
Clone
7b2d114
%global commit 44ee40c5d69f53c0b0707c502fbcfff0c9acf8ec
c8ac328
c8ac328
Name:           libcomps
7b2d114
Version:        0.1.3
7b2d114
Release:        1%{?dist}
c8ac328
Summary:        Comps XML file manipulation library
c8ac328
c8ac328
Group:          Development/Libraries
c8ac328
License:        GPLv2+
c8ac328
URL:            https://github.com/midnightercz/libcomps/
c8ac328
Source0:        https://github.com/midnightercz/libcomps/archive/%{commit}/libcomps-%{commit}.tar.gz
c8ac328
BuildRequires:  libxml2-devel
c8ac328
BuildRequires:  check-devel
c8ac328
BuildRequires:  expat-devel
c8ac328
%if 0%{?rhel} == 6
c8ac328
BuildRequires:  cmake28
c8ac328
%else
c8ac328
BuildRequires:  cmake
c8ac328
%endif
c8ac328
c8ac328
%description
c8ac328
Libcomps is library for structure-like manipulation with content of
c8ac328
comps XML files. Supports read/write XML file, structure(s) modification.
c8ac328
c8ac328
%package doc
c8ac328
Summary:        Documentation files for libcomps library
c8ac328
Group:          Development/Libraries
c8ac328
Requires:       %{name} = %{version}-%{release}
c8ac328
BuildArch:      noarch
c8ac328
BuildRequires:  doxygen
c8ac328
c8ac328
%description doc
c8ac328
Documentation files for libcomps library
c8ac328
c8ac328
%package devel
c8ac328
Summary:        Development files for libcomps library
c8ac328
Group:          Development/Libraries
c8ac328
Requires:       %{name}%{?_isa} = %{version}-%{release}
c8ac328
c8ac328
%description devel
c8ac328
Development files for libcomps library
c8ac328
c8ac328
%package -n python-libcomps
c8ac328
Summary:        Python2 bindings for libcomps library
c8ac328
Group:          Development/Libraries
c8ac328
BuildRequires:  python-devel
c8ac328
Requires:       %{name}%{?_isa} = %{version}-%{release}
c8ac328
c8ac328
%description -n python-libcomps
c8ac328
Python2 bindings for libcomps library
c8ac328
c8ac328
%package -n python3-libcomps
c8ac328
Summary:        Python3 bindings for libcomps library
c8ac328
Group:          Development/Libraries
c8ac328
BuildRequires:  python3-devel
c8ac328
Requires:       %{name}%{?_isa} = %{version}-%{release}
c8ac328
c8ac328
%description -n python3-libcomps
c8ac328
Python3 bindings for libcomps library
c8ac328
c8ac328
c8ac328
%prep
c8ac328
%setup -qn %{name}-%{commit}
c8ac328
c8ac328
rm -rf py3
c8ac328
mkdir ../py3
c8ac328
cp -a . ../py3/
c8ac328
mv ../py3 ./
c8ac328
c8ac328
%build
c8ac328
%cmake -DPYTHON_DESIRED:STRING=2 libcomps/
c8ac328
make %{?_smp_mflags}
c8ac328
make %{?_smp_mflags} docs
c8ac328
c8ac328
pushd py3
c8ac328
%cmake -DPYTHON_DESIRED:STRING=3 libcomps/
c8ac328
make %{?_smp_mflags}
c8ac328
make %{?_smp_mflags} docs
c8ac328
popd
c8ac328
c8ac328
c8ac328
%check devel
c8ac328
    make test
c8ac328
c8ac328
%install
c8ac328
make install DESTDIR=%{buildroot}
c8ac328
pushd py3
c8ac328
make install DESTDIR=%{buildroot}
c8ac328
popd
c8ac328
c8ac328
%clean
c8ac328
rm -rf $buildroot
c8ac328
c8ac328
%post -p /sbin/ldconfig
c8ac328
c8ac328
%postun -p /sbin/ldconfig
c8ac328
c8ac328
%files
c8ac328
%{_libdir}/libcomps.so.*
c8ac328
%doc README.md COPYING
c8ac328
c8ac328
%files devel
c8ac328
%{_libdir}/libcomps.so
c8ac328
%{_includedir}/*
c8ac328
c8ac328
%files doc
c8ac328
%doc docs/libcomps-doc/html
c8ac328
c8ac328
%files -n python-libcomps
c8ac328
%{_libdir}/python2*
c8ac328
%exclude %{_libdir}/python2/libcomps/__pycache__
c8ac328
c8ac328
%files -n python3-libcomps
c8ac328
%{_libdir}/python3*
c8ac328
%exclude %{_libdir}/python3/libcomps/__pycache__
c8ac328
c8ac328
c8ac328
%changelog
7b2d114
* Tue Aug 20 2013 Jindrich Luza <jluza@redhat.com> 0.1.3.git44ee40c
7b2d114
- fixed gid problem
7b2d114
7b2d114
* Tue Aug 20 2013 Jindrich Luza <jluza@redhat.com> 0.1.3
7b2d114
- finished default attribute support in groupid object
7b2d114
- Comps.get_last_parse_errors and Comps.get_last_parse_log has been renamed
7b2d114
-   as Comps.get_last_errors and Comps.get_last_log
c8ac328
c8ac328
* Thu Jul 18 2013 Jindrich Luza <jluza@redhat.com> 0.1.2
c8ac328
- automatic changelog system
c8ac328
- fixed issue #14
c8ac328
- libcomps.Dict is now behave more like python dict. Implemented iter(libcomps.Dict)
c8ac328
- libcomps.iteritems() and libcomps.itervalues()
c8ac328
- added <packagereq requires=...> support
c8ac328
- remaked error reporting system.
c8ac328
-     libcomps.Comps.fromxml_f and libcomps.Comps.fromxml_str now return
c8ac328
-     -1, 0 or 1. 0 means parse procedure completed without any problem,
c8ac328
-     1 means there's some errors or warnings but not fatal. -1 indicates
c8ac328
-     fatal error problem (some results maybe given, but probably incomplete
c8ac328
-     and invalid)
c8ac328
- errors catched during parsing can be obtained by calling
c8ac328
-     libcomps.Comps.get_last_parse_errors
c8ac328
- all log is given by
c8ac328
-     libcomps.Comps.get_last_parse_log
c8ac328
- improved integrated tests
c8ac328
- documentation is now isolated make target ('make docs')
c8ac328
- prop system complete
c8ac328
- fixed issue 1
c8ac328
- fixed issue 3
c8ac328
- new prop system in progress....
c8ac328
- separated doc package
c8ac328
- some minor fixes in CMakeFiles
c8ac328
c8ac328
* Tue Jun 25 2013 Jindrich Luza <jluza@redhat.com> 0.1.1-1
c8ac328
- Automatic commit of package [libcomps] release [0.1.1-1].
c8ac328
c8ac328