rpm展开macro
关于在rpm中使用macro的记录。使用docker进行测试:
$ docker run -it centos:7 sh
$ yum install wget rpmdevtools
- https://stackoverflow.com/questions/3634650/can-i-use-rpm-to-expand-the-macros-in-a-specfile
- How to Create RPM for Your Own Script in CentOS/RedHat - TecAdmin
$ wget http://pkgs.devel.redhat.com/cgit/rpms/curl/plain/curl.spec?h=jb-cs-httpd24-37-rhel-7
$ mv curl.spec\?h\=jb-cs-httpd24-37-rhel-7 curl.spec
在rhel6
下没有rpmspec
,用这个命令:
$ rpm --eval '%{_prefix}'
/usr
$ rpm --eval '%global _configure configure'
$ yum install yum-utils
RHEL7当中的rpm新特性:
关于rpm的macro: