2010-04-21 10:30:00 +02:00
|
|
|
#
|
2014-08-04 10:11:13 +02:00
|
|
|
# spec file for package cunit
|
|
|
|
#
|
2024-02-06 09:50:14 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2014-08-04 10:11:13 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2024-02-06 09:50:14 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2010-04-21 10:30:00 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2024-02-06 09:50:14 +01:00
|
|
|
%{!?make_build:%global make_build make %{?_smp_mflags}}
|
|
|
|
%define _lto_cflags %{nil}
|
2014-08-04 10:11:13 +02:00
|
|
|
%define _name CUnit
|
|
|
|
%define _version 2.1-3
|
|
|
|
%define _libname libcunit1
|
|
|
|
Name: cunit
|
|
|
|
Version: 2.1.3
|
|
|
|
Release: 0
|
|
|
|
Summary: It provides C programmers a basic testing functionality
|
2024-02-06 09:50:14 +01:00
|
|
|
License: LGPL-2.0-only
|
2014-08-04 10:11:13 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2024-02-06 09:50:14 +01:00
|
|
|
URL: https://cunit.sourceforge.net/
|
|
|
|
Source0: https://download.sourceforge.net/cunit/%{_name}-%{_version}.tar.bz2
|
2014-08-04 10:11:13 +02:00
|
|
|
Patch0: cunit-link-ncurses.diff
|
2015-10-22 12:42:26 +02:00
|
|
|
Patch1: cunit-ncurses6.patch
|
2014-08-04 10:11:13 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: ncurses-devel
|
2024-02-06 09:50:14 +01:00
|
|
|
BuildRequires: pkgconfig
|
2010-04-21 10:31:51 +02:00
|
|
|
|
2010-04-21 10:30:00 +02:00
|
|
|
%description
|
|
|
|
CUnit is a unit testing framework for C.
|
|
|
|
This package installs the CUnit static library,
|
|
|
|
headers, and documentation files.
|
|
|
|
|
|
|
|
%package devel
|
2014-08-04 10:11:13 +02:00
|
|
|
Summary: CUnit development files
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{_libname} = %{version}
|
|
|
|
Requires: ncurses-devel
|
2024-02-06 09:50:14 +01:00
|
|
|
Requires: pkgconfig
|
2015-05-26 18:44:20 +02:00
|
|
|
%if 0%{?suse_version} || 0%{?fedora_version}
|
2014-08-04 10:11:13 +02:00
|
|
|
Recommends: %{name}-doc = %{version}
|
2015-05-26 18:44:20 +02:00
|
|
|
%endif
|
2010-04-21 10:30:00 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
CUnit is a unit testing framework for C.
|
|
|
|
This package installs the CUnit development files.
|
|
|
|
|
|
|
|
%package doc
|
2014-08-04 10:11:13 +02:00
|
|
|
Summary: CUnit documentation
|
|
|
|
Group: Documentation/Man
|
|
|
|
Requires: %{_libname} = %{version}
|
2010-04-21 10:30:00 +02:00
|
|
|
|
|
|
|
%description doc
|
|
|
|
CUnit is a unit testing framework for C.
|
|
|
|
This package installs the CUnit
|
|
|
|
documentation files.
|
|
|
|
|
2014-08-04 10:11:13 +02:00
|
|
|
%package -n %{_libname}
|
|
|
|
Summary: CUnit shared library
|
2014-08-12 09:39:41 +02:00
|
|
|
Group: System/Libraries
|
2010-04-21 10:30:00 +02:00
|
|
|
|
2014-08-04 10:11:13 +02:00
|
|
|
%description -n %{_libname}
|
2010-04-21 10:30:00 +02:00
|
|
|
CUnit is a unit testing framework for C.
|
2012-02-09 11:26:39 +01:00
|
|
|
This package installs the CUnit shared library.
|
2010-04-21 10:30:00 +02:00
|
|
|
|
|
|
|
%prep
|
2024-02-26 12:22:09 +01:00
|
|
|
%autosetup -p1 -n %{_name}-%{_version}
|
2015-10-22 12:42:26 +02:00
|
|
|
|
2010-04-21 10:30:00 +02:00
|
|
|
chmod -x AUTHORS ChangeLog COPYING NEWS README TODO doc/*.html doc/*.css
|
|
|
|
|
|
|
|
%build
|
|
|
|
autoreconf -fi
|
|
|
|
%configure \
|
2014-08-04 10:11:13 +02:00
|
|
|
--disable-static \
|
|
|
|
--enable-automated \
|
|
|
|
--enable-basic \
|
|
|
|
--enable-console \
|
|
|
|
--enable-curses \
|
|
|
|
--enable-examples \
|
|
|
|
--enable-test
|
2024-02-06 09:50:14 +01:00
|
|
|
%make_build
|
2010-04-21 10:30:00 +02:00
|
|
|
|
|
|
|
%install
|
2024-02-06 09:50:14 +01:00
|
|
|
%make_install
|
2014-08-04 10:11:13 +02:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
|
|
|
rm -rf %{buildroot}%{_prefix}/doc
|
2010-04-21 10:30:00 +02:00
|
|
|
# arch dependent files
|
2014-08-04 10:11:13 +02:00
|
|
|
mkdir -p %{buildroot}%{_libdir}/CUnit/
|
|
|
|
mv %{buildroot}%{_datadir}/CUnit/Examples/ %{buildroot}%{_libdir}/CUnit/
|
|
|
|
mv %{buildroot}%{_datadir}/CUnit/Test/ %{buildroot}%{_libdir}/CUnit/
|
2010-04-21 10:30:00 +02:00
|
|
|
chmod -x doc/headers/*
|
|
|
|
rm doc/headers/Makefile*
|
|
|
|
rm doc/headers/Jamfile*
|
|
|
|
rm doc/Makefile*
|
|
|
|
rm doc/Jamfile*
|
|
|
|
|
2014-08-04 10:11:13 +02:00
|
|
|
%post -n %{_libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{_libname} -p /sbin/ldconfig
|
2010-04-21 10:30:00 +02:00
|
|
|
|
2014-08-04 10:11:13 +02:00
|
|
|
%files -n %{_libname}
|
2024-02-06 09:50:14 +01:00
|
|
|
%license COPYING
|
|
|
|
%doc AUTHORS ChangeLog NEWS README TODO
|
2014-08-04 10:11:13 +02:00
|
|
|
%{_libdir}/libcunit.so.*
|
2010-04-21 10:30:00 +02:00
|
|
|
|
|
|
|
%files doc
|
|
|
|
%doc doc/*
|
|
|
|
%dir %{_datadir}/CUnit
|
|
|
|
%{_datadir}/CUnit/*
|
2024-02-06 09:50:14 +01:00
|
|
|
%{_mandir}/man3/CUnit.3%{?ext_man}
|
2010-04-21 10:30:00 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%dir %{_includedir}/CUnit
|
|
|
|
%{_includedir}/CUnit/*
|
|
|
|
%dir %{_libdir}/CUnit
|
|
|
|
%{_libdir}/CUnit/*
|
|
|
|
%{_libdir}/libcunit.so
|
|
|
|
%{_libdir}/pkgconfig/cunit.pc
|
|
|
|
|
|
|
|
%changelog
|