aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancyLi1013 <lirui09@beyondsoft.com>2019-10-11 23:25:31 -0700
committerNancyLi1013 <lirui09@beyondsoft.com>2019-10-11 23:25:48 -0700
commit038e1c6bb3d63ae4ee6c4133a7baa82ed404b270 (patch)
tree634436e5477dd123713f14e412aa2a60990f2c2d
parent80aa0ab06e6fd488ce230f086d98b32144616cf5 (diff)
downloadvcpkg-038e1c6bb3d63ae4ee6c4133a7baa82ed404b270.tar.gz
vcpkg-038e1c6bb3d63ae4ee6c4133a7baa82ed404b270.zip
[libcrafter] Add new port
-rw-r--r--ports/libcrafter/CONTROL5
-rw-r--r--ports/libcrafter/portfile.cmake26
2 files changed, 31 insertions, 0 deletions
diff --git a/ports/libcrafter/CONTROL b/ports/libcrafter/CONTROL
new file mode 100644
index 000000000..76c3c1bc2
--- /dev/null
+++ b/ports/libcrafter/CONTROL
@@ -0,0 +1,5 @@
+Source: libcrafter
+Version: 0.3
+Homepage: https://github.com/pellegre/libcrafter
+Description: Libcrafter is a high level library for C++ designed to create and decode network packets.
+Build-Depends: libpcap \ No newline at end of file
diff --git a/ports/libcrafter/portfile.cmake b/ports/libcrafter/portfile.cmake
new file mode 100644
index 000000000..2b00aa512
--- /dev/null
+++ b/ports/libcrafter/portfile.cmake
@@ -0,0 +1,26 @@
+vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux platforms" ON_TARGET "Windows" "OSX")
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO pellegre/libcrafter
+ REF version-0.3
+ SHA512 7c396ba942b304dddfaa569adb44697f75568d3ef2ed48dda758e281f3b7c172439309033bbf5498069a4a61a952f93e41af99b129ce874ce76b5ec08da58116
+ HEAD_REF master
+)
+
+vcpkg_configure_make(
+ SOURCE_PATH ${SOURCE_PATH}
+ AUTOCONFIG
+ PROJECT_SUBPATH libcrafter
+ OPTIONS
+ --with-libpcap=${CURRENT_INSTALLED_DIR}
+)
+
+vcpkg_install_make()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+vcpkg_copy_pdbs()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/libcrafter/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file