Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37402984
en ru br
ALT Linux repos
S:0.9.1-alt1

Group :: Development/C++
RPM: libtree

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define testsdir %{_localstatedir}/%{name}/tests

Name: libtree
Version: 0.9.1
Release: alt1

Summary: C++ lib that helps to work with tree-like data structures
License: GPLv3
Group: Development/C++

Packager: Alexey Appolonov <alexey at altlinux.org>

# http://git.altlinux.org/people/alexey/packages/?p=libtree.git

Source: %{name}-%{version}.tar

BuildRequires: gcc-c++
BuildRequires: libxml++3-devel
BuildRequires: jsoncpp-devel >= 1.8.4

%description
%{summary}.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #


%package -n %{name}-devel
Summary: %{name} headers
Group: Development/Other

Requires: %{name}
BuildArch: noarch

Requires: libxml++3-devel
Requires: jsoncpp-devel >= 1.8.4

%description -n %{name}-devel
Development package for %{name}.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #


%package -n %{name}-tests
Summary: Tests and test data for %{name}
Group: Other

Requires: %{name}

%description -n %{name}-tests
Tests and test data for %{name}.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #


%package -n %{name}-checkinstall
Summary: Tests and test data for %{name}
Group: Other

Requires: %{name}-tests

%description -n %{name}-checkinstall
Package that runs tests in a build environment.

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #


%prep
%setup

%build
%make_build
%make_build -C ./tests

%install
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_includedir}/%{name}
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
mkdir -p %{buildroot}%{testsdir}
# Executables
cp bin/%{name}.so %{buildroot}%{_libdir}
# Includes
cp src/*.h %{buildroot}%{_includedir}/%{name}
# Documentation
cp COPYING %{buildroot}%{_defaultdocdir}/%{name}/
# Tests
cp tests/bin/tests %{buildroot}%{testsdir}
cp -r tests/data %{buildroot}%{testsdir}

%pre -n %{name}-checkinstall
set -e
cd %{testsdir}
./tests data
cd -

%files
%{_libdir}/*.so
%{_defaultdocdir}/%{name}

%files -n %{name}-devel
%{_includedir}/%{name}/

%files -n %{name}-tests
%{testsdir}/*

%files -n %{name}-checkinstall

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #


%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin