- 论坛徽章:
- 0
|
rpmbuild的用法很复杂,建议你多看看rpm相关的电子文档,下面是我以前写过的一个简单的rpm SPEC文件,供参考,功能只是把一个tar包变与一个rpm,打包过程中不做任何编译,安装时也只相当于用tar包解压。
Summary: EIAS_httpd_conf
Name: EIAS_conf
Version: 1.0
Release: 0
Copyright: distributable
Group: Databases
Source0: EIAS_conf.tar.gz
Url: http://www.test.com
BuildRoot: /var/tmp/EIAS_conf-buildroot/
#BuildRequires:
#Requires: MySQl
%description
Runmmit EIAS component
# Provide perl-specific find-{provides,requires}.
%define __find_provides /usr/lib/rpm/find-provides.perl
%define __find_requires /usr/lib/rpm/find-requires.perl
%prep
#%setup -q -n vpopmail-%{version}
#mkdir -p ../usr/src
#cp -dpR $RPM_BUILD_DIR/apache_%{apache_version} ../usr/src
%build
%clean
rm -rf $RPM_BUILD_ROOT
%install
rm -rf $RPM_BUILD_ROOT
# install binary
#tar c -C .. usr/src | tar x -C $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT
tar -C $RPM_BUILD_ROOT -zxf EIAS_conf.tar.gz
%files
%defattr(-,root,root)
/etc/httpd
/etc/admserv
/etc/rc.d/init.d/httpd
/etc/rc.d/init.d/admserv
#%dir /home/vpopmail
#%files source
#%defattr(-,root,root)
#/usr/src/apache_%{apache_version}
#%doc README.ADVX |
|