[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
zh:slackware:slackbuild_scripts [2023/04/03 08:00 (UTC)] – [概述] dom_kitalzh:slackware:slackbuild_scripts [2023/04/03 09:10 (UTC)] (当前版本) – [创建SlackBuild脚本] dom_kital
行 1: 行 1:
-<note warning>本页面目前由dom_kital进行翻译,如有疑或建议联系dom_kital@outlook.com</note>+<note important>目前(2023年)国内能访SlackBuild脚本的公共仓库,看下方扩展链接</note>
 ====== SlackBuild 脚本 ====== ====== SlackBuild 脚本 ======
  
行 19: 行 19:
  
 虽然上面的步骤可以手动完成,但这个过程很繁琐,且需要输入很多命令。通过shell脚本实现自动化安装,用户还可以与整个社区共享流程,使用和修改现有的SlackBuild脚本将同一程序升级到新版本也是很有必要的。 虽然上面的步骤可以手动完成,但这个过程很繁琐,且需要输入很多命令。通过shell脚本实现自动化安装,用户还可以与整个社区共享流程,使用和修改现有的SlackBuild脚本将同一程序升级到新版本也是很有必要的。
-===== Creating SlackBuild scripts =====+=====  创建SlackBuild脚本  =====
  
-A good hands-on tutorial on creating a SlackBuild script can be found [[http://www.slackwiki.com/Writing_A_SlackBuild_Script|here]], and there are also a few [[http://slackbuilds.org/templates/|templates]] available to get a feeling for what is needed from a script.+欲求优质的SlackBuild打包教程可访问 [[http://www.slackwiki.com/Writing_A_SlackBuild_Script|此处]], 这里还有些 [[http://slackbuilds.org/templates/|模板]] 可供您参考或使用。
  
-However, software may be written in different programming languages, use different build systems, or may even simply be written in an interpreted programming language with no obvious way to "install" it. In such cases, many steps involved in writing a SlackBuild script will differ from the standard way. Blindly copying and pasting commands from other SlackBuild scripts may or may not work.+然而不同的软件可能由不同的语言编译或直接解释(解释型语言)而来,因此''安装过程''并无定法,上面概述并不能概括出所有软件的安装方法,仍需按实际情况来更改脚本内容。请不要盲目地复制粘贴其它SlackBuild脚本,其运行结果是未知的(<del>俺寻思可以</del>)。
  
-It is recommended that anybody who wishes to write a SlackBuild script, study and understand the build system of a software project before attempting to write a SlackBuild script for it. A degree of proficiency in writing shell scripts is also a definite benefit, as it is the practice to use Bourne shell compatible scripts for SlackBuilds. Ideally, simple C projects which use the standard GNU Make system is a good way to start practicing writing SlackBuild scripts. +建议所有SlackBuild作者,在尝试为软件项目编写SlackBuild脚本之前,应先研究并了解其软件的构建系统。 其次,应当熟练掌握shell脚本语法或其它Bash类语法,在Slackware社区中,大多数人常采用Bash语法。理想情况下,使用标准GNU Make系统的简单C项目是开始练习编写SlackBuild脚本的好方法。 
-<note tip>For new script writers, it is a good idea to perform the above steps manually to create the package from source, before actually writing a SlackBuild script. This reduces the chances of bugs and unexpected behaviour in the script.</note> +<note tip>于新手而言,在实际编写SlackBuild脚本之前,应达成上述要求以减少了脚本中出现错误和意外行为的几率。</note>
- +
-Submitting SlackBuild scripts to a public repository such as http://www.slackbuilds.org may additionally require adherence to certain conventions and coding standards. For instance, it would be necessary for the script to determine the target architecture at runtime rather than hard-coding it into the script. These standards attempt to make SlackBuild scripts as portable as possible.+
  
 +将SlackBuild脚本提交到公共存储库,例如http://www.slackbuilds.org可能另需遵守某些约定和编码标准。 \\ 例如,脚本有必要在运行时(runtime)确定目标体系结构,而不是将其硬编码(hard-code)到脚本中。这些标准试图使SlackBuild脚本尽可能地具有可移植性。
  
 ===== SlackBuild 自动生成器===== ===== SlackBuild 自动生成器=====
行 35: 行 34:
 这里有些工具也许能辅助你创建SlackBuild脚本,具体如下所示: 这里有些工具也许能辅助你创建SlackBuild脚本,具体如下所示:
  
-  * [[http://alien.slackbook.org/AST/ | Alien's SlackBuild Toolkit (AST)]] \\ 基于web实现的“向导”工具 by [[wiki:user:alienbob|Eric Hameleers]]+  * [[http://alien.slackbook.org/AST/ | Alien's SlackBuild Toolkit (AST)]] \\ 基于web实现的“向导打包工具 by [[wiki:user:alienbob|Eric Hameleers]]
   * [[http://www.dawoodfall.net/slackbuilds/noversion/mkslack/ | mkslack]] \\ SlackBuild生成脚本 by David Woodfall   * [[http://www.dawoodfall.net/slackbuilds/noversion/mkslack/ | mkslack]] \\ SlackBuild生成脚本 by David Woodfall
  
行 42: 行 41:
   * SlackBuilds 仓库 - http://www.slackbuilds.org/   * SlackBuilds 仓库 - http://www.slackbuilds.org/
   * SlackBuild 模板 - http://slackbuilds.org/templates/   * SlackBuild 模板 - http://slackbuilds.org/templates/
 +  国内能访问的SlackBuild公共存储库:
 +    * SlackBuilds荷兰仓库 - https://slackware.nl/slackbuilds.org/
 +    * SlackBuilds英国仓库 - https://www.slackware.uk/slackbuilds.org
 +    * Alienbob的git仓库 - https://git.slackware.nl/slackbuilds
 +    * SlackwareCN社区仓库 - https://github.com/slackwarecn 
  
- +===== 原著者 ===== 
-===== Sources ===== +  * 最初由  [[wiki:user:vharishankar|V.Harishankar]] 为 ''SlackDocs Wiki'' 项目撰写
-  * Originally written by  [[wiki:user:vharishankar|V.Harishankar]] for the SlackDocs Wiki Project+
  
 <!-- Please do not change anything below this line--> <!-- Please do not change anything below this line-->
 {{tag>slackware slackbuild}} {{tag>slackware slackbuild}}
 zh:slackware:slackbuild_scripts ()