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

adapt new rust build standard #82

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zxlhhyccc
Copy link
Contributor

No description provided.

$(eval $(call smartdns-rust/templates))
define Package/smartdns-rust/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/target/$(RUSTC_TARGET_ARCH)/stripped/smartdns $(1)/usr/sbin/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$(1) 是 prefix 么?是的话 /usr 可以不要的。

例如,

  • 当 prefix 是 / 时,这时二进制程序在 /sbin
  • 当 prefix 是 /usr/local 时,,这时二进制程序在 /usr/local/sbin

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需/usr,否则编译后安装的目录是/sbin/而不是/usr/sbin/

@mokeyish
Copy link
Owner

这种文件最好能够自动更新。例如上面的 hash。

例如,挂载到 git-hook 上,提交代码自动更新。

https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks

@PikuZheng
Copy link
Contributor

这种文件最好能够自动更新

可以考虑用github的dependabot

@mokeyish
Copy link
Owner

你能想办法,写个脚本自动生成那些版号,hash 之类的么?类似 c 语言里的 configure 命令,它也不是写死的,而是编译的时候自动创建的。

可以看这个
https://wiki.nftables.org/wiki-nftables/index.php/Building_and_installing_nftables_from_sources

它在编译前,有个 autogen 命令。

@PikuZheng
Copy link
Contributor

它在编译前,有个 autogen 命令。

autogen干了啥?

autoreconf -fi;

这个是做Makefile的,和rust兼容吗?感觉还是在github上用dependabot处理掉比较好

@mokeyish
Copy link
Owner

这个是做Makefile的,和rust兼容吗?感觉还是在github上用dependabot处理掉比较好

随意吧,反正是由脚本动态生成 makefile 文件。在构建前,先调脚本生成 makefile,不用每次都要跟随着版本号,改这个文件。倒也用不着 dependabot

@zxlhhyccc
Copy link
Contributor Author

这种文件最好能够自动更新

可以考虑用github的dependabot

没操作过,如何做?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants