Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Welcome to submit a new package to repository 🙏 #27

Open
waruqi opened this issue Oct 5, 2019 · 0 comments
Open

Welcome to submit a new package to repository 🙏 #27

waruqi opened this issue Oct 5, 2019 · 0 comments

Comments

@waruqi
Copy link
Member

waruqi commented Oct 5, 2019

Write a xmake.lua of new package in packages/x/xxx/xmake.lua and push a pull-request to the dev branch.

For example, packages/z/zlib/xmake.lua:

If you want to known more, please see: Create and Submit packages to the official repository


packages/x/xxx/xmake.lua中写个关于新包的xmake.lua描述,然后提交一个pull-request到dev分支。

例如:packages/z/zlib/xmake.lua:

关于如何制作包的更详细描述,请参看文档:制作和提交到官方仓库


package("zlib")

    set_homepage("http://www.zlib.net")
    set_description("A Massively Spiffy Yet Delicately Unobtrusive Compression Library")

    set_urls("http://zlib.net/zlib-$(version).tar.gz",
             "https://downloads.sourceforge.net/project/libpng/zlib/$(version)/zlib-$(version).tar.gz")

    add_versions("1.2.10", "8d7e9f698ce48787b6e1c67e6bff79e487303e66077e25cb9784ac8835978017")
    add_versions("1.2.11", "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1")

    on_install("windows", function (package)
        io.gsub("win32/Makefile.msc", "%-MD", "-" .. package:config("vs_runtime"))
        os.vrun("nmake -f win32\\Makefile.msc zlib.lib")
        os.cp("zlib.lib", package:installdir("lib"))
        os.cp("*.h", package:installdir("include"))
    end)

    on_install("linux", "macosx", function (package)
        import("package.tools.autoconf").install(package, {"--static"})
    end)
 
    on_install("iphoneos", "android@linux,macosx", "mingw@linux,macosx", function (package)
        import("package.tools.autoconf").configure(package, {host = "", "--static"})
        io.gsub("Makefile", "\nAR=.-\n",      "\nAR=" .. (package:build_getenv("ar") or "") .. "\n")
        io.gsub("Makefile", "\nARFLAGS=.-\n", "\nARFLAGS=cr\n")
        io.gsub("Makefile", "\nRANLIB=.-\n",  "\nRANLIB=\n")
        os.vrun("make install -j4")
    end)

    on_test(function (package)
        assert(package:has_cfuncs("inflate", {includes = "zlib.h"}))
    end)
@waruqi waruqi pinned this issue Oct 5, 2019
@waruqi waruqi changed the title Welcome to submit a new package to repository Welcome to submit a new package to repository 🙏 Oct 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant