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
|
||||
|
||||
|
57
cmocka.spec
57
cmocka.spec
@ -16,21 +16,18 @@
|
||||
#
|
||||
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: pkg-config
|
||||
|
||||
Name: cmocka
|
||||
Version: 1.0.1
|
||||
Release: 0
|
||||
#
|
||||
Summary: Lightweight library to simplify and generalize unit tests for C
|
||||
License: Apache-2.0
|
||||
Group: Productivity/Networking/Other
|
||||
Url: http://open.cryptomilk.org/cmocka
|
||||
#
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Url: http://cmocka.org
|
||||
Source0: https://cmocka.org/files/1.0/%{name}-%{version}.tar.xz
|
||||
Source1: baselibs.conf
|
||||
BuildRequires: cmake
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -75,7 +72,6 @@ Features:
|
||||
Also, CMocka tries to avoid the use of some of the newer features of C
|
||||
compilers.
|
||||
|
||||
|
||||
%package -n libcmocka-devel
|
||||
Summary: Development headers for the cmocka library
|
||||
Group: Development/Libraries/C and C++
|
||||
@ -98,42 +94,28 @@ Static cmocka unit testing library.
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
if test ! -e "obj"; then
|
||||
mkdir obj
|
||||
fi
|
||||
pushd obj
|
||||
cmake \
|
||||
-DCMAKE_C_FLAGS:STRING="%{optflags}" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||
%cmake \
|
||||
-DCMAKE_SKIP_RPATH=OFF \
|
||||
-DWITH_STATIC_LIB=ON \
|
||||
%if %{_lib} == lib64
|
||||
-DLIB_SUFFIX=64 \
|
||||
%endif
|
||||
-DUNIT_TESTING=ON \
|
||||
%{_builddir}/%{name}-%{version}
|
||||
-DWITH_CMOCKERY_SUPPORT=ON \
|
||||
-DUNIT_TESTING=ON
|
||||
|
||||
%__make %{?_smp_mflags} VERBOSE=1
|
||||
popd
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
pushd obj
|
||||
%makeinstall
|
||||
popd
|
||||
%cmake_install
|
||||
|
||||
%check
|
||||
pushd obj
|
||||
%__make test || cat Testing/Temporary/LastTest.log
|
||||
pushd build
|
||||
make %{?_smp_mflags} test || {
|
||||
cat Testing/Temporary/LastTest.log;
|
||||
exit 1;
|
||||
}
|
||||
popd
|
||||
|
||||
%post -n libcmocka0
|
||||
/sbin/ldconfig
|
||||
%post -n libcmocka0 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libcmocka0
|
||||
/sbin/ldconfig
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
%postun -n libcmocka0 -p /sbin/ldconfig
|
||||
|
||||
%files -n libcmocka0
|
||||
%defattr(-,root,root)
|
||||
@ -144,6 +126,9 @@ popd
|
||||
%defattr(-,root,root)
|
||||
%{_includedir}/cmocka.h
|
||||
%{_includedir}/cmocka_pbc.h
|
||||
%dir %{_includedir}/cmockery
|
||||
%{_includedir}/cmockery/cmockery.h
|
||||
%{_includedir}/cmockery/pbc.h
|
||||
%{_libdir}/libcmocka.so
|
||||
%{_libdir}/pkgconfig/cmocka.pc
|
||||
%dir %{_libdir}/cmake/cmocka
|
||||
|
Loading…
Reference in New Issue
Block a user