diff --git a/check-format.patch b/check-format.patch
deleted file mode 100644
index 5482360..0000000
--- a/check-format.patch
+++ /dev/null
@@ -1,39 +0,0 @@
---- ./src/check_print.c.orig 2012-10-22 08:03:34.000000000 -0600
-+++ ./src/check_print.c 2012-10-22 12:51:11.343652481 -0600
-@@ -179,10 +179,10 @@ void tr_xmlprint (FILE *file, TestResult
- tr->duration < 0 ? 0 : tr->duration % 1000000);
- fprintf(file, " ");
- fprint_xml_esc(file, tr->tcname);
-- fprintf(file,"\n", tr->tcname);
-- fprintf(file, " ", tr->msg);
-+ fprintf(file,"\n");
-+ fprintf(file, " ");
- fprint_xml_esc(file, tr->msg);
-- fprintf(file,"\n", tr->msg);
-+ fprintf(file,"\n");
- fprintf(file, " \n");
-
- if (slash != NULL) {
---- ./src/check_log.c.orig 2012-10-22 08:03:34.000000000 -0600
-+++ ./src/check_log.c 2012-10-22 12:49:29.626726729 -0600
-@@ -257,7 +257,7 @@ void xml_lfun (SRunner *sr CK_ATTRIBUTE_
- gettimeofday(&now, NULL);
- timersub(&now, &inittv, &now);
-
-- fprintf(file, " %d.%06d\n",
-+ fprintf(file, " %ld.%06ld\n",
- now.tv_sec, now.tv_usec);
- fprintf(file, "\n");
- }
-@@ -267,9 +267,9 @@ void xml_lfun (SRunner *sr CK_ATTRIBUTE_
- case CLSTART_S:
- s = obj;
- fprintf(file, " \n");
-- fprintf(file, " ", s->name);
-+ fprintf(file, " ");
- fprint_xml_esc(file, s->name);
-- fprintf(file,"\n", s->name);
-+ fprintf(file,"\n");
- break;
- case CLEND_SR:
- break;
diff --git a/check.spec b/check.spec
index 8a422c0..81627a5 100644
--- a/check.spec
+++ b/check.spec
@@ -37,12 +37,22 @@ Group: Development/Libraries
%description static
Static libraries of check.
+%package checkmk
+Summary: Translate concise versions of test suites into C programs
+License: BSD
+BuildArch: noarch
+Requires: %{name} = %{version}-%{release}
+
+%description checkmk
+The checkmk binary translates concise versions of test suites into C
+programs suitable for use with the Check unit test framework.
+
%prep
%setup -q
%patch1
-# Fix detection of localtime_r declaration
-sed -i "/localtime_r/s/ac_includes_default/&\n#include /" configure
+# Fix detection of various time-related function declarations
+sed -i '/"ac_cv_have_decl_clock_gettime"/iac_includes_default="$ac_includes_default\n#include "' configure
%build
%configure
@@ -52,7 +62,7 @@ sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
-i libtool
-make
+make %{?_smp_mflags}
%install
make DESTDIR=$RPM_BUILD_ROOT install
@@ -60,6 +70,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -rf $RPM_BUILD_ROOT%{_infodir}/dir
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
+%check
+export LD_LIBRARY_PATH=$PWD/src/.libs
+make check
+
%post
/sbin/ldconfig
if [ -e %{_infodir}/%{name}.info* ]; then
@@ -83,8 +97,6 @@ fi
%files devel
%doc doc/example
-%{_bindir}/checkmk
-%{_mandir}/man1/checkmk.1*
%{_includedir}/check.h
%{_includedir}/check_stdint.h
%{_libdir}/libcheck.so
@@ -96,7 +108,18 @@ fi
%doc COPYING.LESSER
%{_libdir}/libcheck.a
+%files checkmk
+%doc checkmk/README checkmk/examples
+%{_bindir}/checkmk
+%{_mandir}/man1/checkmk.1*
+
%changelog
+* Mon Aug 5 2013 Jerry James - 0.9.10-3
+- Drop -format patch, upstreamed
+- Fix detection of more time-related functions
+- Give checkmk its own subpackage for licensing reasons
+- Add a check script
+
* Sat Aug 03 2013 Fedora Release Engineering - 0.9.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild