add and improve acl, attr and rsync (#577)
* update pkgconf * add attr * add acl * resolve conflict between lz4 and zstd * add rsync * update linux-headers * allow xxhash to be build on all platforms * improve acl and attr Co-authored-by: xq114 <1140735506@qq.com>pull/580/head
parent
d8ac66838e
commit
df6cad5cf5
8 changed files with 116 additions and 11 deletions
@ -0,0 +1,40 @@ |
|||||||
|
package("acl") |
||||||
|
|
||||||
|
set_homepage("http://savannah.nongnu.org/projects/acl/") |
||||||
|
set_description("Commands for Manipulating POSIX Access Control Lists") |
||||||
|
set_license("GPL-2.0") |
||||||
|
|
||||||
|
add_urls("http://download.savannah.nongnu.org/releases/acl/acl-$(version).tar.gz") |
||||||
|
add_versions("2.3.1", "760c61c68901b37fdd5eefeeaf4c0c7a26bdfdd8ac747a1edff1ce0e243c11af") |
||||||
|
|
||||||
|
add_deps("pkgconf", "attr") |
||||||
|
|
||||||
|
on_install("linux", function (package) |
||||||
|
local configs = {} |
||||||
|
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) |
||||||
|
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) |
||||||
|
if package:config("pic") ~= false then |
||||||
|
table.insert(configs, "--with-pic") |
||||||
|
end |
||||||
|
local cflags = {} |
||||||
|
local ldflags = {} |
||||||
|
for _, dep in ipairs(package:orderdeps()) do |
||||||
|
local fetchinfo = dep:fetch() |
||||||
|
if fetchinfo then |
||||||
|
for _, includedir in ipairs(fetchinfo.includedirs or fetchinfo.sysincludedirs) do |
||||||
|
table.insert(cflags, "-I" .. includedir) |
||||||
|
end |
||||||
|
for _, linkdir in ipairs(fetchinfo.linkdirs) do |
||||||
|
table.insert(ldflags, "-L" .. linkdir) |
||||||
|
end |
||||||
|
for _, link in ipairs(fetchinfo.links) do |
||||||
|
table.insert(ldflags, "-l" .. link) |
||||||
|
end |
||||||
|
end |
||||||
|
end |
||||||
|
import("package.tools.autoconf").install(package, configs, {cflags = cflags, ldflags = ldflags}) |
||||||
|
end) |
||||||
|
|
||||||
|
on_test(function (package) |
||||||
|
assert(package:has_cfuncs("acl_check", {includes = "acl/libacl.h"})) |
||||||
|
end) |
@ -0,0 +1,23 @@ |
|||||||
|
package("attr") |
||||||
|
|
||||||
|
set_homepage("https://savannah.nongnu.org/projects/attr") |
||||||
|
set_description("Commands for Manipulating Filesystem Extended Attributes") |
||||||
|
set_license("GPL-2.0") |
||||||
|
|
||||||
|
add_urls("http://download.savannah.nongnu.org/releases/attr/attr-$(version).tar.gz") |
||||||
|
add_versions("2.5.1", "bae1c6949b258a0d68001367ce0c741cebdacdd3b62965d17e5eb23cd78adaf8") |
||||||
|
|
||||||
|
on_install("linux", function (package) |
||||||
|
local configs = {} |
||||||
|
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) |
||||||
|
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) |
||||||
|
if package:config("pic") ~= false then |
||||||
|
table.insert(configs, "--with-pic") |
||||||
|
end |
||||||
|
import("package.tools.autoconf").install(package) |
||||||
|
print(os.files(package:installdir("**"))) |
||||||
|
end) |
||||||
|
|
||||||
|
on_test(function (package) |
||||||
|
assert(package:has_cfuncs("attr_copy_file", {includes = "attr/libattr.h"})) |
||||||
|
end) |
@ -0,0 +1,35 @@ |
|||||||
|
package("rsync") |
||||||
|
|
||||||
|
set_kind("binary") |
||||||
|
set_homepage("https://rsync.samba.org/") |
||||||
|
set_description("rsync is an open source utility that provides fast incremental file transfer.") |
||||||
|
set_license("GPL-3.0") |
||||||
|
|
||||||
|
add_urls("https://download.samba.org/pub/rsync/src/rsync-$(version).tar.gz") |
||||||
|
add_versions("3.2.3", "becc3c504ceea499f4167a260040ccf4d9f2ef9499ad5683c179a697146ce50e") |
||||||
|
|
||||||
|
add_deps("openssl", "xxhash", "lz4", "acl", "zstd", {host = true}) |
||||||
|
|
||||||
|
on_install("linux", function (package) |
||||||
|
local cxflags = {} |
||||||
|
local ldflags = {} |
||||||
|
for _, dep in ipairs(package:orderdeps()) do |
||||||
|
local fetchinfo = dep:fetch() |
||||||
|
if fetchinfo then |
||||||
|
for _, includedir in ipairs(fetchinfo.includedirs or fetchinfo.sysincludedirs) do |
||||||
|
table.insert(cxflags, "-I" .. includedir) |
||||||
|
end |
||||||
|
for _, linkdir in ipairs(fetchinfo.linkdirs) do |
||||||
|
table.insert(ldflags, "-L" .. linkdir) |
||||||
|
end |
||||||
|
for _, link in ipairs(fetchinfo.links) do |
||||||
|
table.insert(ldflags, "-l" .. link) |
||||||
|
end |
||||||
|
end |
||||||
|
end |
||||||
|
import("package.tools.autoconf").install(package, configs, {cxflags = cxflags, ldflags = ldflags}) |
||||||
|
end) |
||||||
|
|
||||||
|
on_test(function (package) |
||||||
|
os.vrun("rsync --version") |
||||||
|
end) |
Loading…
Reference in new issue