[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.
差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
zh:slackware:slackbuild_scripts [2023/04/02 07:02 (UTC)] – [自动化SlackBuild脚本生成器] 修改标题 dom_kital | zh:slackware:slackbuild_scripts [2023/04/03 09:10 (UTC)] (当前版本) – [创建SlackBuild脚本] dom_kital | ||
---|---|---|---|
行 1: | 行 1: | ||
- | < | + | < |
- | ====== SlackBuild | + | ====== SlackBuild |
SlackBuild脚本本质上是一个shell脚本(通常采用bash shell语法), 它可以自动地配置、编译和创建Slackware包(*.tgz, | SlackBuild脚本本质上是一个shell脚本(通常采用bash shell语法), 它可以自动地配置、编译和创建Slackware包(*.tgz, | ||
- | ===== Overview | + | ===== 概述 |
- | The basic process of creating a Slackware | + | 从源代码创建Slackware包的基本过程可以总结如下,然个别差异应具体问题具体分析 |
- | - Uncompress the source archive | + | * 解压源码压缩包 |
- | - Create a '' | + | * 创建名为'' |
- | - Configure the source, and apply patches if needed. | + | * 如有需要,可自行配置源码或为其打上补丁 |
- | - Compile/build the source and generate the binaries. | + | * 编译/构建源代码生成可执行二进制文件(binary) |
- | - Install the program to a temporary directory. This step may be a little bit tricky, depending on how the '' | + | * 将程序安装至某临时目录 |
- | - Copy the program documentation and other necessary files (including post-installation scripts) to the appropriate subdirectories in the temporary installation directory. These locations should adhere to default directory structure used by Slackware | + | <note tip> |
- | - Use the '' | + | * 复制本程序的技术文档或其它必要文件(包括安装后所需脚本)复制到安装目录中的相应子目录中。 |
+ | <note tip> | ||
+ | * 使用临时目录(安装位置)中的'' | ||
- | While the above steps can be done by hand, the process is tedious, sometimes complex, and involves typing in a lot of commands. Automating the process by a shell script allows the user to share the process with the community at large. It also makes sense to use and modify existing | + | 虽然上面的步骤可以手动完成,但这个过程很繁琐,且需要输入很多命令。通过shell脚本实现自动化安装,用户还可以与整个社区共享流程,使用和修改现有的SlackBuild脚本将同一程序升级到新版本也是很有必要的。 |
- | ===== Creating | + | ===== |
- | A good hands-on tutorial on creating a SlackBuild | + | 欲求优质的SlackBuild打包教程可访问 |
- | 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 " | + | 然而不同的软件可能由不同的语言编译或直接解释(解释型语言)而来,因此'' |
- | It is recommended that anybody who wishes to write a SlackBuild | + | 建议所有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 | + | <note tip>于新手而言,在实际编写SlackBuild脚本之前,应达成上述要求以减少了脚本中出现错误和意外行为的几率。</ |
- | + | ||
- | Submitting SlackBuild scripts to a public repository such as http:// | + | |
+ | 将SlackBuild脚本提交到公共存储库,例如http:// | ||
===== SlackBuild 自动生成器===== | ===== SlackBuild 自动生成器===== | ||
行 33: | 行 34: | ||
这里有些工具也许能辅助你创建SlackBuild脚本,具体如下所示: | 这里有些工具也许能辅助你创建SlackBuild脚本,具体如下所示: | ||
- | * [[http:// | + | * [[http:// |
* [[http:// | * [[http:// | ||
行 40: | 行 41: | ||
* SlackBuilds 仓库 - http:// | * SlackBuilds 仓库 - http:// | ||
* SlackBuild 模板 - http:// | * SlackBuild 模板 - http:// | ||
+ | 国内能访问的SlackBuild公共存储库: | ||
+ | * SlackBuilds荷兰仓库 - https:// | ||
+ | * SlackBuilds英国仓库 - https:// | ||
+ | * Alienbob的git仓库 - https:// | ||
+ | * SlackwareCN社区仓库 - https:// | ||
- | + | ===== 原著者 | |
- | ===== Sources | + | * 最初由 |
- | * Originally written by | + | |
<!-- Please do not change anything below this line--> | <!-- Please do not change anything below this line--> | ||
{{tag> | {{tag> |