Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| openeuler_risc-v-fixing [2024/01/25 03:40] – Add bcond_without macro & oEEP-0012 misaka00251 | openeuler_risc-v-fixing [2024/11/27 07:32] (current) – [KDE 系列包] misaka00251 | ||
|---|---|---|---|
| Line 25: | Line 25: | ||
| 建仓的时候除了 spec 文件和源码,一定要包含一个 yaml 文件。如果 '' | 建仓的时候除了 spec 文件和源码,一定要包含一个 yaml 文件。如果 '' | ||
| - | <code yaml> | + | <file yaml kweathercore.yaml> |
| version_control: | version_control: | ||
| src_repo: KDE/ | src_repo: KDE/ | ||
| tag_prefix: " | tag_prefix: " | ||
| separator: " | separator: " | ||
| - | </code> | + | </file> |
| ===== upstream 源码包名字跟仓内不一样 ===== | ===== upstream 源码包名字跟仓内不一样 ===== | ||
| Line 40: | Line 40: | ||
| </ | </ | ||
| - | ===== KDE 系列包 | + | ===== cmake 宏 ===== |
| - | 目前有宏了,之前没有宏的话需要这样: | + | Update(2024-11-11): |
| - | <code> | + | 目前有宏了,之前没有宏的话遇到 KDE 系列包的时候需要这样: |
| + | |||
| + | <file spec example.spec> | ||
| %build | %build | ||
| mkdir %{_target_platform} | mkdir %{_target_platform} | ||
| Line 54: | Line 56: | ||
| %install | %install | ||
| make install/ | make install/ | ||
| - | </code> | + | </file> |
| + | 或者遇到 ROCm 系列包的时候需要这样: | ||
| + | |||
| + | <file spec example2.spec> | ||
| + | pushd amd/hipcc | ||
| + | mkdir -p %{_target_platform} | ||
| + | pushd %{_target_platform} | ||
| + | %cmake -DHIPCC_BACKWARD_COMPATIBILITY=OFF .. | ||
| + | popd | ||
| + | cmake --build %{_target_platform} %{? | ||
| + | popd | ||
| + | </ | ||
| ===== 单 part 执行 ===== | ===== 单 part 执行 ===== | ||
| Line 78: | Line 91: | ||
| For all: | For all: | ||
| rpmbuild -ba --define " | rpmbuild -ba --define " | ||
| + | </ | ||
| + | |||
| + | ==== 安装单 part 执行 ==== | ||
| + | |||
| + | 参考[[这个 bugzilla|https:// | ||
| + | |||
| + | <code bash> | ||
| + | # rpm -ivh chromedriver-119.0.6045.159-1.oe2309.riscv64.rpm chromium-119.0.6045.159-1.oe2309.riscv64.rpm chromium-common-119.0.6045.159-1.oe2309.riscv64.rpm | ||
| + | error: Failed dependencies: | ||
| + | rpmlib(ShortCircuited) <= 4.9.0-1 is needed by chromedriver-119.0.6045.159-1.oe2309.riscv64 | ||
| + | rpmlib(ShortCircuited) <= 4.9.0-1 is needed by chromium-119.0.6045.159-1.oe2309.riscv64 | ||
| + | rpmlib(ShortCircuited) <= 4.9.0-1 is needed by chromium-common-119.0.6045.159-1.oe2309.riscv64 | ||
| + | # rpm -ivh chromedriver-119.0.6045.159-1.oe2309.riscv64.rpm chromium-119.0.6045.159-1.oe2309.riscv64.rpm chromium-common-119.0.6045.159-1.oe2309.riscv64.rpm --nodeps | ||
| + | Verifying... | ||
| + | Preparing... | ||
| + | Updating / installing... | ||
| + | | ||
| + | | ||
| + | | ||
| </ | </ | ||
| Line 99: | Line 131: | ||
| ===== bcond with & without ===== | ===== bcond with & without ===== | ||
| - | openEuler 内没有 " | + | <del>openEuler 内没有 " |
| 在 RPM spec 文件中," | 在 RPM spec 文件中," | ||
| Line 105: | Line 137: | ||
| 以下有一个例子: | 以下有一个例子: | ||
| - | <code> | + | <file spec example.spec> |
| # 默认没有 cuda | # 默认没有 cuda | ||
| %bcond_without cuda | %bcond_without cuda | ||
| Line 121: | Line 153: | ||
| BuildRequires: | BuildRequires: | ||
| %endif | %endif | ||
| - | </code> | + | </file> |
| + | ===== expand macro ===== | ||
| + | |||
| + | <file spec example.spec> | ||
| + | %global common_description %{expand: | ||
| + | This package provides a set of C++ libraries for multimedia streaming, using | ||
| + | using open standard protocols (RTP/RTCP, RTSP, SIP). These libraries can be | ||
| + | used to build streaming applications. | ||
| + | |||
| + | The libraries can also be used to stream, receive, and process MPEG, H.263+ or | ||
| + | JPEG video, and several audio codecs. They can easily be extended to support | ||
| + | additional (audio and/or video) codecs, and can also be used to build basic | ||
| + | RTSP or SIP clients and servers, and have been used to add streaming support to | ||
| + | existing media player applications.} | ||
| + | |||
| + | %description | ||
| + | </ | ||
| + | |||
| + | ===== 碰到 noarch 怎么办 ===== | ||
| + | |||
| + | 如果遇到 " | ||
| + | |||
| + | 在包为 noarch 的情况下," | ||
| + | |||
| + | <file spec example.spec> | ||
| + | BuildArch: noarch | ||
| + | %if " | ||
| + | echo "Do Something" | ||
| + | %endif | ||
| + | </ | ||
| + | |||
| + | ===== 碰到的一些乱七八糟的 ===== | ||
| + | |||
| + | ==== 指定 BuildRoot? ==== | ||
| + | |||
| + | '' | ||
| + | |||
| + | 在 mousepad 的 spec 文件里看到了这行。其中,最后的 '' | ||
| + | |||
| + | ==== 如何 patch golang 某个 package? ==== | ||
| + | |||
| + | 在用到 Golang 运行时的相关包看到了龙芯相关的更改: | ||
| + | |||
| + | < | ||
| + | %ifarch loongarch64 | ||
| + | sed 's/go 1.10/go 1.21/ | ||
| + | export GOSUMDB=" | ||
| + | export GOPROXY=" | ||
| + | go get -d golang.org/ | ||
| + | go mod tidy | ||
| + | go mod download | ||
| + | go mod vendor | ||
| + | %endif | ||
| + | </ | ||