| 1 | Name: check
|
|---|
| 2 | Version: 0.9.8
|
|---|
| 3 | Release: 3%{?dist}
|
|---|
| 4 | Summary: A unit test framework for C
|
|---|
| 5 | Source0: http://downloads.sourceforge.net/check/%{name}-%{version}.tar.gz
|
|---|
| 6 | Patch0: check-os2.diff
|
|---|
| 7 |
|
|---|
| 8 | Group: Development/Tools
|
|---|
| 9 | License: LGPLv2+
|
|---|
| 10 | URL: http://check.sourceforge.net/
|
|---|
| 11 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|---|
| 12 |
|
|---|
| 13 | #Requires(post): /sbin/install-info
|
|---|
| 14 | #Requires(preun): /sbin/install-info
|
|---|
| 15 |
|
|---|
| 16 | %description
|
|---|
| 17 | Check is a unit test framework for C. It features a simple interface for
|
|---|
| 18 | defining unit tests, putting little in the way of the developer. Tests
|
|---|
| 19 | are run in a separate address space, so Check can catch both assertion
|
|---|
| 20 | failures and code errors that cause segmentation faults or other signals.
|
|---|
| 21 | The output from unit tests can be used within source code editors and IDEs.
|
|---|
| 22 |
|
|---|
| 23 | %package devel
|
|---|
| 24 | Summary: Libraries and headers for developing programs with check
|
|---|
| 25 | Group: Development/Libraries
|
|---|
| 26 | Requires: pkgconfig
|
|---|
| 27 | Requires: %{name} = %{version}-%{release}
|
|---|
| 28 |
|
|---|
| 29 | %description devel
|
|---|
| 30 | Libraries and headers for developing programs with check
|
|---|
| 31 |
|
|---|
| 32 | %package static
|
|---|
| 33 | Summary: Static libraries of check
|
|---|
| 34 | Group: Development/Libraries
|
|---|
| 35 |
|
|---|
| 36 | %description static
|
|---|
| 37 | Static libraries of check.
|
|---|
| 38 |
|
|---|
| 39 | %prep
|
|---|
| 40 | %setup -q
|
|---|
| 41 | %patch0 -p1 -b .os2~
|
|---|
| 42 |
|
|---|
| 43 | %build
|
|---|
| 44 | export CONFIG_SHELL="/bin/sh"
|
|---|
| 45 | export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" ; \
|
|---|
| 46 | %configure \
|
|---|
| 47 | --enable-shared --disable-static \
|
|---|
| 48 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
|
|---|
| 49 |
|
|---|
| 50 | make %{?_smp_mflags}
|
|---|
| 51 |
|
|---|
| 52 | %install
|
|---|
| 53 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 54 | make DESTDIR=$RPM_BUILD_ROOT install
|
|---|
| 55 | rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
|---|
| 56 | rm -rf $RPM_BUILD_ROOT%{_infodir}/dir
|
|---|
| 57 | rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
|
|---|
| 58 |
|
|---|
| 59 | install -m 755 src/check.dll $RPM_BUILD_ROOT/%{_libdir}
|
|---|
| 60 | install -m 755 src/.libs/check_s.a $RPM_BUILD_ROOT/%{_libdir}
|
|---|
| 61 |
|
|---|
| 62 | %clean
|
|---|
| 63 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 64 |
|
|---|
| 65 | #%post
|
|---|
| 66 | #/sbin/ldconfig
|
|---|
| 67 | #if [ -e %{_infodir}/%{name}.info* ]; then
|
|---|
| 68 | # /sbin/install-info \
|
|---|
| 69 | # --entry='* Check: (check). A unit testing framework for C.' \
|
|---|
| 70 | # %{_infodir}/%{name}.info %{_infodir}/dir || :
|
|---|
| 71 | #fi
|
|---|
| 72 |
|
|---|
| 73 | #%postun -p /sbin/ldconfig
|
|---|
| 74 |
|
|---|
| 75 | #%preun
|
|---|
| 76 | #if [ $1 = 0 -a -e %{_infodir}/%{name}.info* ]; then
|
|---|
| 77 | # /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
|
|---|
| 78 | #fi
|
|---|
| 79 |
|
|---|
| 80 | %files
|
|---|
| 81 | %defattr(-,root,root,-)
|
|---|
| 82 | %doc AUTHORS COPYING.LESSER ChangeLog ChangeLogOld NEWS README SVNChangeLog
|
|---|
| 83 | %doc THANKS TODO
|
|---|
| 84 | %{_libdir}/*.dll
|
|---|
| 85 | %{_infodir}/check*
|
|---|
| 86 |
|
|---|
| 87 | %files devel
|
|---|
| 88 | %defattr(-,root,root,-)
|
|---|
| 89 | %doc doc/example
|
|---|
| 90 | %{_includedir}/check.h
|
|---|
| 91 | %{_libdir}/*.dll
|
|---|
| 92 | %{_libdir}/check.a
|
|---|
| 93 | %{_libdir}/pkgconfig/check.pc
|
|---|
| 94 | %{_datadir}/aclocal/check.m4
|
|---|
| 95 |
|
|---|
| 96 | #check used to be static only, hence this.
|
|---|
| 97 | %files static
|
|---|
| 98 | %defattr(-,root,root,-)
|
|---|
| 99 | %{_libdir}/check_s.a
|
|---|
| 100 |
|
|---|
| 101 | %changelog
|
|---|