Blob Blame History Raw
Name:           clibs-list
Version:        0.4.1
# While this is just the major version number, we write it separately as a
# reminder to follow the process in the Updates Policy if it changes.
%global so_version 0
Release:        %autorelease
Summary:        C doubly linked list implementation

License:        MIT
Source:         %{url}/archive/%{version}/list-%{version}.tar.gz
Patch0: clibs-list-c99.patch

ExcludeArch:    %{ix86}

BuildRequires:  gcc
BuildRequires:  make

%global common_description %{expand:

%description %{common_description}

The clibs-list package contains the clibs/list library.

%package devel
Summary:        Development files for clibs-list

Requires:       %{name}%{?_isa} = %{version}-%{release}

%description devel %{common_description}

The clibs-list-devel package contains libraries and header files for developing
applications that use clibs-list.

%autosetup -p1 -n list-%{version}

%make_build \
    AR="${AR-gcc-ar}" CC="${CC-gcc}" STRIP=/bin/true \
    all bin/test

%make_install PREFIX='%{_prefix}' LIBDIR='%{_libdir}'
# We did not want the static library.
rm -vf '%{buildroot}%{_libdir}/libclibs_list.a'

%make_build test

%license LICENSE

%files devel
# This directory should be co-owned with anything else from
#, e.g., if packaged
# in the future:
%dir %{_includedir}/clibs