2015-08-11 10:13:33 +00:00
|
|
|
{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool, trousers, openssl, libxml2, libuuid, gettext, perl }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "openpts-${version}";
|
|
|
|
version = "0.2.6";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://jaist.dl.osdn.jp/openpts/54410/openpts-${version}.tar.gz";
|
|
|
|
sha256 = "1b5phshl49fxr5y3g5zz75gm0n4cw8i7n29x5f1a95xkwrjpazi0";
|
|
|
|
};
|
|
|
|
|
|
|
|
# patches from https://apps.fedoraproject.org/packages/openpts/sources/patches/
|
|
|
|
patches = [ ./bugs.patch ./zlib.patch ./tboot.patch ./ptsc.patch ];
|
|
|
|
|
2017-09-05 21:26:13 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ autoconf automake libtool trousers openssl libxml2 libuuid gettext ];
|
2015-08-11 10:13:33 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace include/Makefile.am --replace "./cvs2msg.pl" "${perl}/bin/perl cvs2msg.pl";
|
|
|
|
$SHELL bootstrap.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [ "--with-tss" "--with-aru" "--with-tboot" "--enable-tnc" "--with-aide" ];
|
|
|
|
|
2016-08-22 17:36:15 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-I${trousers}/include/trousers -I${trousers}/include/tss -Wno-deprecated-declarations";
|
2015-08-11 10:13:33 +00:00
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out
|
|
|
|
mkdir -p $out/etc
|
|
|
|
cp -p dist/ptsc.conf.in $out/etc/ptsc.conf
|
|
|
|
cp -p dist/ptsv.conf.in $out/etc/ptsv.conf
|
|
|
|
mkdir -p $out/share/openpts/models
|
|
|
|
cp -p models/*.uml $out/share/openpts/models/
|
|
|
|
|
|
|
|
mkdir -p $out/share/openpts/tpm_emulator
|
|
|
|
cp dist/tpm_emulator/README.rhel $out/share/openpts/tpm_emulator/README
|
|
|
|
cp dist/tpm_emulator/binary_bios_measurements $out/share/openpts/tpm_emulator/
|
|
|
|
cp dist/tpm_emulator/tcsd $out/share/openpts/tpm_emulator/
|
|
|
|
|
|
|
|
mkdir -p $out/share/openpts/tboot
|
|
|
|
cp dist/tboot/README.fedora15 $out/share/openpts/tboot/README
|
|
|
|
cp dist/tboot/ptsc.conf.fedora15 $out/share/openpts/tboot/ptsc.conf
|
|
|
|
cp dist/tboot/tcsd.conf.fedora15 $out/share/openpts/tboot/tcsd.conf
|
|
|
|
cp dist/tboot/tcsd.fedora15 $out/share/openpts/tboot/tcsd
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "TCG Platform Trust Service (PTS)";
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = http://sourceforge.jp/projects/openpts;
|
2015-08-11 10:13:33 +00:00
|
|
|
license = stdenv.lib.licenses.cpl10;
|
2016-08-22 17:36:15 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2015-08-11 10:13:33 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ tstrobel ];
|
|
|
|
};
|
|
|
|
}
|