977e620419
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cunit?expand=0&rev=4
140 lines
3.4 KiB
RPMSpec
140 lines
3.4 KiB
RPMSpec
#
|
|
# This file and all modifications and additions to the pristine
|
|
# package are under the same license as the package itself.
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
Name: cunit
|
|
Version: 2.1
|
|
Release: 0
|
|
Summary: It provides C programmers a basic testing functionality
|
|
Group: Development/Libraries/C and C++
|
|
License: GPLv2
|
|
Url: http://cunit.sourceforge.net/
|
|
BuildRequires: ncurses-devel
|
|
Source: CUnit-%{version}-0-src.tar.bz2
|
|
Patch0: %{name}-2.1-pkgconfig.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
# gcc error detected a false positive
|
|
# Curses.c:425: warning: implicit declaration of function 'snprintf'
|
|
# E: CUnit implicit-fortify-decl Curses.c:425
|
|
# but file already #includes <stdio.h>
|
|
BuildRequires: -post-build-checks
|
|
|
|
%description
|
|
CUnit is a unit testing framework for C.
|
|
This package installs the CUnit static library,
|
|
headers, and documentation files.
|
|
|
|
|
|
%package devel
|
|
Summary: CUnit development files
|
|
License: GPLv2
|
|
Group: Development/Libraries/C and C++
|
|
Requires: ncurses-devel
|
|
Requires: libcunit1 = %{version}
|
|
Requires: pkg-config
|
|
Recommends: %{name}-doc = %{version}
|
|
|
|
%description devel
|
|
CUnit is a unit testing framework for C.
|
|
This package installs the CUnit development files.
|
|
|
|
%package devel-static
|
|
Summary: CUnit static development files
|
|
License: GPLv2
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{name}-devel = %{version}
|
|
|
|
%description devel-static
|
|
CUnit is a unit testing framework for C.
|
|
This package installs the CUnit static files.
|
|
|
|
%package doc
|
|
Summary: CUnit documentation
|
|
License: GPLv2
|
|
Group: Documentation/Man
|
|
Requires: libcunit1 = %{version}
|
|
|
|
%description doc
|
|
CUnit is a unit testing framework for C.
|
|
This package installs the CUnit
|
|
documentation files.
|
|
|
|
%package -n libcunit1
|
|
Summary: CUnit shared library
|
|
License: GPLv2
|
|
Group: Development/Libraries/C and C++
|
|
|
|
%description -n libcunit1
|
|
CUnit is a unit testing framework for C.
|
|
This package installs the CUnit shared library
|
|
YOU HAVE TO LINK TO -lncurses TOO OR BUILD WILL FAIL
|
|
|
|
%prep
|
|
%setup -q -n CUnit-%{version}-0
|
|
%patch0 -p1
|
|
chmod -x AUTHORS ChangeLog COPYING NEWS README TODO doc/*.html doc/*.css
|
|
|
|
%build
|
|
autoreconf -fi
|
|
%configure \
|
|
--enable-automated \
|
|
--enable-basic \
|
|
--enable-console \
|
|
--enable-curses \
|
|
--enable-examples \
|
|
--enable-test
|
|
%__make %{?jobs:-j%jobs}
|
|
|
|
%install
|
|
make DESTDIR=%{buildroot} install
|
|
%__rm %{buildroot}%{_libdir}/*.la
|
|
%__rm -rf %{buildroot}%{_prefix}/doc
|
|
# arch dependent files
|
|
%__mkdir_p %{buildroot}%{_libdir}/CUnit/
|
|
%__mv %{buildroot}%{_datadir}/CUnit/Examples/ %{buildroot}%{_libdir}/CUnit/
|
|
%__mv %{buildroot}%{_datadir}/CUnit/Test/ %{buildroot}%{_libdir}/CUnit/
|
|
chmod -x doc/headers/*
|
|
rm doc/headers/Makefile*
|
|
rm doc/headers/Jamfile*
|
|
rm doc/Makefile*
|
|
rm doc/Jamfile*
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%post -n libcunit1 -p /sbin/ldconfig
|
|
|
|
%postun -n libcunit1 -p /sbin/ldconfig
|
|
|
|
%files -n libcunit1
|
|
%defattr(-,root,root,-)
|
|
%doc AUTHORS ChangeLog COPYING NEWS README TODO
|
|
%{_libdir}/libcunit.so.1
|
|
%{_libdir}/libcunit.so.1.0.1
|
|
|
|
%files doc
|
|
%defattr(-,root,root,-)
|
|
%doc doc/*
|
|
%dir %{_datadir}/CUnit
|
|
%{_datadir}/CUnit/*
|
|
%{_mandir}/man3/CUnit.3.gz
|
|
|
|
%files devel
|
|
%defattr(-,root,root,-)
|
|
%dir %{_includedir}/CUnit
|
|
%{_includedir}/CUnit/*
|
|
%dir %{_libdir}/CUnit
|
|
%{_libdir}/CUnit/*
|
|
%{_libdir}/libcunit.so
|
|
%{_libdir}/pkgconfig/cunit.pc
|
|
|
|
%files devel-static
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/libcunit.a
|
|
|
|
%changelog
|