Accepting request 317872 from devel:libraries:c_c++
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/317872 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cmocka?expand=0&rev=12
This commit is contained in:
commit
83f0fafcf7
@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 15 08:37:06 UTC 2015 - asn@cryptomilk.org
|
||||||
|
|
||||||
|
- Do not turn of rpath support
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 14 14:07:14 UTC 2015 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Use properly %cmake macro to build nicely with all the linker/cflags
|
||||||
|
- Use proper Url and Source
|
||||||
|
- Properly fails on crashing tests instead of finishing build
|
||||||
|
- Enable cmockery support
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 12 14:57:24 UTC 2015 - asn@cryptomilk.org
|
Thu Mar 12 14:57:24 UTC 2015 - asn@cryptomilk.org
|
||||||
|
|
||||||
|
59
cmocka.spec
59
cmocka.spec
@ -16,21 +16,18 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
BuildRequires: cmake
|
|
||||||
BuildRequires: glibc-devel
|
|
||||||
BuildRequires: pkg-config
|
|
||||||
|
|
||||||
Name: cmocka
|
Name: cmocka
|
||||||
Version: 1.0.1
|
Version: 1.0.1
|
||||||
Release: 0
|
Release: 0
|
||||||
#
|
|
||||||
Summary: Lightweight library to simplify and generalize unit tests for C
|
Summary: Lightweight library to simplify and generalize unit tests for C
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Productivity/Networking/Other
|
Group: Productivity/Networking/Other
|
||||||
Url: http://open.cryptomilk.org/cmocka
|
Url: http://cmocka.org
|
||||||
#
|
Source0: https://cmocka.org/files/1.0/%{name}-%{version}.tar.xz
|
||||||
Source0: %{name}-%{version}.tar.xz
|
|
||||||
Source1: baselibs.conf
|
Source1: baselibs.conf
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: pkg-config
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -75,7 +72,6 @@ Features:
|
|||||||
Also, CMocka tries to avoid the use of some of the newer features of C
|
Also, CMocka tries to avoid the use of some of the newer features of C
|
||||||
compilers.
|
compilers.
|
||||||
|
|
||||||
|
|
||||||
%package -n libcmocka-devel
|
%package -n libcmocka-devel
|
||||||
Summary: Development headers for the cmocka library
|
Summary: Development headers for the cmocka library
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
@ -98,42 +94,28 @@ Static cmocka unit testing library.
|
|||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
if test ! -e "obj"; then
|
%cmake \
|
||||||
mkdir obj
|
-DCMAKE_SKIP_RPATH=OFF \
|
||||||
fi
|
-DWITH_STATIC_LIB=ON \
|
||||||
pushd obj
|
-DWITH_CMOCKERY_SUPPORT=ON \
|
||||||
cmake \
|
-DUNIT_TESTING=ON
|
||||||
-DCMAKE_C_FLAGS:STRING="%{optflags}" \
|
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
|
||||||
-DWITH_STATIC_LIB=ON \
|
|
||||||
%if %{_lib} == lib64
|
|
||||||
-DLIB_SUFFIX=64 \
|
|
||||||
%endif
|
|
||||||
-DUNIT_TESTING=ON \
|
|
||||||
%{_builddir}/%{name}-%{version}
|
|
||||||
|
|
||||||
%__make %{?_smp_mflags} VERBOSE=1
|
make %{?_smp_mflags}
|
||||||
popd
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
pushd obj
|
%cmake_install
|
||||||
%makeinstall
|
|
||||||
popd
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
pushd obj
|
pushd build
|
||||||
%__make test || cat Testing/Temporary/LastTest.log
|
make %{?_smp_mflags} test || {
|
||||||
|
cat Testing/Temporary/LastTest.log;
|
||||||
|
exit 1;
|
||||||
|
}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%post -n libcmocka0
|
%post -n libcmocka0 -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
|
|
||||||
%postun -n libcmocka0
|
%postun -n libcmocka0 -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
|
|
||||||
%clean
|
|
||||||
%{__rm} -rf %{buildroot}
|
|
||||||
|
|
||||||
%files -n libcmocka0
|
%files -n libcmocka0
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -144,6 +126,9 @@ popd
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_includedir}/cmocka.h
|
%{_includedir}/cmocka.h
|
||||||
%{_includedir}/cmocka_pbc.h
|
%{_includedir}/cmocka_pbc.h
|
||||||
|
%dir %{_includedir}/cmockery
|
||||||
|
%{_includedir}/cmockery/cmockery.h
|
||||||
|
%{_includedir}/cmockery/pbc.h
|
||||||
%{_libdir}/libcmocka.so
|
%{_libdir}/libcmocka.so
|
||||||
%{_libdir}/pkgconfig/cmocka.pc
|
%{_libdir}/pkgconfig/cmocka.pc
|
||||||
%dir %{_libdir}/cmake/cmocka
|
%dir %{_libdir}/cmake/cmocka
|
||||||
|
Loading…
Reference in New Issue
Block a user