- added CUnit-2.1-pkgconfig.patch to provide cunit.pc
- split into 3 subpackages - New package OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cunit?expand=0&rev=2
This commit is contained in:
parent
820cfc0938
commit
95a00bc709
@ -1,43 +0,0 @@
|
||||
diff -uNr old-CUnit-2.1-0//configure.in CUnit-2.1-0/configure.in
|
||||
--- old-CUnit-2.1-0//configure.in 2010-03-13 13:49:43.606490462 +0100
|
||||
+++ CUnit-2.1-0/configure.in 2010-03-13 13:55:58.586740381 +0100
|
||||
@@ -239,6 +239,7 @@
|
||||
|
||||
dnl Configure Makefile set.
|
||||
AC_CONFIG_FILES( Makefile \
|
||||
+ cunit.pc \
|
||||
CUnit.spec \
|
||||
CUnit/Makefile \
|
||||
CUnit/Headers/Makefile \
|
||||
diff -uNr old-CUnit-2.1-0//cunit.pc.in CUnit-2.1-0/cunit.pc.in
|
||||
--- old-CUnit-2.1-0//cunit.pc.in 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ CUnit-2.1-0/cunit.pc.in 2010-03-13 13:51:26.421496087 +0100
|
||||
@@ -0,0 +1,9 @@
|
||||
+prefix=@prefix@
|
||||
+exec_prefix=@exec_prefix@
|
||||
+libdir=@libdir@
|
||||
+includedir=@includedir@
|
||||
+
|
||||
+Name: CUnit
|
||||
+Description: CUnit is a unit testing framework for C
|
||||
+Version: @VERSION@
|
||||
+Libs: -L${libdir} -lcunit -lncurses
|
||||
diff -uNr old-CUnit-2.1-0//Makefile.am CUnit-2.1-0/Makefile.am
|
||||
--- old-CUnit-2.1-0//Makefile.am 2010-03-13 13:49:43.594495287 +0100
|
||||
+++ CUnit-2.1-0/Makefile.am 2010-03-13 14:04:14.626744275 +0100
|
||||
@@ -10,6 +10,15 @@
|
||||
|
||||
SUBDIRS = ${COMPILE_DIRS}
|
||||
|
||||
+EXTRA_DIST = \
|
||||
+ cunit.pc.in \
|
||||
+ $(NULL)
|
||||
+
|
||||
+pkgconfigdir = $(libdir)/pkgconfig
|
||||
+pkgconfig_DATA = \
|
||||
+ cunit.pc \
|
||||
+ $(NULL)
|
||||
+
|
||||
distdir=${PACKAGE}-${VERSION}-${RELEASE}
|
||||
|
||||
WD=`pwd`
|
129
CUnit.spec
129
CUnit.spec
@ -1,129 +0,0 @@
|
||||
#
|
||||
# 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: gcc ncurses-devel
|
||||
Source0: %name-%version-0-src.tar.bz2
|
||||
Patch0: %name-2.1-pkgconfig.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
# gcc error detected is a false positive
|
||||
# Curses.c:425: warning: implicit declaration of function 'snprintf'
|
||||
# E: CUnit implicit-fortify-decl Curses.c:425
|
||||
# but file already #include <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
|
||||
License: GPL
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: gcc ncurses-devel
|
||||
Requires: libcunit1 = %version
|
||||
Requires: pkg-config
|
||||
Recommends: %name-doc = %version
|
||||
Summary: %name development files
|
||||
|
||||
%description devel
|
||||
CUnit is a unit testing framework for C.
|
||||
This package installs the CUnit static library
|
||||
and headers files.
|
||||
|
||||
%package doc
|
||||
License: GPL
|
||||
Group: Documentation/Man
|
||||
Requires: libcunit1 = %version
|
||||
Summary: %name documentation
|
||||
|
||||
%description doc
|
||||
CUnit is a unit testing framework for C.
|
||||
This package installs the CUnit
|
||||
documentation files.
|
||||
|
||||
|
||||
%package -n libcunit1
|
||||
License: GPL
|
||||
Group: Development/Libraries/C and C++
|
||||
Summary: %name shared library
|
||||
|
||||
%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 %name-%version-0
|
||||
%patch0 -p1
|
||||
chmod -x ChangeLog README COPYING
|
||||
chmod -x doc/*.html
|
||||
chmod -x doc/*.css
|
||||
|
||||
%build
|
||||
autoreconf -fi
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
export CXXFLAGS="$RPM_OPT_FLAGS"
|
||||
%configure \
|
||||
--enable-automated \
|
||||
--enable-basic \
|
||||
--enable-console \
|
||||
--enable-curses \
|
||||
--enable-examples \
|
||||
--enable-test
|
||||
%__make %{?jobs:-j%jobs}
|
||||
|
||||
%install
|
||||
%makeinstall
|
||||
%__rm %buildroot/%_libdir/*.la
|
||||
#%__rm %buildroot/%_libdir/*.a
|
||||
%__rm -rf %buildroot/%_prefix/doc
|
||||
# arch dependet files
|
||||
%__mkdir_p %buildroot/%_libdir/%name/
|
||||
%__mv %buildroot/%_datadir/%name/Examples/ %buildroot/%_libdir/%name/
|
||||
%__mv %buildroot/%_datadir/%name/Test/ %buildroot/%_libdir/%name/
|
||||
chmod -x doc/headers/*
|
||||
rm doc/headers/Makefile*
|
||||
rm doc/headers/Jamfile*
|
||||
rm doc/Makefile*
|
||||
rm doc/Jamfile*
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post -n libcunit1 -p /sbin/ldconfig
|
||||
%postun -n libcunit1 -p /sbin/ldconfig
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root,-)
|
||||
%doc ChangeLog README COPYING
|
||||
%doc doc/*
|
||||
%_datadir/%name
|
||||
%_mandir/man3/%name.3.gz
|
||||
|
||||
%files -n libcunit1
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libcunit.so.1
|
||||
%{_libdir}/libcunit.so.1.0.1
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%_includedir/%name
|
||||
%_libdir/%name
|
||||
%_libdir/libcunit.a
|
||||
%_libdir/libcunit.so
|
||||
%_libdir/pkgconfig/cunit.pc
|
||||
|
||||
%changelog
|
46
cunit-2.1-pkgconfig.patch
Normal file
46
cunit-2.1-pkgconfig.patch
Normal file
@ -0,0 +1,46 @@
|
||||
Index: CUnit-2.1-0/configure.in
|
||||
===================================================================
|
||||
--- CUnit-2.1-0.orig/configure.in
|
||||
+++ CUnit-2.1-0/configure.in
|
||||
@@ -239,6 +239,7 @@ AC_CONFIG_FILES([Jamrules:Jamrules.in])
|
||||
|
||||
dnl Configure Makefile set.
|
||||
AC_CONFIG_FILES( Makefile \
|
||||
+ cunit.pc \
|
||||
CUnit.spec \
|
||||
CUnit/Makefile \
|
||||
CUnit/Headers/Makefile \
|
||||
Index: CUnit-2.1-0/cunit.pc.in
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ CUnit-2.1-0/cunit.pc.in
|
||||
@@ -0,0 +1,9 @@
|
||||
+prefix=@prefix@
|
||||
+exec_prefix=@exec_prefix@
|
||||
+libdir=@libdir@
|
||||
+includedir=@includedir@
|
||||
+
|
||||
+Name: CUnit
|
||||
+Description: CUnit is a unit testing framework for C
|
||||
+Version: @VERSION@
|
||||
+Libs: -L${libdir} -lcunit -lncurses
|
||||
Index: CUnit-2.1-0/Makefile.am
|
||||
===================================================================
|
||||
--- CUnit-2.1-0.orig/Makefile.am
|
||||
+++ CUnit-2.1-0/Makefile.am
|
||||
@@ -10,6 +10,15 @@ COMPILE_DIRS += $(EXAMPLE_COMPILE_DIR)
|
||||
|
||||
SUBDIRS = ${COMPILE_DIRS}
|
||||
|
||||
+EXTRA_DIST = \
|
||||
+ cunit.pc.in \
|
||||
+ $(NULL)
|
||||
+
|
||||
+pkgconfigdir = $(libdir)/pkgconfig
|
||||
+pkgconfig_DATA = \
|
||||
+ cunit.pc \
|
||||
+ $(NULL)
|
||||
+
|
||||
distdir=${PACKAGE}-${VERSION}-${RELEASE}
|
||||
|
||||
WD=`pwd`
|
134
cunit.spec
Normal file
134
cunit.spec
Normal file
@ -0,0 +1,134 @@
|
||||
#
|
||||
# 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
|
||||
Patch1: %{name}-2.1-stdio.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
CUnit is a unit testing framework for C.
|
||||
This package installs the CUnit static library,
|
||||
headers, and documentation files.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: %{name} 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: %{name} 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: %{name} 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: %{name} 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
|
Loading…
Reference in New Issue
Block a user