Bladeren bron

add git-crypt (#1286)

* add git-crypt

* rm support for win

* format
yszhou2019 3 jaren geleden
bovenliggende
commit
2dfc8f4e5b
1 gewijzigde bestanden met toevoegingen van 31 en 0 verwijderingen
  1. 31 0
      packages/g/git-crypt/xmake.lua

+ 31 - 0
packages/g/git-crypt/xmake.lua

@@ -0,0 +1,31 @@
+package("git-crypt")
+    set_kind("binary")
+    set_homepage("https://www.agwa.name/projects/git-crypt/")
+    set_description("Transparent file encryption in git")
+    set_license("GPL-3.0")
+
+    add_urls("https://github.com/AGWA/git-crypt/archive/refs/tags/$(version).tar.gz",
+             "https://github.com/AGWA/git-crypt.git")
+    add_versions("0.7.0", "2210a89588169ae9a54988c7fdd9717333f0c6053ff704d335631a387bd3bcff")
+
+    if is_plat("linux", "macosx") then
+        add_deps("openssl", {host = true})
+    end
+    
+    on_install("linux", "macosx", function (package)
+        io.writefile("xmake.lua", [[
+            add_rules("mode.debug", "mode.release")
+            add_requires("openssl")
+            target("git-crypt")
+                set_kind("binary")
+                add_packages("openssl")
+                add_files("*.cpp|*-unix.cpp|*-win32.cpp")
+                add_headerfiles("*.hpp|*-unix.hpp|*-win32.hpp")
+
+        ]])
+        import("package.tools.xmake").install(package)
+    end)
+
+    on_test(function (package)
+        os.vrun("git-crypt --version")
+    end)