rpmbuild 打软件包简单范例

rpmbuild 打软件包简单范例:

# RPM Spec file for nginx-1.0.5

%define _topdir         /usr/src/redhat         # ##rpmbuild创建的目录
%define _tmppath        %{_topdir}/tmp          ##临时存放目录
%define _prefix         /opt/local/nginx        ##包安装的目录
%define _user           nginx80                 ##指定用户
%define _user_uid       600                     ##用户的权限值
%define _group          nginx80                 ##指定用户组
%define _group_gid      660                     ###用户组的权限
%define _sbin_path      /usr/sbin               ###sbin的路径

%define name      nginx                         ##软件包的名称,后面可使用%{name}的方式引用
%define summary   nginx on port 80              ###软件包的内容概要
%define version   1.0.5                         ##打包的版本
%define release   1                             ##包的序列号
%define license   GPL                           ##软件授权方式,通常就是GPL
%define group     fm/software                   ##软件分组,建议使用标准分组
%define source    nginx-%{version}.tar.gz       ###源包的名字
%define url       http://nginx.net/             ##软件的主页
%define vendor    fm                            ##发行商或打包组织的信息
%define packager  Liutaihua                     ##打包者的信息
%define buildroot %{_tmppath}/%{name}-root      ##安装或编译时使用的“虚拟目录”

Name:      %{name}
Version:   %{version}
Release:   %{release}
Packager:  %{packager}
Vendor:    %{vendor}
License:   %{license}
Summary:   %{summary}
Group:     %{group}
Source:    %{source}
URL:       %{url}
Prefix:    %{_prefix}
Buildroot: %{buildroot}

BuildRequires:  pcre-devel              ###BuildRequires为软件所依赖的软件
BuildRequires:  zlib-devel
BuildRequires:  mhash-devel
BuildRequires:  openssl-devel

Requires: pcre
Requires: zlib
Requires: mhash
Requires: openssl
Requires: bash

%description                            ## 软件的详细说明
nginx port 80 daemon
/opt/local/nginx
nginx80:webdev

%prep                                   ##预处理脚本
%setup -q -n nginx-%{version}           ###把源码包解压并放好,通常是从/usr/src/redhat/SOURCES里的包解压到/usr/src/redhat/BUILD/%{name}-%{version}中

%build                                  ##开始构建包,在/usr/src/redhat/BUILD/%{name}-%{version}目录中进行make的工作
Entering Ex mode.  Type "visual" to go to Normal mode.
:q
[root@puppet SPECS]# cat nginx.spec
# RPM Spec file for nginx-0.7.62

%define _topdir         /usr/src/redhat         # ##rpmbuild创建的目录
%define _tmppath        %{_topdir}/tmp          ##临时存放目录
%define _prefix         /opt/local/nginx        ##包安装的目录
%define _user           nginx80                 ##指定用户
%define _user_uid       600                     ##用户的权限值
%define _group          nginx80                 ##指定用户组
%define _group_gid      660                     ###用户组的权限
%define _sbin_path      /usr/sbin               ###sbin的路径

%define name      nginx                         ##软件包的名称,后面可使用%{name}的方式引用
%define summary   nginx on port 80              ###软件包的内容概要
%define version   1.0.5                         ##打包的版本
%define release   1                             ##包的序列号
%define license   GPL                           ##软件授权方式,通常就是GPL
%define group     fm/software                   ##软件分组,建议使用标准分组
%define source    nginx-%{version}.tar.gz       ###源包的名字
%define url       http://nginx.net/             ##软件的主页
%define vendor    fm                            ##发行商或打包组织的信息
%define packager  Liutaihua                     ##打包者的信息
%define buildroot %{_tmppath}/%{name}-root      ##安装或编译时使用的“虚拟目录”

Name:      %{name}
Version:   %{version}
Release:   %{release}
Packager:  %{packager}
Vendor:    %{vendor}
License:   %{license}
Summary:   %{summary}
Group:     %{group}
Source:    %{source}
URL:       %{url}
Prefix:    %{_prefix}
Buildroot: %{buildroot}

BuildRequires:  pcre-devel              ###BuildRequires为软件所依赖的软件
BuildRequires:  zlib-devel
BuildRequires:  mhash-devel
BuildRequires:  openssl-devel

Requires: pcre
Requires: zlib
Requires: mhash
Requires: openssl
Requires: bash

%description                            ## 软件的详细说明
nginx port 80 daemon
/opt/local/nginx
nginx80:webdev

%prep                                   ##预处理脚本
%setup -q -n nginx-%{version}           ###把源码包解压并放好,通常是从/usr/src/redhat/SOURCES里的包解压到/usr/src/redhat/BUILD/%{name}-%{version}中

%build                                  ##开始构建包,在/usr/src/redhat/BUILD/%{name}-%{version}目录中进行make的工作
./configure --prefix=%{_prefix} --user=%{_user} --group=%{_group} --with-http_stub_status_module --without-select_module --without-poll_module --with-http_realip_module --with-http_sub_module --without-http_userid_module --without-http_geo_module --without-http_memcached_module --without-http_map_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_ssl_module
make

%install                        ###开始把软件安装到虚拟的根目录中,在/usr/src/redhat/BUILD/%{name}-%{version}目录中进行make install的操作。这个很重要,因为如果这里的路径不对的话,则下面%file中寻找      #####文件的时候就会失败
rm -rf %{buildroot}             ###注意区分$RPM_BUILD_ROOT和$RPM_BUILD_DIR:$RPM_BUILD_ROOT是指开头定义的BuildRoot,而$RPM_BUILD_DIR通常就是指/usr/src/redhat/BUILD,其中,前面的才是%file需要
make install DESTDIR=%{buildroot}  ###软件包的安装

%clean                          ###清理临时文件
rm -rf %{buildroot}


%pre                            ###rpm安装前执行的脚本
grep -q ^%{_group}: /etc/group || %{_sbin_path}/groupadd -g %{_group_gid} %{_group}
grep -q ^%{_user}: /etc/passwd ||
        %{_sbin_path}/useradd -g %{_group} -u %{_user_uid} -d %{_prefix} -s /sbin/nologin -M %{_user}


%postun                         ###rpm卸载后执行的脚本
if [ $1 = 0 ]; then
        userdel %{_user} > /dev/null 2>&1 || true
fi

%files                          ###指定包装文件的属性,分别是(mode,owner,group),-表示默认值,对文本文件是0644,可执行文件是0755
%defattr(-,root,root)
%dir %{_prefix}
%dir %{_prefix}/logs
%dir %{_prefix}/sbin
%dir %{_prefix}/sbin/nginx
%dir %{_prefix}/conf
%dir %{_prefix}/conf/fastcgi.conf
%dir %{_prefix}/conf/fastcgi_params.default
%dir %{_prefix}/conf/win-utf
%dir %{_prefix}/conf/koi-utf
%dir %{_prefix}/conf/nginx.conf.default
%dir %{_prefix}/conf/fastcgi.conf.default
%dir %{_prefix}/conf/fastcgi_params
%dir %{_prefix}/conf/koi-win
%dir %{_prefix}/conf/mime.types
%dir %{_prefix}/conf/nginx.conf
%dir %{_prefix}/conf/mime.types.default
%dir %{_prefix}/html
%dir %{_prefix}/html/50x.html
%dir %{_prefix}/html/index.html
%dir %{_prefix}/conf/scgi_params
%dir %{_prefix}/conf/scgi_params.default
%dir %{_prefix}/conf/uwsgi_params
%dir %{_prefix}/conf/uwsgi_params.default

%changelog
* Wed Sep 23 2009 Songbo Li <[email protected]>
- change gid to 601
* Wed Sep 09 2009 Songbo Li <[email protected]>
- Initial fm nginx package
* Wed Sep 09 2009 Songbo Li <[email protected]>
#* Mon Oct 18 2010 Liu taihua  <[email protected]>
- change uid to 600

以上是个简单的打软件包的范例,注意的是:将.tar包编译后更改了文件,需要将该文件打入软件包的话,对编译的包进行打.tar包,作为源包使用。

再给个phpfpm5.3.8软件包的spec文件内容:

# RPM Spec file for PHPfpm v.5.3.8

%define _topdir         /usr/src/redhat
%define _tmppath        %{_topdir}/tmp
%define _prefix         /opt/local/phpfpm5.3.8
%define _user           nginx80
%define _user_uid       600
%define _group          nginx80
%define _group_gid      660
%define _sbin_path      /usr/sbin

%define name      fm-php
%define summary   fm-php
%define version   5.3.8
%define release   1
%define license   GPL
%define group     fm/software
%define source    php-%{version}.tar.gz
%define url       http://php.net/
%define vendor    php
%define packager  Xuchao
%define buildroot %{_tmppath}/%{name}-root

Name:      %{name}
Version:   %{version}
Release:   %{release}
Packager:  %{packager}
Vendor:    %{vendor}
License:   %{license}
Summary:   %{summary}
Group:     %{group}
Source:    %{source}
URL:       %{url}
Prefix:    %{_prefix}
Buildroot: %{buildroot}

AutoReqProv: no

BuildRequires:  openssl-devel
BuildRequires:  libmcrypt-devel
BuildRequires:  libtool-ltdl-devel
BuildRequires:  freetype-devel
BuildRequires:  mhash-devel

Requires: openssl
Requires: bash
Requires: libmcrypt
Requires: freetype
Requires: libtool-ltdl
Requires: mhash

%description
 fm-php
/opt/local/phpfpm5.3.8

%prep
%setup -q -n php-%{version}

%build
./configure \
--prefix=%{_prefix} \
--with-config-file-path=%{_prefix}/etc \
--with-libdir=lib64 \
--with-mysql \
--with-zend-vm=GOTO \
--with-iconv \
--disable-ipv6 \
--enable-zend-multibyte \
--enable-sockets \
--disable-debug \
--enable-fpm \
--with-curl \
--with-openssl

%install
rm -rf %{buildroot}
make INSTALL_ROOT=%{buildroot} install
rm -rf %{buildroot}/.channels %{buildroot}/.depdb %{buildroot}/.depdblock %{buildroot}/.filemap %{buildroot}/.lock %{buildroot}/.registry
rm -rf %{buildroot}/opt/local/phpfpm5.3.8/bin/phar
rm -rf %{buildroot}/.channels/.alias/pear.txt %{buildroot}/.channels/.alias/pecl.txt %{buildroot}/.channels/__uri.reg %{buildroot}/.channels/pear.php.net.reg %{buildroot}/.channels/pecl.php.net.reg %{buildroot}/.depdb %{buildroot}/.depdblock %{buildroot}/.filemap %{buildroot}/.lock

%clean
rm -rf %{buildroot}


%pre
grep -q ^%{_group}: /etc/group || %{_sbin_path}/groupadd -g %{_group_gid} %{_group}
grep -q ^%{_user}: /etc/passwd ||
    %{_sbin_path}/useradd -g %{_group} -u %{_user_uid} -d %{_prefix} -s /sbin/nologin -M %{_user}


%postun
if [ $1 = 0 ]; then
        userdel %{_user} > /dev/null 2>&1 || true
fi

%files
%defattr(-,root,root)
%dir %{_prefix}/man
%dir %{_prefix}/man/man8
%dir %{_prefix}/man/man1
%dir %{_prefix}/sbin
%dir %{_prefix}/etc
%dir %{_prefix}/lib
%dir %{_prefix}/lib/php
%dir %{_prefix}/lib/php/.registry
%dir %{_prefix}/lib/php/.registry/.channel.pecl.php.net
%dir %{_prefix}/lib/php/.registry/.channel.doc.php.net
%dir %{_prefix}/lib/php/.registry/.channel.__uri
%dir %{_prefix}/lib/php/data
%dir %{_prefix}/lib/php/data/PEAR
%dir %{_prefix}/lib/php/data/Structures_Graph
%dir %{_prefix}/lib/php/build
%dir %{_prefix}/lib/php/Archive
%dir %{_prefix}/lib/php/PEAR
%dir %{_prefix}/lib/php/PEAR/Downloader
%dir %{_prefix}/lib/php/PEAR/Installer
%dir %{_prefix}/lib/php/PEAR/Installer/Role
%dir %{_prefix}/lib/php/PEAR/Task
%dir %{_prefix}/lib/php/PEAR/Task/Postinstallscript
%dir %{_prefix}/lib/php/PEAR/Task/Windowseol
%dir %{_prefix}/lib/php/PEAR/Task/Replace
%dir %{_prefix}/lib/php/PEAR/Task/Unixeol
%dir %{_prefix}/lib/php/PEAR/Validator
%dir %{_prefix}/lib/php/PEAR/Command
%dir %{_prefix}/lib/php/PEAR/REST
%dir %{_prefix}/lib/php/PEAR/PackageFile
%dir %{_prefix}/lib/php/PEAR/PackageFile/v2
%dir %{_prefix}/lib/php/PEAR/PackageFile/Parser
%dir %{_prefix}/lib/php/PEAR/PackageFile/Generator
%dir %{_prefix}/lib/php/PEAR/ChannelFile
%dir %{_prefix}/lib/php/PEAR/Frontend
%dir %{_prefix}/lib/php/Console
%dir %{_prefix}/lib/php/doc
%dir %{_prefix}/lib/php/doc/PEAR
%dir %{_prefix}/lib/php/doc/XML_Util
%dir %{_prefix}/lib/php/doc/XML_Util/examples
%dir %{_prefix}/lib/php/doc/Structures_Graph
%dir %{_prefix}/lib/php/doc/Structures_Graph/docs
%dir %{_prefix}/lib/php/doc/Structures_Graph/docs/tutorials
%dir %{_prefix}/lib/php/doc/Structures_Graph/docs/tutorials/Structures_Graph
%dir %{_prefix}/lib/php/doc/Structures_Graph/docs/html
%dir %{_prefix}/lib/php/doc/Structures_Graph/docs/html/Structures_Graph
%dir %{_prefix}/lib/php/doc/Structures_Graph/docs/html/media
%dir %{_prefix}/lib/php/doc/Archive_Tar
%dir %{_prefix}/lib/php/doc/Archive_Tar/docs
%dir %{_prefix}/lib/php/test
%dir %{_prefix}/lib/php/test/XML_Util
%dir %{_prefix}/lib/php/test/XML_Util/tests
%dir %{_prefix}/lib/php/test/Structures_Graph
%dir %{_prefix}/lib/php/test/Structures_Graph/tests
%dir %{_prefix}/lib/php/test/Structures_Graph/tests/testCase
%dir %{_prefix}/lib/php/XML
%dir %{_prefix}/lib/php/Structures
%dir %{_prefix}/lib/php/Structures/Graph
%dir %{_prefix}/lib/php/Structures/Graph/Manipulator
%dir %{_prefix}/lib/php/.channels
%dir %{_prefix}/lib/php/.channels/.alias
%dir %{_prefix}/lib/php/OS
%dir %{_prefix}/bin
%dir %{_prefix}/include
%dir %{_prefix}/include/php
%dir %{_prefix}/include/php/main
%dir %{_prefix}/include/php/main/streams
%dir %{_prefix}/include/php/TSRM
%dir %{_prefix}/include/php/include
%dir %{_prefix}/include/php/ext
%dir %{_prefix}/include/php/ext/libxml
%dir %{_prefix}/include/php/ext/filter
%dir %{_prefix}/include/php/ext/ereg
%dir %{_prefix}/include/php/ext/ereg/regex
%dir %{_prefix}/include/php/ext/sqlite3
%dir %{_prefix}/include/php/ext/sqlite3/libsqlite
%dir %{_prefix}/include/php/ext/dom
%dir %{_prefix}/include/php/ext/sockets
%dir %{_prefix}/include/php/ext/date
%dir %{_prefix}/include/php/ext/date/lib
%dir %{_prefix}/include/php/ext/pdo
%dir %{_prefix}/include/php/ext/sqlite
%dir %{_prefix}/include/php/ext/sqlite/libsqlite
%dir %{_prefix}/include/php/ext/sqlite/libsqlite/src
%dir %{_prefix}/include/php/ext/standard
%dir %{_prefix}/include/php/ext/pcre
%dir %{_prefix}/include/php/ext/pcre/pcrelib
%dir %{_prefix}/include/php/ext/xml
%dir %{_prefix}/include/php/ext/json
%dir %{_prefix}/include/php/ext/session
%dir %{_prefix}/include/php/ext/spl
%dir %{_prefix}/include/php/ext/hash
%dir %{_prefix}/include/php/ext/iconv
%dir %{_prefix}/include/php/Zend
%{_prefix}/man/man8/php-fpm.8
%{_prefix}/man/man1/php.1
%{_prefix}/man/man1/phpize.1
%{_prefix}/man/man1/php-config.1
%{_prefix}/sbin/php-fpm
%{_prefix}/etc/pear.conf
%{_prefix}/etc/php-fpm.conf.default
%{_prefix}/lib/php/.registry/structures_graph.reg
%{_prefix}/lib/php/.registry/pear.reg
%{_prefix}/lib/php/.registry/xml_util.reg
%{_prefix}/lib/php/.registry/console_getopt.reg
%{_prefix}/lib/php/.registry/archive_tar.reg
%{_prefix}/lib/php/.depdblock
%{_prefix}/lib/php/PEAR.php
%{_prefix}/lib/php/data/PEAR/package.dtd
%{_prefix}/lib/php/data/PEAR/template.spec
%{_prefix}/lib/php/data/Structures_Graph/LICENSE
%{_prefix}/lib/php/build/config.guess
%{_prefix}/lib/php/build/run-tests.php
%{_prefix}/lib/php/build/libtool.m4
%{_prefix}/lib/php/build/config.sub
%{_prefix}/lib/php/build/shtool
%{_prefix}/lib/php/build/phpize.m4
%{_prefix}/lib/php/build/Makefile.global
%{_prefix}/lib/php/build/ltmain.sh
%{_prefix}/lib/php/build/mkdep.awk
%{_prefix}/lib/php/build/acinclude.m4
%{_prefix}/lib/php/build/scan_makefile_in.awk
%{_prefix}/lib/php/Archive/Tar.php
%{_prefix}/lib/php/PEAR/Frontend.php
%{_prefix}/lib/php/PEAR/Downloader/Package.php
%{_prefix}/lib/php/PEAR/Installer/Role/Data.php
%{_prefix}/lib/php/PEAR/Installer/Role/Data.xml
%{_prefix}/lib/php/PEAR/Installer/Role/Src.xml
%{_prefix}/lib/php/PEAR/Installer/Role/Test.xml
%{_prefix}/lib/php/PEAR/Installer/Role/Ext.xml
%{_prefix}/lib/php/PEAR/Installer/Role/Src.php
%{_prefix}/lib/php/PEAR/Installer/Role/Php.php
%{_prefix}/lib/php/PEAR/Installer/Role/Script.xml
%{_prefix}/lib/php/PEAR/Installer/Role/Www.xml
%{_prefix}/lib/php/PEAR/Installer/Role/Www.php
%{_prefix}/lib/php/PEAR/Installer/Role/Php.xml
%{_prefix}/lib/php/PEAR/Installer/Role/Cfg.php
%{_prefix}/lib/php/PEAR/Installer/Role/Test.php
%{_prefix}/lib/php/PEAR/Installer/Role/Script.php
%{_prefix}/lib/php/PEAR/Installer/Role/Doc.php
%{_prefix}/lib/php/PEAR/Installer/Role/Ext.php
%{_prefix}/lib/php/PEAR/Installer/Role/Common.php
%{_prefix}/lib/php/PEAR/Installer/Role/Doc.xml
%{_prefix}/lib/php/PEAR/Installer/Role/Cfg.xml
%{_prefix}/lib/php/PEAR/Installer/Role.php
%{_prefix}/lib/php/PEAR/REST.php
%{_prefix}/lib/php/PEAR/Task/Replace.php
%{_prefix}/lib/php/PEAR/Task/Postinstallscript/rw.php
%{_prefix}/lib/php/PEAR/Task/Windowseol/rw.php
%{_prefix}/lib/php/PEAR/Task/Unixeol.php
%{_prefix}/lib/php/PEAR/Task/Windowseol.php
%{_prefix}/lib/php/PEAR/Task/Replace/rw.php
%{_prefix}/lib/php/PEAR/Task/Postinstallscript.php
%{_prefix}/lib/php/PEAR/Task/Common.php
%{_prefix}/lib/php/PEAR/Task/Unixeol/rw.php
%{_prefix}/lib/php/PEAR/Dependency2.php
%{_prefix}/lib/php/PEAR/Autoloader.php
%{_prefix}/lib/php/PEAR/Command.php
%{_prefix}/lib/php/PEAR/XMLParser.php
%{_prefix}/lib/php/PEAR/Validator/PECL.php
%{_prefix}/lib/php/PEAR/FixPHP5PEARWarnings.php
%{_prefix}/lib/php/PEAR/Registry.php
%{_prefix}/lib/php/PEAR/ChannelFile.php
%{_prefix}/lib/php/PEAR/Command/Package.php
%{_prefix}/lib/php/PEAR/Command/Remote.php
%{_prefix}/lib/php/PEAR/Command/Install.php
%{_prefix}/lib/php/PEAR/Command/Auth.php
%{_prefix}/lib/php/PEAR/Command/Mirror.php
%{_prefix}/lib/php/PEAR/Command/Test.xml
%{_prefix}/lib/php/PEAR/Command/Auth.xml
%{_prefix}/lib/php/PEAR/Command/Package.xml
%{_prefix}/lib/php/PEAR/Command/Channels.xml
%{_prefix}/lib/php/PEAR/Command/Channels.php
%{_prefix}/lib/php/PEAR/Command/Build.php
%{_prefix}/lib/php/PEAR/Command/Pickle.php
%{_prefix}/lib/php/PEAR/Command/Mirror.xml
%{_prefix}/lib/php/PEAR/Command/Registry.xml
%{_prefix}/lib/php/PEAR/Command/Install.xml
%{_prefix}/lib/php/PEAR/Command/Registry.php
%{_prefix}/lib/php/PEAR/Command/Test.php
%{_prefix}/lib/php/PEAR/Command/Config.xml
%{_prefix}/lib/php/PEAR/Command/Common.php
%{_prefix}/lib/php/PEAR/Command/Remote.xml
%{_prefix}/lib/php/PEAR/Command/Build.xml
%{_prefix}/lib/php/PEAR/Command/Config.php
%{_prefix}/lib/php/PEAR/Command/Pickle.xml
%{_prefix}/lib/php/PEAR/ErrorStack.php
%{_prefix}/lib/php/PEAR/RunTest.php
%{_prefix}/lib/php/PEAR/REST/11.php
%{_prefix}/lib/php/PEAR/REST/13.php
%{_prefix}/lib/php/PEAR/REST/10.php
%{_prefix}/lib/php/PEAR/Installer.php
%{_prefix}/lib/php/PEAR/Builder.php
%{_prefix}/lib/php/PEAR/DependencyDB.php
%{_prefix}/lib/php/PEAR/Packager.php
%{_prefix}/lib/php/PEAR/PackageFile/v2/Validator.php
%{_prefix}/lib/php/PEAR/PackageFile/v2/rw.php
%{_prefix}/lib/php/PEAR/PackageFile/Parser/v2.php
%{_prefix}/lib/php/PEAR/PackageFile/Parser/v1.php
%{_prefix}/lib/php/PEAR/PackageFile/v2.php
%{_prefix}/lib/php/PEAR/PackageFile/v1.php
%{_prefix}/lib/php/PEAR/PackageFile/Generator/v2.php
%{_prefix}/lib/php/PEAR/PackageFile/Generator/v1.php
%{_prefix}/lib/php/PEAR/ChannelFile/Parser.php
%{_prefix}/lib/php/PEAR/Common.php
%{_prefix}/lib/php/PEAR/Exception.php
%{_prefix}/lib/php/PEAR/Validate.php
%{_prefix}/lib/php/PEAR/Config.php
%{_prefix}/lib/php/PEAR/Frontend/CLI.php
%{_prefix}/lib/php/PEAR/PackageFile.php
%{_prefix}/lib/php/PEAR/Downloader.php
%{_prefix}/lib/php/.depdb
%{_prefix}/lib/php/Console/Getopt.php
%{_prefix}/lib/php/doc/PEAR/INSTALL
%{_prefix}/lib/php/doc/PEAR/LICENSE
%{_prefix}/lib/php/doc/PEAR/README
%{_prefix}/lib/php/doc/XML_Util/examples/example.php
%{_prefix}/lib/php/doc/XML_Util/examples/example2.php
%{_prefix}/lib/php/doc/Structures_Graph/docs/tutorials/Structures_Graph/Structures_Graph.pkg
%{_prefix}/lib/php/doc/Structures_Graph/docs/generate.sh
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/packages.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/elementindex_Structures_Graph.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/errors.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/elementindex.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/index.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/tutorial_Structures_Graph.pkg.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Manipulator_AcyclicTest.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Manipulator_TopologicalSorter.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_php.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/Structures_Graph.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Node_php.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Manipulator_AcyclicTest_php.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/_Structures_Graph_Manipulator_TopologicalSorter_php.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/Structures_Graph/Structures_Graph_Node.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/classtrees_Structures_Graph.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/li_Structures_Graph.html
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/media/banner.css
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/media/stylesheet.css
%{_prefix}/lib/php/doc/Structures_Graph/docs/html/todolist.html
%{_prefix}/lib/php/doc/Archive_Tar/docs/Archive_Tar.txt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_createTag.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBug_4950.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_createEndElement.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_createTagFromArray.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBug_5392.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_collapseEmptyTags.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_isValidName.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_createStartElement.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_getXmlDeclaration.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_attributesToString.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_replaceEntities.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_reverseEntities.phpt
%{_prefix}/lib/php/test/XML_Util/tests/AllTests.php
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_getDocTypeDeclaration.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_apiVersion.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_createComment.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_raiseError.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_createCDataSection.phpt
%{_prefix}/lib/php/test/XML_Util/tests/testBasic_splitQualifiedName.phpt
%{_prefix}/lib/php/test/Structures_Graph/tests/testCase/BasicGraph.php
%{_prefix}/lib/php/test/Structures_Graph/tests/AllTests.php
%{_prefix}/lib/php/pearcmd.php
%{_prefix}/lib/php/XML/Util.php
%{_prefix}/lib/php/.filemap
%{_prefix}/lib/php/System.php
%{_prefix}/lib/php/Structures/Graph.php
%{_prefix}/lib/php/Structures/Graph/Manipulator/TopologicalSorter.php
%{_prefix}/lib/php/Structures/Graph/Manipulator/AcyclicTest.php
%{_prefix}/lib/php/Structures/Graph/Node.php
%{_prefix}/lib/php/.lock
%{_prefix}/lib/php/.channels/.alias/pear.txt
%{_prefix}/lib/php/.channels/.alias/phpdocs.txt
%{_prefix}/lib/php/.channels/.alias/pecl.txt
%{_prefix}/lib/php/.channels/pecl.php.net.reg
%{_prefix}/lib/php/.channels/pear.php.net.reg
%{_prefix}/lib/php/.channels/__uri.reg
%{_prefix}/lib/php/.channels/doc.php.net.reg
%{_prefix}/lib/php/peclcmd.php
%{_prefix}/lib/php/OS/Guess.php
%{_prefix}/lib/php/PEAR5.php
%{_prefix}/bin/phpize
%{_prefix}/bin/php
%{_prefix}/bin/peardev
%{_prefix}/bin/pear
%{_prefix}/bin/php-config
%{_prefix}/bin/pecl
%{_prefix}/bin/phar.phar
%{_prefix}/include/php/main/snprintf.h
%{_prefix}/include/php/main/php_open_temporary_file.h
%{_prefix}/include/php/main/win32_internal_function_disabled.h
%{_prefix}/include/php/main/php_version.h
%{_prefix}/include/php/main/php_config.h
%{_prefix}/include/php/main/php_memory_streams.h
%{_prefix}/include/php/main/php_ticks.h
%{_prefix}/include/php/main/php_network.h
%{_prefix}/include/php/main/build-defs.h
%{_prefix}/include/php/main/php_main.h
%{_prefix}/include/php/main/php_content_types.h
%{_prefix}/include/php/main/php_getopt.h
%{_prefix}/include/php/main/php_variables.h
%{_prefix}/include/php/main/streams/php_stream_plain_wrapper.h
%{_prefix}/include/php/main/streams/php_stream_userspace.h
%{_prefix}/include/php/main/streams/php_stream_glob_wrapper.h
%{_prefix}/include/php/main/streams/php_stream_context.h
%{_prefix}/include/php/main/streams/php_stream_transport.h
%{_prefix}/include/php/main/streams/php_stream_filter_api.h
%{_prefix}/include/php/main/streams/php_streams_int.h
%{_prefix}/include/php/main/streams/php_stream_mmap.h
%{_prefix}/include/php/main/php.h
%{_prefix}/include/php/main/php_ini.h
%{_prefix}/include/php/main/php_compat.h
%{_prefix}/include/php/main/php_syslog.h
%{_prefix}/include/php/main/php_reentrancy.h
%{_prefix}/include/php/main/spprintf.h
%{_prefix}/include/php/main/php_streams.h
%{_prefix}/include/php/main/logos.h
%{_prefix}/include/php/main/php_scandir.h
%{_prefix}/include/php/main/SAPI.h
%{_prefix}/include/php/main/fopen_wrappers.h
%{_prefix}/include/php/main/php_globals.h
%{_prefix}/include/php/main/win95nt.h
%{_prefix}/include/php/main/rfc1867.h
%{_prefix}/include/php/main/safe_mode.h
%{_prefix}/include/php/main/php_logos.h
%{_prefix}/include/php/main/php3_compat.h
%{_prefix}/include/php/main/php_output.h
%{_prefix}/include/php/TSRM/tsrm_win32.h
%{_prefix}/include/php/TSRM/tsrm_config.h
%{_prefix}/include/php/TSRM/tsrm_nw.h
%{_prefix}/include/php/TSRM/readdir.h
%{_prefix}/include/php/TSRM/acconfig.h
%{_prefix}/include/php/TSRM/TSRM.h
%{_prefix}/include/php/TSRM/tsrm_config.w32.h
%{_prefix}/include/php/TSRM/tsrm_config_common.h
%{_prefix}/include/php/TSRM/tsrm_strtok_r.h
%{_prefix}/include/php/TSRM/tsrm_virtual_cwd.h
%{_prefix}/include/php/ext/libxml/php_libxml.h
%{_prefix}/include/php/ext/filter/php_filter.h
%{_prefix}/include/php/ext/ereg/php_ereg.h
%{_prefix}/include/php/ext/ereg/php_regex.h
%{_prefix}/include/php/ext/ereg/regex/regex.h
%{_prefix}/include/php/ext/ereg/regex/cclass.h
%{_prefix}/include/php/ext/ereg/regex/regex2.h
%{_prefix}/include/php/ext/ereg/regex/utils.h
%{_prefix}/include/php/ext/ereg/regex/cname.h
%{_prefix}/include/php/ext/sqlite3/libsqlite/sqlite3.h
%{_prefix}/include/php/ext/dom/xml_common.h
%{_prefix}/include/php/ext/sockets/php_sockets.h
%{_prefix}/include/php/ext/date/php_date.h
%{_prefix}/include/php/ext/date/lib/timelib.h
%{_prefix}/include/php/ext/date/lib/timelib_config.h
%{_prefix}/include/php/ext/date/lib/timelib_structs.h
%{_prefix}/include/php/ext/pdo/php_pdo.h
%{_prefix}/include/php/ext/pdo/php_pdo_driver.h
%{_prefix}/include/php/ext/sqlite/libsqlite/src/sqlite.h
%{_prefix}/include/php/ext/standard/php_type.h
%{_prefix}/include/php/ext/standard/php_string.h
%{_prefix}/include/php/ext/standard/php_metaphone.h
%{_prefix}/include/php/ext/standard/credits_ext.h
%{_prefix}/include/php/ext/standard/microtime.h
%{_prefix}/include/php/ext/standard/php_crypt_r.h
%{_prefix}/include/php/ext/standard/basic_functions.h
%{_prefix}/include/php/ext/standard/uniqid.h
%{_prefix}/include/php/ext/standard/php_http.h
%{_prefix}/include/php/ext/standard/fsock.h
%{_prefix}/include/php/ext/standard/php_dns.h
%{_prefix}/include/php/ext/standard/exec.h
%{_prefix}/include/php/ext/standard/info.h
%{_prefix}/include/php/ext/standard/php_crypt.h
%{_prefix}/include/php/ext/standard/credits_sapi.h
%{_prefix}/include/php/ext/standard/base64.h
%{_prefix}/include/php/ext/standard/winver.h
%{_prefix}/include/php/ext/standard/crypt_freesec.h
%{_prefix}/include/php/ext/standard/php_fopen_wrappers.h
%{_prefix}/include/php/ext/standard/php_image.h
%{_prefix}/include/php/ext/standard/flock_compat.h
%{_prefix}/include/php/ext/standard/php_iptc.h
%{_prefix}/include/php/ext/standard/dl.h
%{_prefix}/include/php/ext/standard/quot_print.h
%{_prefix}/include/php/ext/standard/datetime.h
%{_prefix}/include/php/ext/standard/php_math.h
%{_prefix}/include/php/ext/standard/php_ftok.h
%{_prefix}/include/php/ext/standard/html.h
%{_prefix}/include/php/ext/standard/crc32.h
%{_prefix}/include/php/ext/standard/php_rand.h
%{_prefix}/include/php/ext/standard/php_var.h
%{_prefix}/include/php/ext/standard/php_standard.h
%{_prefix}/include/php/ext/standard/md5.h
%{_prefix}/include/php/ext/standard/scanf.h
%{_prefix}/include/php/ext/standard/sha1.h
%{_prefix}/include/php/ext/standard/php_array.h
%{_prefix}/include/php/ext/standard/cyr_convert.h
%{_prefix}/include/php/ext/standard/php_link.h
%{_prefix}/include/php/ext/standard/php_assert.h
%{_prefix}/include/php/ext/standard/streamsfuncs.h
%{_prefix}/include/php/ext/standard/php_dir.h
%{_prefix}/include/php/ext/standard/css.h
%{_prefix}/include/php/ext/standard/php_incomplete_class.h
%{_prefix}/include/php/ext/standard/php_smart_str.h
%{_prefix}/include/php/ext/standard/url.h
%{_prefix}/include/php/ext/standard/php_filestat.h
%{_prefix}/include/php/ext/standard/php_browscap.h
%{_prefix}/include/php/ext/standard/php_uuencode.h
%{_prefix}/include/php/ext/standard/head.h
%{_prefix}/include/php/ext/standard/pageinfo.h
%{_prefix}/include/php/ext/standard/php_smart_str_public.h
%{_prefix}/include/php/ext/standard/php_versioning.h
%{_prefix}/include/php/ext/standard/php_mail.h
%{_prefix}/include/php/ext/standard/proc_open.h
%{_prefix}/include/php/ext/standard/credits.h
%{_prefix}/include/php/ext/standard/file.h
%{_prefix}/include/php/ext/standard/url_scanner_ex.h
%{_prefix}/include/php/ext/standard/php_lcg.h
%{_prefix}/include/php/ext/standard/php_ext_syslog.h
%{_prefix}/include/php/ext/standard/pack.h
%{_prefix}/include/php/ext/pcre/php_pcre.h
%{_prefix}/include/php/ext/pcre/pcrelib/ucp.h
%{_prefix}/include/php/ext/pcre/pcrelib/pcre_internal.h
%{_prefix}/include/php/ext/pcre/pcrelib/config.h
%{_prefix}/include/php/ext/pcre/pcrelib/pcre.h
%{_prefix}/include/php/ext/pcre/pcrelib/pcreposix.h
%{_prefix}/include/php/ext/xml/expat_compat.h
%{_prefix}/include/php/ext/xml/php_xml.h
%{_prefix}/include/php/ext/json/php_json.h
%{_prefix}/include/php/ext/session/mod_user.h
%{_prefix}/include/php/ext/session/php_session.h
%{_prefix}/include/php/ext/session/mod_files.h
%{_prefix}/include/php/ext/spl/spl_functions.h
%{_prefix}/include/php/ext/spl/spl_dllist.h
%{_prefix}/include/php/ext/spl/spl_fixedarray.h
%{_prefix}/include/php/ext/spl/spl_iterators.h
%{_prefix}/include/php/ext/spl/spl_directory.h
%{_prefix}/include/php/ext/spl/spl_heap.h
%{_prefix}/include/php/ext/spl/php_spl.h
%{_prefix}/include/php/ext/spl/spl_exceptions.h
%{_prefix}/include/php/ext/spl/spl_observer.h
%{_prefix}/include/php/ext/spl/spl_engine.h
%{_prefix}/include/php/ext/spl/spl_array.h
%{_prefix}/include/php/ext/hash/php_hash_tiger.h
%{_prefix}/include/php/ext/hash/php_hash_haval.h
%{_prefix}/include/php/ext/hash/php_hash_gost.h
%{_prefix}/include/php/ext/hash/php_hash_adler32.h
%{_prefix}/include/php/ext/hash/php_hash_snefru.h
%{_prefix}/include/php/ext/hash/php_hash_whirlpool.h
%{_prefix}/include/php/ext/hash/php_hash.h
%{_prefix}/include/php/ext/hash/php_hash_salsa.h
%{_prefix}/include/php/ext/hash/php_hash_ripemd.h
%{_prefix}/include/php/ext/hash/php_hash_sha.h
%{_prefix}/include/php/ext/hash/php_hash_types.h
%{_prefix}/include/php/ext/hash/php_hash_md.h
%{_prefix}/include/php/ext/hash/php_hash_crc32.h
%{_prefix}/include/php/ext/iconv/php_have_iconv.h
%{_prefix}/include/php/ext/iconv/php_php_iconv_impl.h
%{_prefix}/include/php/ext/iconv/php_have_glibc_iconv.h
%{_prefix}/include/php/ext/iconv/php_have_bsd_iconv.h
%{_prefix}/include/php/ext/iconv/php_iconv_supports_errno.h
%{_prefix}/include/php/ext/iconv/php_have_ibm_iconv.h
%{_prefix}/include/php/ext/iconv/php_iconv.h
%{_prefix}/include/php/ext/iconv/php_have_libiconv.h
%{_prefix}/include/php/ext/iconv/php_iconv_aliased_libiconv.h
%{_prefix}/include/php/ext/iconv/php_php_iconv_h_path.h
%{_prefix}/include/php/ext/standard/crypt_blowfish.h
%{_prefix}/include/php/Zend/zend_stream.h
%{_prefix}/include/php/Zend/zend_builtin_functions.h
%{_prefix}/include/php/Zend/zend_language_parser.h
%{_prefix}/include/php/Zend/zend_indent.h
%{_prefix}/include/php/Zend/zend_ptr_stack.h
%{_prefix}/include/php/Zend/zend_interfaces.h
%{_prefix}/include/php/Zend/zend_vm_opcodes.h
%{_prefix}/include/php/Zend/zend_operators.h
%{_prefix}/include/php/Zend/zend_config.w32.h
%{_prefix}/include/php/Zend/zend_objects.h
%{_prefix}/include/php/Zend/zend_language_scanner.h
%{_prefix}/include/php/Zend/zend_types.h
%{_prefix}/include/php/Zend/zend_globals.h
%{_prefix}/include/php/Zend/zend_alloc.h
%{_prefix}/include/php/Zend/zend_vm_execute.h
%{_prefix}/include/php/Zend/zend_build.h
%{_prefix}/include/php/Zend/zend_vm.h
%{_prefix}/include/php/Zend/zend_config.h
%{_prefix}/include/php/Zend/zend_modules.h
%{_prefix}/include/php/Zend/acconfig.h
%{_prefix}/include/php/Zend/zend_language_scanner_defs.h
%{_prefix}/include/php/Zend/zend_ini_scanner.h
%{_prefix}/include/php/Zend/zend_ini_scanner_defs.h
%{_prefix}/include/php/Zend/zend_highlight.h
%{_prefix}/include/php/Zend/zend_object_handlers.h
%{_prefix}/include/php/Zend/zend_llist.h
%{_prefix}/include/php/Zend/zend_execute.h
%{_prefix}/include/php/Zend/zend_gc.h
%{_prefix}/include/php/Zend/zend_float.h
%{_prefix}/include/php/Zend/zend_stack.h
%{_prefix}/include/php/Zend/zend_API.h
%{_prefix}/include/php/Zend/zend_globals_macros.h
%{_prefix}/include/php/Zend/zend_multiply.h
%{_prefix}/include/php/Zend/zend_iterators.h
%{_prefix}/include/php/Zend/zend_ts_hash.h
%{_prefix}/include/php/Zend/zend_closures.h
%{_prefix}/include/php/Zend/zend_qsort.h
%{_prefix}/include/php/Zend/zend_ini_parser.h
%{_prefix}/include/php/Zend/zend_objects_API.h
%{_prefix}/include/php/Zend/zend_istdiostream.h
%{_prefix}/include/php/Zend/zend_variables.h
%{_prefix}/include/php/Zend/zend_ini.h
%{_prefix}/include/php/Zend/zend_config.nw.h
%{_prefix}/include/php/Zend/zend_list.h
%{_prefix}/include/php/Zend/zend_dynamic_array.h
%{_prefix}/include/php/Zend/zend_strtod.h
%{_prefix}/include/php/Zend/zend_compile.h
%{_prefix}/include/php/Zend/zend_hash.h
%{_prefix}/include/php/Zend/zend.h
%{_prefix}/include/php/Zend/zend_errors.h
%{_prefix}/include/php/Zend/zend_constants.h
%{_prefix}/include/php/Zend/zend_extensions.h
%{_prefix}/include/php/Zend/zend_static_allocator.h
%{_prefix}/include/php/Zend/zend_fast_cache.h
%{_prefix}/include/php/Zend/zend_vm_def.h
%{_prefix}/include/php/Zend/zend_multibyte.h
%{_prefix}/include/php/Zend/zend_exceptions.h

%changelog
* Mon Oct 18 2010 Chao Xu <[email protected]>
- Initial fm PHP package

可以参考:http://machael.blog.51cto.com/829462/213477

今天重新定制打包时出现:error: Installed (but unpackaged) file(s) found:

在网上找了下方法:
找到 /usr/lib/rpm/macros 中
%__check_files         /usr/lib/rpm/check-files %{buildroot}   注释掉

 

你可能感兴趣的:(职场,休闲,rpmbuild,打软件包简单范例)