rpm宏

/usr/lib/rpm/macros                rpm-4.8.0

/usr/lib/rpm/%{_target}/macros      rpm-4.8.0

/usr/lib/rpm/redhat/macros  redhat-rpm-config-9.0.3

/etc/rpm/macros.*   centos-release

[/usr/lib/rpm/macros]

# ---- per-platform macros.

#   Macros that are specific to an individual platform. The values here

#   will be used if the per-platform macro file does not exist..

%_arch          x86_64

%_build_arch    x86_64

%_vendor        redhat

%_os            linux

%_gnu           -gnu

%_target_platform   %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}

# ---- config.guess platform macros.

#   Macro(s) similar to the tokens used by configure.

%_host          x86_64-redhat-linux-gnu

%_host_alias    x86_64-redhat-linux-gnu%{nil}

%_host_cpu      x86_64

%_host_vendor   redhat

%_host_os       linux

%_build         %{_host}

%_build_alias   %{_host_alias}

%_build_cpu     %{_host_cpu}

%_build_vendor  %{_host_vendor}

%_build_os      %{_host_os}

%_target        %{_host}

%_target_alias  %{_host_alias}

%_target_cpu    %{_host_cpu}

%_target_vendor %{_host_vendor}

%_target_os     %{_host_os}

[/usr/lib/rpm/platform/x86_64-linux/macros]

%_arch           x86_64

%_vendor         redhat

%_os             linux

%_gnu               -gnu

%_target_platform   %{_target_cpu}-%{_vendor}-%{_target_os}

%optflags           -O2 -g

%__isa_name         x86

%__isa_bits         64

%__isa              %{__isa_name}-%{__isa_bits}

[/usr/lib/rpm/platform/noarch-linux/macros]

%_arch           noarch

%_vendor         redhat

%_os             linux

%_gnu               -gnu

%_target_platform   %{_target_cpu}-%{_vendor}-%{_target_os}

[/usr/lib/rpm/redhat/macros]

%_vendor        redhat

%_os            linux

%_target_platform   %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}

【Specifying target triplets】

Autoconf-generated configure scripts can make decisions based on a canonical name for the system type, or target triplet, which has the form: ‘cpu-vendor-os’, where os can be ‘system’ or ‘kernel-system’

configure can  guess the canonical name for the type of system it‘s running on. To do so it runs a script called config.guess, which infers the name using the uname command or symbols predefined by the C preprocessor.

Alternately, the user can specify the system type with command line arguments to configure (see System Type. Doing so is necessary when cross-compiling. In the most complex case of cross-compiling, three system types are involved. The options to specify them are:

--build=build-type

the type of system on which the package is being configured and compiled. It defaults to the result of running config.guess.

--host=host-type

the type of system on which the package runs. By default it is the same as the build machine. Specifying it enables the cross-compilation mode.

--target=target-type

the type of system for which any compiler tools in the package produce code (rarely needed). By default, it is the same as host.

时间: 2024-08-03 23:25:59

rpm宏的相关文章

RPM安装包-Spec文件参数详解与示例分析

spec文件是整个RPM包建立过程的中心,它的作用就如同编译程序时的Makefile文件. 1.Spec文件参数 spec文件包含建立一个RPM包必需的信息,包括哪些文件是包的一部分以及它们安装在哪个目录下.这个文件一般分为如下的几节: (1) Preamle(序言) 序言包含用户请求包的信息时所显示的内容.它可以包含包的功能描述.包的软件版本.版权信息和所属的包组等.Summary 是一行关于该软件包的描述,Name 是该软件包的基名,Version 是该软件的版本号,Release 是 RP

RPM包快速构建教程

rpm打包需要特定的目录及结构.查看rpm打包目录 测试在CentOS6.3 rpm打包需要特定的目录及结构.查看rpm打包目录 测试在CentOS6.3 [[email protected] ~]#  rpm --showrc|grep _topdir -14: _builddir  %{_topdir}/BUILD -14: _buildrootdir      %{_topdir}/BUILDROOT -14: _rpmdir    %{_topdir}/RPMS -14: _source

使用spec文件语法创建一个rpm

How to create an RPM package/zh-hk < How to create an RPM package 此页面包含 Packaging:ScriptletSnippets 的 zh_CN 翻译,由于不具有 ScriptletSnippets 的编辑权限,故在此保存翻译. Contents [hide] 1 RPM 打包脚本综述 2 默认 Shell 3 语法 4 脚本片段命令 5 编写脚本片段 5.1 在脚本片段间保存状态 5.2 Macros 5.3 Trigger

用法: rpm

用法: rpm [选项...] 查询/验证软件包选项:  -a, --all                        查询/验证所有软件包  -f, --file                       查询/验证文件属于的软件包  -g, --group                      查询/验证组中的软件包  -p, --package                    查询/验证一个软件包  --pkgid                          quer

制作rpm包

生产环境配置一样,每次都需要重新编译软件包,太费时间了,制作成rpm包,搞好依赖,瞬间搞定 这里使用rpmbuild来制作rpm包 rpmbuild默认工作路径由%_topdir的宏变量来定义,这个变量在/usr/lib/rpm/macros里的定义.也可使用rpmbuild命令查 rpmbuild --showrc |grep _topdir 结果如下: -14: _builddir %{_topdir}/BUILD-14: _buildrootdir %{_topdir}/BUILDROOT

linux之使用rpmbuild打rpm包

linux之使用rpmbuild打rpm包 前言: 已从事linux运维工作数年,感觉自己还是个小菜鸟,没有大神那么的钻研的精神.只是单纯热爱,喜欢对着黑色的屏幕敲击命令,喜欢这种感觉.为什么要做RPM包呢?因为之前公司使用的是开源软件环境,nginx,tomcat,java,等等等等,安装时流程:编译->标准化目录->标准化参数->部署代码.这样纯手操作的话需要一套部署文档,当然根据个人理解和个人功力的不同,部署出来效果都千奇百怪. 所以通过一个星期的学习,大概掌握了写spec,并且总

rpm和yum的使用,程序包编译安装以及编译apache过程中出现的问题

一.rpm包管理 用法: rpm [选项...] 查询/验证软件包选项: -a, --all                        查询/验证所有软件包 -f, --file                       查询/验证文件属于的软件包 -g, --group                      查询/验证组中的软件包 -p, --package                    查询/验证一个软件包 --pkgid                          

PostgreSQL与RPM

如何查看使用PostgreSQL的RPM包安装后的文件目录及相关路径(PostgreSQLRPM的spec文件已经帮我们创建好了postgres用户及postgres组). 查看RPM文档信息:/usr/share/doc/rpm-4.11.1 RPM数据库文件:file /var/lib/rpm/* |grep Berkeley [[email protected] soft_bak]# rpm -qpl postgresql94-9.4.5-1PGDG.rhel7.x86_64.rpm /u

rpm包制作(一)

rpm介绍 rpm的全称是RedhatPackage Manager,常见的使用rpm软件包的系统主要有Fedora.CentOS.openSUSE.SUSE企业版.PCLinuxOS等.使用deb软件包后缀的类Debian系统最常见的有Debian.Ubuntu.Finnix等. 从软件运行的结构来说,一个软件主要可以分为三个部分:可执行程序.配置文件和动态库.当然还有可能会有相关文档.手册.供二次开发用的头文件以及一些示例程序等等.可执行文件是必须的,其他部分都是可选的. 制作rpm软件包的