mirror of
https://github.com/wolfcw/libfaketime.git
synced 2026-05-17 08:36:28 +03:00
Packaging details, starting with OS X
This commit is contained in:
54
packaging/OSX/Fink/libfaketime.info
Normal file
54
packaging/OSX/Fink/libfaketime.info
Normal file
@@ -0,0 +1,54 @@
|
||||
Package: libfaketime
|
||||
Version: 0.9.5
|
||||
Revision: 1
|
||||
|
||||
Source: http://www.code-wizards.com/projects/%n/%n-%v.tar.gz
|
||||
Source-MD5: 89b5c71e6c6a93b1c6feba374ac37719
|
||||
|
||||
Maintainer: Wolfgang Hommel <wolf@fink.code-wizards.com>
|
||||
HomePage: http://www.code-wizards.com/projects/%n
|
||||
License: GPL
|
||||
|
||||
Description: Modify system time for single applications
|
||||
|
||||
DescDetail: <<
|
||||
libfaketime is a library that is dynamically linked to applications
|
||||
or system commands at run-time by using the DYLD_INSERT_LIBRARIES
|
||||
mechanism. It then intercepts various system calls, which programs
|
||||
use to retrieve the current date and time. libfaketime can then
|
||||
report faked dates and times to these programs. This means you can
|
||||
modify the system time a program uses without having to change the
|
||||
date and time system-wide.
|
||||
<<
|
||||
|
||||
DescUsage: <<
|
||||
libfaketime includes a simple wrapper called faketime. Run the
|
||||
command faketime without any parameters for usage information.
|
||||
For information on how to use libfaketime without the wrapper
|
||||
and access its full raw functionality, please see
|
||||
%p/share/doc/libfaketime/README*
|
||||
<<
|
||||
|
||||
BuildDepends: fink (>= 0.28)
|
||||
Distribution: 10.7, 10.8, 10.9
|
||||
|
||||
CompileScript: <<
|
||||
#! /bin/sh -ev
|
||||
make -f Makefile.OSX -C src PREFIX=%{p}
|
||||
<<
|
||||
|
||||
InfoTest: <<
|
||||
TestScript: make -f Makefile.OSX test || exit 2
|
||||
<<
|
||||
|
||||
InstallScript: <<
|
||||
#! /bin/sh -ev
|
||||
make -f Makefile.OSX -C src install PREFIX=%{i}
|
||||
<<
|
||||
|
||||
DocFiles: COPYING README README.OSX
|
||||
|
||||
Shlibs: <<
|
||||
!%p/lib/faketime/%N.1.dylib
|
||||
<<
|
||||
|
||||
24
packaging/OSX/Homebrew/libfaketime.rb
Normal file
24
packaging/OSX/Homebrew/libfaketime.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
require 'formula'
|
||||
|
||||
class Libfaketime < Formula
|
||||
homepage 'http://www.code-wizards.com/projects/libfaketime'
|
||||
url 'http://code-wizards.com/projects/libfaketime/libfaketime-0.9.5.tar.gz'
|
||||
sha1 '12199af854004f231892ab6976c2e99b937e2d61'
|
||||
|
||||
depends_on :macos => :lion
|
||||
|
||||
fails_with :llvm do
|
||||
build 2336
|
||||
cause <<-EOS.undent
|
||||
No thread local storage support.
|
||||
EOS
|
||||
end
|
||||
|
||||
def install
|
||||
system "make -C src -f Makefile.OSX PREFIX=#{prefix}"
|
||||
bin.install 'src/faketime'
|
||||
(lib/'faketime').install 'src/libfaketime.1.dylib'
|
||||
man1.install 'man/faketime.1'
|
||||
end
|
||||
end
|
||||
|
||||
45
packaging/OSX/MacPorts/Portfile
Normal file
45
packaging/OSX/MacPorts/Portfile
Normal file
@@ -0,0 +1,45 @@
|
||||
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
|
||||
# $Id: Portfile 112093 2013-10-11 19:57:13Z ryandesign@macports.org $
|
||||
|
||||
PortSystem 1.0
|
||||
PortGroup github 1.0
|
||||
|
||||
github.setup wolfcw libfaketime 0.9.5rc3 v
|
||||
|
||||
checksums rmd160 8d10140a181e0d5ce93bd7b0e7eeaa380eb7a9c6 \
|
||||
sha256 ee2234335b3d730fdf6898d8dba9195d9ab3068c29af25270be03682d24a424f
|
||||
|
||||
categories sysutils
|
||||
platforms darwin
|
||||
maintainers code-wizards.com:wolf openmaintainer
|
||||
license GPL-2
|
||||
|
||||
description libfaketime modifies the system time for a single application
|
||||
|
||||
long_description libfaketime intercepts various system calls that applications use to \
|
||||
retrieve the current date and time. It can then report user-specified \
|
||||
faked dates and times to these applications. This allows us to modify \
|
||||
the system time an application sees without having to change the time \
|
||||
system-wide. The faketime wrapper can be used from command line. \
|
||||
Check the documentation on how to integrate into installed applications.
|
||||
|
||||
patchfiles patch-test-Makefile.OSX.diff
|
||||
|
||||
use_configure no
|
||||
|
||||
variant universal {}
|
||||
|
||||
compiler.blacklist *cc* *dragonegg*
|
||||
|
||||
build.args -f Makefile.OSX
|
||||
build.env CC="${configure.cc}" \
|
||||
CFLAGS="[get_canonical_archflags cc]" \
|
||||
LDFLAGS="[get_canonical_archflags ld]" \
|
||||
PREFIX=${prefix}
|
||||
|
||||
test.run yes
|
||||
test.args ${build.args}
|
||||
eval test.env ${build.env}
|
||||
|
||||
destroot.args ${build.args}
|
||||
eval destroot.env ${build.env}
|
||||
12
packaging/OSX/MacPorts/patch-test-Makefile.OSX.diff
Normal file
12
packaging/OSX/MacPorts/patch-test-Makefile.OSX.diff
Normal file
@@ -0,0 +1,12 @@
|
||||
--- test/Makefile.OSX.orig 2013-10-11 09:42:38.000000000 -0500
|
||||
+++ test/Makefile.OSX 2013-10-11 14:46:11.000000000 -0500
|
||||
@@ -1,7 +1,6 @@
|
||||
-CC = gcc
|
||||
+CC ?= clang
|
||||
|
||||
-CFLAGS = -std=gnu99 -Wall -DFAKE_STAT
|
||||
-LDFLAGS =
|
||||
+CFLAGS += -std=gnu99 -Wall -DFAKE_STAT
|
||||
|
||||
SRC = timetest.c
|
||||
OBJ = ${SRC:.c=.o}
|
||||
65
packaging/OSX/README
Normal file
65
packaging/OSX/README
Normal file
@@ -0,0 +1,65 @@
|
||||
# Packaging for OS X
|
||||
|
||||
Several software tools assist with the installation of open source software
|
||||
on OS X. The authors of libfaketime maintain the libfaketime build spec files
|
||||
for MacPorts, Homebrew, and Fink.
|
||||
|
||||
|
||||
## MacPorts
|
||||
|
||||
Installing libfaketime via MacPorts is based on the provided Portfile, which
|
||||
has been included in the official MacPorts distribution since October, 2013.
|
||||
Users therefore can use "sudo port install libfaketime" as installation
|
||||
command.
|
||||
|
||||
Some libfaketime Portfile caveats:
|
||||
|
||||
- Github-based source file distribution
|
||||
(0.9.5rc3 is code-identical to 0.9.5 release except for Makefile patches)
|
||||
- Non-clang-compilers need to be blacklisted (for libfaketime =0.9.5)
|
||||
- MacPorts folks have requested to avoid a platform-specific Makefile.OSX in
|
||||
the future
|
||||
|
||||
Portfile submission is documented in https://www.macports.org/guide/#project.contributing
|
||||
and handled via a ticketing system:
|
||||
|
||||
- https://trac.macports.org/ticket/40662
|
||||
- https://trac.macports.org/ticket/40748
|
||||
|
||||
|
||||
## Homebrew
|
||||
|
||||
The libfaketime 'formula' for Homebrew has been submitted via an pull request
|
||||
to https://github.com/mxcl/homebrew in October, 2013, and awaits approval.
|
||||
Homebrew users can use the 'brew install' command on the provided formula
|
||||
file meanwhile.
|
||||
|
||||
Some libfaketime formula caveats:
|
||||
|
||||
- "depends_on :macos => :lion" must be set for libfaketime >=0.9.5
|
||||
- :llvm builds <= 2336 must be blacklisted because libfaketime =0.9.5
|
||||
requires a compiler with thread local storage support.
|
||||
|
||||
|
||||
## Fink
|
||||
|
||||
A libfaketime.info file has been submitted to the Fink project in October, 2013,
|
||||
via https://sourceforge.net/p/fink/package-submissions/ and awaits approval.
|
||||
Fink users can use libfaketime.info, place it, e.g., into
|
||||
/sw/fink/10.7/stable/main/finkinfo/libs and run the commands
|
||||
|
||||
fink -m --build-as-nobody rebuild libfaketime
|
||||
fink install libfaketime
|
||||
|
||||
meanwhile.
|
||||
|
||||
Some libfaketime fink info file caveats:
|
||||
|
||||
- The dynamic library must be declared as private Shlib; this also necessitates
|
||||
BuildDepends: fink (>= 0.28)
|
||||
- "Distribution: 10.7, 10.8, 10.9" is required because libfaketime >=0.9.5 does
|
||||
not work on OS X 10.6 or before anymore.
|
||||
- When compiling, PREFIX=%{p} needs to be used because this path is hardcoded
|
||||
into the wrapper. However, "make install" needs to deploy into PREFIX=%{i} to
|
||||
make packaging work.
|
||||
|
||||
14
packaging/README
Normal file
14
packaging/README
Normal file
@@ -0,0 +1,14 @@
|
||||
# libfaketime packaging
|
||||
|
||||
Not everyone feels comfortable with installing tools and libraries manually
|
||||
by downloading and building them from source. Luckily enough, voluntary
|
||||
maintainers prepare new libfaketime releases for various platforms and make
|
||||
them available as binary packages or otherwise automatically installable
|
||||
software.
|
||||
|
||||
In this directory, we collect build specification files for the platforms
|
||||
that we are aware of being actively supported. They help us to analyze
|
||||
build issues, create awareness for platform-specific patches that had to
|
||||
be applied and might be merged with our code, and provide the contact
|
||||
information for future "early release warnings".
|
||||
|
||||
Reference in New Issue
Block a user