RPMMacrosDescription: различия между версиями

Материал из ALT Linux Wiki
м (→‎Cписок макросов: "for" and "in" were highlighted for no good reason in apt's output)
(Обновлён список rpm-[bm].* пакетов за 8 лет)
 
(не показано 8 промежуточных версий 4 участников)
Строка 3: Строка 3:


=== Cписок макросов ===
=== Cписок макросов ===
На данный момент (02.12.2009) список пакетов таков:
На данный момент (16.11.2017) список пакетов таков:


<pre>
<pre>
$ apt-cache search rpm | grep ^rpm-[a-z] | sort -n | head -n -2
% apt-cache search rpm | grep '^rpm-[bm]' | sort -n
rpm-build-apache2 - Набор утилит для автоматической Web серверов и приложений 
rpm-build-apache2 - RPM helper to rebuild Web servers and apps packages
rpm-build-apache - Набор утилит для автоматической Web серверов и приложений   
rpm-build-apache - RPM helper to rebuild Web servers and apps packages
rpm-build-browser-plugins - Netscape Gecko Plug-in API common packaging files  
rpm-build-browser-plugins - Netscape Gecko Plug-in API common packaging files
rpm-build-buzztard - RPM macros for buzztard build                            
rpm-build-buzztard - RPM macros for buzztard build
rpm-build-compat - ALT Linux compatibility and extensions in rpm build         
rpm-build-compat - ALT Linux compatibility macros for backport purposes
rpm-build-compiz - RPM macros for sawfish-related packages                     
rpm-build-docs-experimental - RPM helper macros to rebuild documentation packages
rpm-build-docs-experimental - Набор утилит и макросов для автоматической сборки документации
rpm-build-docs - RPM helper macros to rebuild documentation packages
rpm-build-docs - Набор утилит и макросов для автоматической сборки документации           
rpm-build-erlang - RPM helper scripts to calculate Erlang dependencies
rpm-build-erlang - RPM helper scripts to calculate Erlang dependencies                    
rpm-build-firefox - RPM helper macros to rebuild firefox packages
rpm-build-firefox - RPM helper macros to rebuild firefox packages                          
rpm-build-fonts - RPM helper scripts for building font packages
rpm-build-fonts - RPM helper scripts for build fonts packages                              
rpm-build-fpc - RPM helpers for Free Pascal packages
rpm-build-fpc - RPM helpers for Free Pascal packages                                      
rpm-build-gir - RPM helper macros and dependency utils to build GObject Introspection packages
rpm-build-gmpc - RPM macros for building GMPC plugins                                      
rpm-build-gmpc - RPM macros for building GMPC plugins
rpm-build-gnome - RPM macros and helper scripts for GNOME packages building                
rpm-build-gnat - Files shared by Ada libraries
rpm-build-gnome - RPM macros and helper scripts for GNOME packages building
rpm-build-golang - RPM helper macros to rebuild GO packages
rpm-build-guestfs - RPM helper post script for build guestfs appliance
rpm-build-haskell - RPM helpers to rebuild Haskell packages
rpm-build-haskell - RPM helpers to rebuild Haskell packages
rpm-build-java - RPM helper macros to build Java packages
rpm-build-intro - New macros for ALT Linux rpm build
rpm-build-java-osgi - RPM build helpers for Java packages with OSGi dependencies
rpm-build-java - RPM build helpers for Java packages
rpm-build-kernel - RPM macros to build kernel packages
rpm-build-kernel - RPM macros to build kernel packages
rpm-build-kf5 - Set of RPM macros for packaging KF5-based applications
rpm-build-licenses - RPM macros for well-known licenses
rpm-build-licenses - RPM macros for well-known licenses
rpm-build-linux-ha - RPM macros for Linux-HA project apps
rpm-build-linux-ha - RPM macros for Linux-HA project apps
rpm-build-lmms - Helper package for creation of build dependences lmms
rpm-build-lmms - Helper package for creation of build dependences lmms
rpm-build-mediawiki - RPM helper scripts for packaging mediawiki extensions
rpm-build-mingw32 - MinGW RPM helper macros
rpm-build-mingw32 - MinGW RPM helper macros
rpm-build-mingw64 - MinGW RPM build helper files and macros
rpm-build-mono - RPM helper macros and dependency utils to build Mono packages
rpm-build-mono - RPM helper macros and dependency utils to build Mono packages
rpm-build-moodle - RPM helper macros and dependency utils to build Mooodle packages
rpm-build-mozilla.org - RPM helpers to build Mozilla.org packages
rpm-build-mozilla.org - RPM helpers to build Mozilla.org packages
rpm-build-nasty - Adjust the RPM build process nice level to zero
rpm-build-NetSDS - RPM helper macros to rebuild NetSDS packages
rpm-build-NetSDS - RPM helper macros to rebuild NetSDS packages
rpm-build-nodejs - RPM helper scripts for building nodejs packages
rpm-build-ocaml - RPM helpers to rebuild OCaml packages
rpm-build-ocaml - RPM helpers to rebuild OCaml packages
rpm-build-palemoon - RPM helper macros to rebuild palemoon packages
rpm-build-pear - RPM helper scripts for build PEAR packages
rpm-build-pear - RPM helper scripts for build PEAR packages
rpm-build-pecl - RPM helper scripts for build PECL packages
rpm-build-pecl - RPM helper scripts for build PECL packages
rpm-build-perl6 - RPM macroses for Rakudo Perl 6
rpm-build-perl - RPM helper scripts to calculate Perl dependencies
rpm-build-perl - RPM helper scripts to calculate Perl dependencies
rpm-build-php5 - RPM helper macros to rebuild PHP5 packages
rpm-build-php5 - RPM helper macros to rebuild PHP5 packages
rpm-build-php7 - RPM helper macros to rebuild PHP packages
rpm-build-php7-version - RPM helper macros to rebuild PHP7 packages
rpm-build-php-version - RPM helper macros to rebuild PHP5 packages
rpm-build-python3 - RPM helper macros to rebuild python3 packages
rpm-build-python - RPM helper macros to rebuild python packages
rpm-build-python - RPM helper macros to rebuild python packages
rpm-build-python-tools - diagnostic tools
rpm-build-qml - RPM helper macros to rebuild QML packages
rpm-build-rpm-eval - Скрипт раскрывающий макросы в файлах
rpm-build-rpm-eval - The script disclosure macros in files
rpm-build-ruby - RPM helper scripts to calculate Ruby dependencies
rpm-build-ruby - RPM helper scripts to calculate Ruby dependencies
rpm-build-sawfish - RPM macros for sawfish-related packages
rpm-build-sawfish - RPM macros for sawfish-related packages
rpm-build - Scripts and executable programs used to build packages
rpm-build-seamonkey - RPM helper macros to rebuild seamonkey packages
rpm-build-seamonkey - RPM helper macros to rebuild seamonkey packages
rpm-build-sunbird - RPM helper macros to rebuild sunbird packages
rpm-build-suse-compat - Compatibility environment to build SuSE rpms
rpm-build-tcl - RPM helpers to use with Tcl scripts
rpm-build-tcl - RPM helpers to use with Tcl scripts
rpm-build-texmf - RPM helper macros to rebuild TeX packages
rpm-build-texmf - RPM helper macros to rebuild TeX packages
rpm-build-thunderbird - RPM helper macros to rebuild thunderbird packages
rpm-build-thunderbird - RPM helper macros to rebuild thunderbird packages
rpm-build-vhosts-filesystem - RPM макросы сборки для пакетов, обслуживающих разделяемый контент
rpm-build-ubt - Universal Branch Tag macros
rpm-build-vala - RPM helper macros and dependency utils to build Vala packages
rpm-build-vhosts-filesystem - RPM macroses for build packages, serving shared content
rpm-build-vim - RPM macros needed to build additional VIM plugin packages
rpm-build-vim - RPM macros needed to build additional VIM plugin packages
rpm-build-webserver-common - Набор утилит для автоматической Web серверов и приложений
rpm-build-webserver-common - RPM helper to rebuild Web servers and apps packages
rpm-build-wlskins - RPM helper macros to build winamplike-skins collections
rpm-build-wlskins - RPM helper macros to build winamplike-skins collections
rpm-build-xdg - RPM macros for XDG Base Directory Specification and more
rpm-build-xdg - RPM macros for XDG Base Directory Specification and more
rpm-build-xfce4 - : Макросы для удобной сборки Xfce
rpm-build-xen - Arch-specific requirement to build XEN
rpm-build-xfce4 - Macros for comfort build xfce4 and plugins
rpm-build-xscreensaver - A screen saver and locker for the X window system - RPM macros
rpm-build-xscreensaver - A screen saver and locker for the X window system - RPM macros
rpm-build - Файлы, необходимые для установки SRPM-пакетов и сборки RPM-пакетов
rpm-macros-alterator - Set of RPM macros for packaging alterator-based applications
rpm-macros-alterator - Set of RPM macros for packaging alterator-based applications
rpm-macros-alternatives - Set of RPM macros for packaging alternatives-based applications
rpm-macros-alternatives - Set of RPM macros for packaging alternatives-based applications
rpm-macros-apache2-compat - RPM макросы для веб-сервера Apache2
rpm-macros-apache2-compat - RPM macros to Apache2 Web server
rpm-macros-apache2 - RPM макросы для веб-сервера Apache2
rpm-macros-apache2 - RPM macros to Apache2 Web server
rpm-macros-apache - RPM макросы для веб-сервера Apache
rpm-macros-apache - RPM macros to Apache Web server
rpm-macros-branch - RPM макросы поддержки бранчей
rpm-macros-branch - RPM macros for support branches
rpm-macros-branding - RPM helper macros to build branding packages
rpm-macros-cmake - Set of RPM macros for packaging applications that use cmake
rpm-macros-cmake - Set of RPM macros for packaging applications that use cmake
rpm-macros-daemontools - Set of RPM macros for packaging daemontools-based applications
rpm-macros-color - Set of RPM macros for packaging color-filesystem-based applications
rpm-macros-condstopstart - Rpm macros for condstopstart
rpm-macros-daemontools - Set of RPM macros for packaging daemontools-encore-based applications
rpm-macros-dotnet - RPM macros for build dotnet packages
rpm-macros-emacs - Set of RPM macros for packaging emacs-devel-based applications
rpm-macros-emacs - Set of RPM macros for packaging emacs-devel-based applications
rpm-macros-erlang - RPM helper macros to rebuild erlang packages
rpm-macros-erlang - RPM helper macros to rebuild erlang packages
rpm-macros-fedora-compat - Fedora compatibility set of macro
rpm-macros-fillup - Set of RPM macros for packaging fillup-based applications
rpm-macros-fillup - Set of RPM macros for packaging fillup-based applications
rpm-macros-fontpackages - Fedora compatible set of font macros
rpm-macros-fonts - RPM helper macros for building font packages
rpm-macros-ghc7.6.1-common - Set of RPM macros for packaging ghc7.6.1-based applications
rpm-macros-girar-parallel-build - RPM macros for automatic parallel build on girar server
rpm-macros-gnat - Set of RPM macros for packaging GNAT applications
rpm-macros-info-install - Set of RPM macros for packaging texinfo files
rpm-macros-info-install - Set of RPM macros for packaging texinfo files
rpm-macros-intro-conflicts - Conflicts macros for ALT Linux rpm build
rpm-macros-jabber - Set of RPM macros for packaging Jabber servers and components
rpm-macros-jabber - Set of RPM macros for packaging Jabber servers and components
rpm-macros-java - RPM helper macros to build Java packages
rpm-macros-javascript - RPM helper scripts for packaging javascipt libraries
rpm-macros-kde-common-devel - Set of RPM macros for packaging kde-common-devel-based applications
rpm-macros-ladspa_sdk - Set of RPM macros for packaging ladspa_sdk-based applications
rpm-macros-lua - RPM helper macros to build Lua packages
rpm-macros-mageia-compat - Mageia compatibility set of macro
rpm-macros-make - Make helper macros to rebuild packages
rpm-macros-mingw32 - MinGW RPM helper macros
rpm-macros-mingw32 - MinGW RPM helper macros
rpm-macros-moodle-lang-cronbuild-common - Set of RPM macros for packaging moodle-lang-cronbuild-common-based applications
rpm-macros-moodle - RPM helper macros and dependency utils to build Mooodle packages
rpm-macros-mpi-selector - Set of RPM macros for packaging mpi-selector-based applications
rpm-macros-mpi-selector - Set of RPM macros for packaging mpi-selector-based applications
rpm-macros-ninja-build - Helper macros for building RPM packages with ninja-build
rpm-macros-nodejs - RPM helper macros for building nodejs packages
rpm-macros-pam0 - Set of RPM macros for packaging PAM modules
rpm-macros-qt3 - Set of RPM macros for packaging qt3-based applications
rpm-macros-qt4 - Set of RPM macros for packaging qt4-based applications
rpm-macros-qt4 - Set of RPM macros for packaging qt4-based applications
rpm-macros-rpm-eval - RPM макросы для применения rpm-eval.sh
rpm-macros-qt5 - Set of RPM macros for packaging Qt5-based applications
rpm-macros-vhosts-filesystem - RPM макросы для пакетов, обслуживающих разделяемый контент
rpm-macros-reponame - rpm macro for repository detect
rpm-macros-webserver-cgi-bin-control - RPM макросы для сборки пакетов веб-серверов и приложений
rpm-macros-rpm-eval - RPM macros for use rpm-eval.sh
rpm-macros-webserver-common - RPM макросы для сборки пакетов веб-серверов и приложений
rpm-macros-ruby - rpm macros for Ruby packages
rpm-macros-sphinx3 - RPM macros for build with Sphinx (Python 3)
rpm-macros-sphinx - RPM macros for build with Sphinx
rpm-macros-suse-compat - SuSE compatibility macros
rpm-macros-trinity - RPM helper macros to rebuild TDE packages
rpm-macros-tts - RPM macros for speech synthesis engines
rpm-macros-ubt - Base set of RPM macros for packaging Universal Branch Tag
rpm-macros-uefi - A set of RPM macros to help package UEFI related things
rpm-macros-vhosts-filesystem - RPM macroses for packages, serving shared content
rpm-macros-web-assets - RPM macros for Web Assets packaging
rpm-macros-webobjects - RPM macros to WebObjects libraries
rpm-macros-webserver-cgi-bin-control - RPM macros to rebuild Web servers and apps packages
rpm-macros-webserver-common - RPM macros to rebuild Web servers and apps packages
rpm-macros-xmms - Set of RPM macros for packaging xmms-based applications
rpm-macros-xmms - Set of RPM macros for packaging xmms-based applications
$
</pre>
</pre>


Строка 83: Строка 136:
Для использования данных макросов, необходимо добавить в spec строчку:
Для использования данных макросов, необходимо добавить в spec строчку:


<pre>BuildRequires(pre): имяпакетасмакросами</pre>
<pre>BuildRequires(pre): имя-пакета-с-макросами</pre>


Например<ref>[http://lists.altlinux.org/pipermail/sisyphus/2009-September/341823.html wRAR об определении макроса]</ref><ref>[http://lists.altlinux.org/pipermail/devel/2009-November/177411.html wRAR вносит изменения в макрос %cmake]</ref>:
Например<ref>[http://lists.altlinux.org/pipermail/sisyphus/2009-September/341823.html wrar@ об определении макроса]</ref><ref>[http://lists.altlinux.org/pipermail/devel/2009-November/177411.html wrar@ вносит изменения в макрос %cmake]</ref>:
<pre>
<pre>
BuildRequires(pre): rpm-build-compat
BuildRequires(pre): rpm-build-java
</pre>
</pre>


Cписки макросов, располагаются по следующим адресам:
Cписки макросов находятся в следующих директориях:


{{path|/etc/rpm/macros.d/}} согласно [http://www.altlinux.org/RPMMacrosPackagingPolicy/ RPM Macros Packaging Policy], должна устареть
{{path|/etc/rpm/macros.d/}} согласно [http://www.altlinux.org/RPMMacrosPackagingPolicy RPM Macros Packaging Policy], должна устареть


{{path|/usr/lib/rpm/macros.d/}}
{{path|/usr/lib/rpm/macros.d/}}


Поглядеть, во что раскрывается конкретный макрос, можно так:
Поглядеть, во что раскрывается конкретный макрос, можно так:
<pre>rpm --eval %имямакроса</pre>
<pre>rpm --eval %имя_макроса</pre>
или
<pre>rpm -E %имя_макроса</pre>
Например, нам надо узнать, во что раскрывается макрос %java_dir:
Например, нам надо узнать, во что раскрывается макрос %java_dir:
<pre>
<pre>
Строка 105: Строка 160:
</pre>
</pre>


 
{|class="standard"
 
!Макрос
!Замена
!Описание
|-
!colspan="3"| Макросы rpm-build-compat
|-
|%make_install_std %makeinstall_std
|make INSTALL="/bin/install -p" install DESTDIR=/root/tmp/%{name}-buildroot
|Стандартная директория для инсталляции после сборки пакета.
|-
|%kde_docdir %_kdedocdir
|%_docdir/HTML
|Директория для установки документации KDE. (/usr/share/doc/HTML/)
|-
|%gtk_docdir %_gtkdocdir
|/usr/share/gtk-doc/html
|Директория для установки документации Gtk.
|-
|%java_dir %_javadir
|/usr/share/java
|Директория для некоторых jar файлов.
|-
|%java_docdir %_javadocdir
|/usr/share/javadoc
|
|-
|%_rpmmacrosdir
|/usr/lib/rpm/macros.d
|Директория для установки сторонних макросов
|-
|%rpmcflags
|%optflags
|Как правило -pipe -Wall -O2 -march=вашпроцессор
|-
|%rpmcxxflags
|%optflags
|Как правило -pipe -Wall -O2 -march=вашпроцессор
|-
|%_aclocaldir
|/usr/share/aclocal
|Директория для m4 файлов.
|-
|%fix_permissions
|find ./ -type d -print0 | xargs -0 chmod 0775  find ./ -type f -print0 | xargs -0 chmod 0664
|Исправление доступа для директорий и файлов, начиная с текущего каталога
|-
|%remove_repo_info
|find ./ -type d -name .svn -print0 | xargs -0 --no-run-if-empty rm -rf {} ; find ./ -type d -name CVS -print0 | xargs -0 --no-run-if-empty rm -rf {} ;
|Удаление служебной информации о репозиториях cvs и svn
|-
|%_locksubsysdir
|/var/lock/subsys
|
|-
|%start_service()
|<code>[ -z "$DURING_INSTALL" ] && [ "$1" = "1" ] && /etc/rc.d/init.d/%{1} start</code>
|Запуск установленного пакета как сервиса
|-
|%_sysconfigdir
|%_sysconfdir/sysconfig
|Расположение конфигурационных файлов для сервисов
|-
|%groupadd
|/usr/sbin/groupadd -r -f
|Добавление cистемной группы (группы в которых gid < 499), даже если она существовала до этого
|-
|%useradd
|/usr/sbin/useradd -r
|Добавление системного пользователя
|-
|}


== Ссылки ==
== Ссылки ==

Текущая версия от 17:28, 16 ноября 2017

Макросы RPM

Данная страница содержит описания макросов, специфичных для ALT Linux.

Cписок макросов

На данный момент (16.11.2017) список пакетов таков:

% apt-cache search rpm | grep '^rpm-[bm]' | sort -n
rpm-build-apache2 - RPM helper to rebuild Web servers and apps packages
rpm-build-apache - RPM helper to rebuild Web servers and apps packages
rpm-build-browser-plugins - Netscape Gecko Plug-in API common packaging files
rpm-build-buzztard - RPM macros for buzztard build
rpm-build-compat - ALT Linux compatibility macros for backport purposes
rpm-build-docs-experimental - RPM helper macros to rebuild documentation packages
rpm-build-docs - RPM helper macros to rebuild documentation packages
rpm-build-erlang - RPM helper scripts to calculate Erlang dependencies
rpm-build-firefox - RPM helper macros to rebuild firefox packages
rpm-build-fonts - RPM helper scripts for building font packages
rpm-build-fpc - RPM helpers for Free Pascal packages
rpm-build-gir - RPM helper macros and dependency utils to build GObject Introspection packages
rpm-build-gmpc - RPM macros for building GMPC plugins
rpm-build-gnat - Files shared by Ada libraries
rpm-build-gnome - RPM macros and helper scripts for GNOME packages building
rpm-build-golang - RPM helper macros to rebuild GO packages
rpm-build-guestfs - RPM helper post script for build guestfs appliance
rpm-build-haskell - RPM helpers to rebuild Haskell packages
rpm-build-intro - New macros for ALT Linux rpm build
rpm-build-java-osgi - RPM build helpers for Java packages with OSGi dependencies
rpm-build-java - RPM build helpers for Java packages
rpm-build-kernel - RPM macros to build kernel packages
rpm-build-kf5 - Set of RPM macros for packaging KF5-based applications
rpm-build-licenses - RPM macros for well-known licenses
rpm-build-linux-ha - RPM macros for Linux-HA project apps
rpm-build-lmms - Helper package for creation of build dependences lmms
rpm-build-mediawiki - RPM helper scripts for packaging mediawiki extensions
rpm-build-mingw32 - MinGW RPM helper macros
rpm-build-mingw64 - MinGW RPM build helper files and macros
rpm-build-mono - RPM helper macros and dependency utils to build Mono packages
rpm-build-mozilla.org - RPM helpers to build Mozilla.org packages
rpm-build-nasty - Adjust the RPM build process nice level to zero
rpm-build-NetSDS - RPM helper macros to rebuild NetSDS packages
rpm-build-nodejs - RPM helper scripts for building nodejs packages
rpm-build-ocaml - RPM helpers to rebuild OCaml packages
rpm-build-palemoon - RPM helper macros to rebuild palemoon packages
rpm-build-pear - RPM helper scripts for build PEAR packages
rpm-build-pecl - RPM helper scripts for build PECL packages
rpm-build-perl6 - RPM macroses for Rakudo Perl 6
rpm-build-perl - RPM helper scripts to calculate Perl dependencies
rpm-build-php5 - RPM helper macros to rebuild PHP5 packages
rpm-build-php7 - RPM helper macros to rebuild PHP packages
rpm-build-php7-version - RPM helper macros to rebuild PHP7 packages
rpm-build-php-version - RPM helper macros to rebuild PHP5 packages
rpm-build-python3 - RPM helper macros to rebuild python3 packages
rpm-build-python - RPM helper macros to rebuild python packages
rpm-build-qml - RPM helper macros to rebuild QML packages
rpm-build-rpm-eval - The script disclosure macros in files
rpm-build-ruby - RPM helper scripts to calculate Ruby dependencies
rpm-build-sawfish - RPM macros for sawfish-related packages
rpm-build - Scripts and executable programs used to build packages
rpm-build-seamonkey - RPM helper macros to rebuild seamonkey packages
rpm-build-suse-compat - Compatibility environment to build SuSE rpms
rpm-build-tcl - RPM helpers to use with Tcl scripts
rpm-build-texmf - RPM helper macros to rebuild TeX packages
rpm-build-thunderbird - RPM helper macros to rebuild thunderbird packages
rpm-build-ubt - Universal Branch Tag macros
rpm-build-vala - RPM helper macros and dependency utils to build Vala packages
rpm-build-vhosts-filesystem - RPM macroses for build packages, serving shared content
rpm-build-vim - RPM macros needed to build additional VIM plugin packages
rpm-build-webserver-common - RPM helper to rebuild Web servers and apps packages
rpm-build-wlskins - RPM helper macros to build winamplike-skins collections
rpm-build-xdg - RPM macros for XDG Base Directory Specification and more
rpm-build-xen - Arch-specific requirement to build XEN
rpm-build-xfce4 - Macros for comfort build xfce4 and plugins
rpm-build-xscreensaver - A screen saver and locker for the X window system - RPM macros
rpm-macros-alterator - Set of RPM macros for packaging alterator-based applications
rpm-macros-alternatives - Set of RPM macros for packaging alternatives-based applications
rpm-macros-apache2-compat - RPM macros to Apache2 Web server
rpm-macros-apache2 - RPM macros to Apache2 Web server
rpm-macros-apache - RPM macros to Apache Web server
rpm-macros-branch - RPM macros for support branches
rpm-macros-branding - RPM helper macros to build branding packages
rpm-macros-cmake - Set of RPM macros for packaging applications that use cmake
rpm-macros-color - Set of RPM macros for packaging color-filesystem-based applications
rpm-macros-condstopstart - Rpm macros for condstopstart
rpm-macros-daemontools - Set of RPM macros for packaging daemontools-encore-based applications
rpm-macros-dotnet - RPM macros for build dotnet packages
rpm-macros-emacs - Set of RPM macros for packaging emacs-devel-based applications
rpm-macros-erlang - RPM helper macros to rebuild erlang packages
rpm-macros-fedora-compat - Fedora compatibility set of macro
rpm-macros-fillup - Set of RPM macros for packaging fillup-based applications
rpm-macros-fontpackages - Fedora compatible set of font macros
rpm-macros-fonts - RPM helper macros for building font packages
rpm-macros-ghc7.6.1-common - Set of RPM macros for packaging ghc7.6.1-based applications
rpm-macros-girar-parallel-build - RPM macros for automatic parallel build on girar server
rpm-macros-gnat - Set of RPM macros for packaging GNAT applications
rpm-macros-info-install - Set of RPM macros for packaging texinfo files
rpm-macros-intro-conflicts - Conflicts macros for ALT Linux rpm build
rpm-macros-jabber - Set of RPM macros for packaging Jabber servers and components
rpm-macros-java - RPM helper macros to build Java packages
rpm-macros-javascript - RPM helper scripts for packaging javascipt libraries
rpm-macros-kde-common-devel - Set of RPM macros for packaging kde-common-devel-based applications
rpm-macros-ladspa_sdk - Set of RPM macros for packaging ladspa_sdk-based applications
rpm-macros-lua - RPM helper macros to build Lua packages
rpm-macros-mageia-compat - Mageia compatibility set of macro
rpm-macros-make - Make helper macros to rebuild packages
rpm-macros-mingw32 - MinGW RPM helper macros
rpm-macros-moodle-lang-cronbuild-common - Set of RPM macros for packaging moodle-lang-cronbuild-common-based applications
rpm-macros-moodle - RPM helper macros and dependency utils to build Mooodle packages
rpm-macros-mpi-selector - Set of RPM macros for packaging mpi-selector-based applications
rpm-macros-ninja-build - Helper macros for building RPM packages with ninja-build
rpm-macros-nodejs - RPM helper macros for building nodejs packages
rpm-macros-pam0 - Set of RPM macros for packaging PAM modules
rpm-macros-qt3 - Set of RPM macros for packaging qt3-based applications
rpm-macros-qt4 - Set of RPM macros for packaging qt4-based applications
rpm-macros-qt5 - Set of RPM macros for packaging Qt5-based applications
rpm-macros-reponame - rpm macro for repository detect
rpm-macros-rpm-eval - RPM macros for use rpm-eval.sh
rpm-macros-ruby - rpm macros for Ruby packages
rpm-macros-sphinx3 - RPM macros for build with Sphinx (Python 3)
rpm-macros-sphinx - RPM macros for build with Sphinx
rpm-macros-suse-compat - SuSE compatibility macros
rpm-macros-trinity - RPM helper macros to rebuild TDE packages
rpm-macros-tts - RPM macros for speech synthesis engines
rpm-macros-ubt - Base set of RPM macros for packaging Universal Branch Tag
rpm-macros-uefi - A set of RPM macros to help package UEFI related things
rpm-macros-vhosts-filesystem - RPM macroses for packages, serving shared content
rpm-macros-web-assets - RPM macros for Web Assets packaging
rpm-macros-webobjects - RPM macros to WebObjects libraries
rpm-macros-webserver-cgi-bin-control - RPM macros to rebuild Web servers and apps packages
rpm-macros-webserver-common - RPM macros to rebuild Web servers and apps packages
rpm-macros-xmms - Set of RPM macros for packaging xmms-based applications

Использование макросов

Для использования данных макросов, необходимо добавить в spec строчку:

BuildRequires(pre): имя-пакета-с-макросами

Например[1][2]:

BuildRequires(pre): rpm-build-java

Cписки макросов находятся в следующих директориях:

/etc/rpm/macros.d/ согласно RPM Macros Packaging Policy, должна устареть

/usr/lib/rpm/macros.d/

Поглядеть, во что раскрывается конкретный макрос, можно так:

rpm --eval %имя_макроса

или

rpm -E %имя_макроса

Например, нам надо узнать, во что раскрывается макрос %java_dir:

$ rpm --eval %java_dir
/usr/share/java
$
Макрос Замена Описание
Макросы rpm-build-compat
%make_install_std %makeinstall_std make INSTALL="/bin/install -p" install DESTDIR=/root/tmp/%{name}-buildroot Стандартная директория для инсталляции после сборки пакета.
%kde_docdir %_kdedocdir %_docdir/HTML Директория для установки документации KDE. (/usr/share/doc/HTML/)
%gtk_docdir %_gtkdocdir /usr/share/gtk-doc/html Директория для установки документации Gtk.
%java_dir %_javadir /usr/share/java Директория для некоторых jar файлов.
%java_docdir %_javadocdir /usr/share/javadoc
%_rpmmacrosdir /usr/lib/rpm/macros.d Директория для установки сторонних макросов
%rpmcflags %optflags Как правило -pipe -Wall -O2 -march=вашпроцессор
%rpmcxxflags %optflags Как правило -pipe -Wall -O2 -march=вашпроцессор
%_aclocaldir /usr/share/aclocal Директория для m4 файлов.
%fix_permissions xargs -0 chmod 0775 find ./ -type f -print0 | xargs -0 chmod 0664 Исправление доступа для директорий и файлов, начиная с текущего каталога
%remove_repo_info xargs -0 --no-run-if-empty rm -rf {} ; find ./ -type d -name CVS -print0 | xargs -0 --no-run-if-empty rm -rf {} ; Удаление служебной информации о репозиториях cvs и svn
%_locksubsysdir /var/lock/subsys
%start_service() [ -z "$DURING_INSTALL" ] && [ "$1" = "1" ] && /etc/rc.d/init.d/%{1} start Запуск установленного пакета как сервиса
%_sysconfigdir %_sysconfdir/sysconfig Расположение конфигурационных файлов для сервисов
%groupadd /usr/sbin/groupadd -r -f Добавление cистемной группы (группы в которых gid < 499), даже если она существовала до этого
%useradd /usr/sbin/useradd -r Добавление системного пользователя

Ссылки