nettee: 0.3.4 -> 0.3.5, switch to SourceForge, fix build (#393218)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
Index: a/CMakeLists.txt
|
||||
===================================================================
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -6,17 +6,18 @@
|
||||
SET(FS11 -D_POSIX_SOURCE)
|
||||
endif (UNIX)
|
||||
|
||||
#modify next line if a different installation target is required
|
||||
-SET(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
-SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
+#SET(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
+#SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
add_executable(nettee nettee.c rb.c nio.c)
|
||||
###add_executable(stub_child_process stub_child_process.c rb.c nio.c)
|
||||
###add_executable(stub_parent_process stub_parent_process.c rb.c nio.c)
|
||||
#
|
||||
target_compile_options(nettee PRIVATE ${FS9} ${FS10} ${FS11})
|
||||
###target_compile_options(stub_child_process PRIVATE ${FS9} ${FS11})
|
||||
###target_compile_options(stub_parent_process PRIVATE ${FS9} ${FS11})
|
||||
+install(TARGETS nettee DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
#
|
||||
#####################################################
|
||||
#
|
||||
#install man pages
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchurl,
|
||||
cmake,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "nettee";
|
||||
version = "0.3.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/nettee/nettee-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-WeZ18CLexdWy8RlHNh0Oo/6KXxzShZT8/xklAWyB8ss=";
|
||||
};
|
||||
|
||||
patches = [ ./fix-cmake-output.patch ];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
# additional shell scripts require accudate (not in nixpkgs)
|
||||
postInstall = ''
|
||||
rm $out/bin/*.sh
|
||||
'';
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
versionCheckProgramArg = "-version";
|
||||
doInstallCheck = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://sourceforge.net/projects/nettee";
|
||||
description = ''Network "tee" program'';
|
||||
license = lib.licenses.gpl2Only;
|
||||
maintainers = with lib.maintainers; [ Profpatsch ];
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "nettee";
|
||||
};
|
||||
})
|
||||
@@ -1,82 +0,0 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchurl,
|
||||
cleanPackaging,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.3.4";
|
||||
sha256 = "00xbkp99x9v07r34w7m2p8gak5hdsdbka36n7a733rdrrkgf5z7r";
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "nettee";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://saf.bio.caltech.edu/pub/software/linux_or_unix_tools/beta-nettee-${version}.tar.gz";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "http://saf.bio.caltech.edu/nettee.html";
|
||||
description = ''Network "tee" program'';
|
||||
license = lib.licenses.gpl2Only;
|
||||
maintainers = with lib.maintainers; [ Profpatsch ];
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "nettee";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
"bin"
|
||||
"man"
|
||||
"doc"
|
||||
"out"
|
||||
];
|
||||
|
||||
patchPhase = ''
|
||||
# h_addr field was removed
|
||||
sed -e '1 i #define h_addr h_addr_list[0]' \
|
||||
-i nettee.c
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
cat README.TXT
|
||||
mkdir -p $bin/bin
|
||||
$CC -o $bin/bin/nettee \
|
||||
-Wall -pedantic -std=c99\
|
||||
-D_LARGEFILE64_SOURCE -D_POSIX_SOURCE -D_XOPEN_SOURCE\
|
||||
nettee.c rb.c nio.c
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
${
|
||||
cleanPackaging.commonFileActions {
|
||||
docFiles = [
|
||||
"*.html"
|
||||
"*.TXT"
|
||||
"LICENSE"
|
||||
"*.sh"
|
||||
"topology.txt"
|
||||
"beowulf.master"
|
||||
"topology_info"
|
||||
];
|
||||
noiseFiles = [
|
||||
"*.c"
|
||||
"*.h"
|
||||
"nettee"
|
||||
];
|
||||
}
|
||||
} $doc/share/doc/nettee
|
||||
|
||||
mkdir -p $man/share/man/{man1,man3}
|
||||
mv nettee.1 $man/share/man/man1
|
||||
mv nettee_cmd.3 $man/share/man/man3
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
${cleanPackaging.checkForRemainingFiles}
|
||||
'';
|
||||
|
||||
}
|
||||
@@ -10235,10 +10235,6 @@ with pkgs;
|
||||
inherit (skawarePackages) cleanPackaging;
|
||||
};
|
||||
|
||||
nettee = callPackage ../tools/networking/nettee {
|
||||
inherit (skawarePackages) cleanPackaging;
|
||||
};
|
||||
|
||||
slibGuile = callPackage ../development/libraries/slib {
|
||||
scheme = guile;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user