From: Vitaly Lipatov <lav@altlinux.ru> To: ALT Linux Team development discussions <devel@lists.altlinux.org> Subject: [devel] Условная сборка для бранчей Date: Wed, 22 Jun 2022 19:45:51 +0300 Message-ID: <e02ab5b6afe3e87450e65932ff949345@altlinux.ru> (raw) Не так давно по нашим меркам Evgeniy Korneechev понял вопрос об условных выражениях для спека, позволяющих выполнять сборку так или иначе в зависимости от бранча: https://lore.altlinux.org/devel/2014649546.83455.1605607333283.JavaMail.zimbra@remotesystems.ru/ Я тогда ответил, что видел бы это в виде возможности управлять сборкой в зависимости от присутствующих в бранче фич: https://lore.altlinux.org/devel/9d1b4812-0e3d-f24e-d877-0b7e79a403e7@ya.ru/ Прошло время, я попробовал использовать это решение в нескольких проектах. Собственно пакет, который надо добавить: https://packages.altlinux.org/ru/sisyphus/srpms/rpm-macros-features/ Пишем в спеке BuildRequires(pre): rpm-macros-features и далее, например %if_feature vulkan BuildRequires: libvulkan-devel %endif или с указанием версии %if_feature icu 6.5 ... %endif На данный момент для Сизифа поддерживается следующее: %feature_qt5 5.15 %feature_qt5_webengine 1 %feature_qt5_webkit 1 %feature_vulkan 1 %feature_vkd3d 1.2 %feature_faudio 1 %feature_opencl 1 %feature_sip5 1 %feature_ffmpeg 1 %feature_icu 6.9 %feature_pcap 1.9.1 %feature_llvm 11.0 %feature_unwind 1.5.0 На данный момент для Сизифа реальное использование (git grep if_feature по https://github.com/altlinux/specs) выглядит так: d/dotnet-runtime-6.0/dotnet-runtime.spec:%if_feature unwind 1.5 n/node/node.spec:%if_feature icu %libicu_abi w/wine-vanilla/wine-vanilla.spec:%if_feature llvm 11.0 w/wine-vanilla/wine-vanilla.spec:%if_feature vulkan w/wine-vanilla/wine-vanilla.spec:%if_feature pcap 1.2.1 -- С уважением, Виталий Липатов, ALT Linux Team
next reply other threads:[~2022-06-22 16:45 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-22 16:45 Vitaly Lipatov [this message] 2022-06-23 17:48 ` Michael Shigorin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=e02ab5b6afe3e87450e65932ff949345@altlinux.ru \ --to=lav@altlinux.ru \ --cc=devel@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git