Name: libfaketime Version: 0.9.5 Release: 2%{dist} Summary: Report faked system time to programs License: GPLv2 URL: http://www.code-wizards.com/projects/%{name} Source0: http://www.code-wizards.com/projects/%{name}/%{name}-%{version}.tar.gz # patch borrowed from Debian Patch0: libfaketime-fix-infinite-recursion-on-real_clock_gettime.patch %description libfaketime intercepts various system calls which programs use to retrieve the current date and time. It can then report faked dates and times (as specified by you, the user) to these programs. This means you can modify the system time a program sees without having to change the time system-wide. %prep %setup -q # work around from upstream for autodetecting glibc version bug on i686 (Paul Wouters) sed -i -e 's/__asm__(".symver timer_gettime_22/\/\/__asm__(".symver timer_gettime_22/' src/libfaketime.c sed -i -e 's/__asm__(".symver timer_settime_22/\/\/__asm__(".symver timer_settime_22/' src/libfaketime.c # avoid infinite recursion, reported upstream at XXXX %patch0 -p1 %build cd src ; CFLAGS="%{optflags} -Wno-strict-aliasing" make %{?_smp_mflags} \ PREFIX="%{_prefix}" LIBDIRNAME="/%{_lib}" all %check make %{?_smp_mflags} -C test all %install make PREFIX="%{_prefix}" DESTDIR=%{buildroot} LIBDIRNAME="/%{_lib}/faketime" install # rpm isn't smart enough to know we use the doc macro to put it right there rm -r %{buildroot}/%{_docdir}/faketime # This is needed for rpm to strip the libraries correctly chmod 755 %{buildroot}/%{_libdir}/faketime/%{name}*.so.* %files %{_bindir}/faketime %dir %attr(0755,root,root) %_libdir/faketime %attr(0755,root,root) %{_libdir}/faketime/%{name}*.so.* %doc README COPYING NEWS README README.developers %_mandir/man1/* %changelog * Wed Jan 29 2014 Paul Wouters - 0.9.5-2 - Own the faketime directory - Use optflags instead of RPM_OPT_FLAGS - Ensure libraries are stripped - Place libraries in non-system path. Should only be used explicitly * Mon Oct 14 2013 Dhiru Kholia - 0.9.5-1 - updated the package and borrowed fixes from Paul Wouters * Tue Oct 08 2013 Dhiru Kholia - 0.9.1-1 - initial version borrowed from rosalinux