spec中内容格式

.spec文件的格式及其中间的内容是
Name:           lsyncd
Version:        2.0.5
Release:        1%{?dist}
Summary:        lsyncd is a soft of data sync.


Group:          System Environmen/Base
License:        GNU
URL:            ftp://192.168.0.254
Source0:        lsyncd-2.0.5.tar.gz
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)


BuildRequires:  lua-devel
Requires:       lua


%description
lsyncd 是一款数据同步软件
use with rsyncd




%prep
%setup -q




%build
%configure
make %{?_smp_mflags}




%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
test -z "$RPM_BUILD_ROOT/bin" || /bin/mkdir -p "$RPM_BUILD_ROOT/bin"
/usr/bin/install -c "lsyncd" "$RPM_BUILD_ROOT/bin/lsyncd"
test -z "$RPM_BUILD_ROOT/share/doc/lsyncd/" || /bin/mkdir -p "$RPM_BUILD_ROOT/share/doc/lsyncd/"
/usr/bin/install -c -m 644 "examples/lbash.lua" "$RPM_BUILD_ROOT/share/doc/lsyncd//lbash.lua"
/usr/bin/install -c -m 644 "examples/lecho.lua" "$RPM_BUILD_ROOT/share/doc/lsyncd//lecho.lua"
/usr/bin/install -c -m 644 "examples/lgforce.lua" "$RPM_BUILD_ROOT/share/doc/lsyncd//lgforce.lua"
/usr/bin/install -c -m 644 "examples/limagemagic.lua" "$RPM_BUILD_ROOT/share/doc/lsyncd//limagemagic.lua"
/usr/bin/install -c -m 644 "examples/lpostcmd.lua" "$RPM_BUILD_ROOT/share/doc/lsyncd//lpostcmd.lua"
/usr/bin/install -c -m 644 "examples/lrsync.lua" "$RPM_BUILD_ROOT/share/doc/lsyncd//lrsync.lua"
/usr/bin/install -c -m 644 "examples/lrsyncssh.lua" "$RPM_BUILD_ROOT/share/doc/lsyncd//lrsyncssh.lua"
test -z "$RPM_BUILD_ROOT/share/man/man1" || /bin/mkdir -p "$RPM_BUILD_ROOT/share/man/man1"
/usr/bin/install -c -m 644 "./doc/lsyncd.1" "$RPM_BUILD_ROOT/share/man/man1/lsyncd.1"
test -z "" || /bin/mkdir -p ""




%clean
rm -rf $RPM_BUILD_ROOT




%files
/bin/lsyncd
/share/doc/lsyncd/lbash.lua
/share/doc/lsyncd/lecho.lua
/share/doc/lsyncd/lgforce.lua
/share/doc/lsyncd/limagemagic.lua
/share/doc/lsyncd/lpostcmd.lua
/share/doc/lsyncd/lrsync.lua
/share/doc/lsyncd/lrsyncssh.lua
/share/man/man1/lsyncd.1
/usr/bin/lsyncd
/usr/share/doc/lsyncd/lbash.lua
/usr/share/doc/lsyncd/lecho.lua
/usr/share/doc/lsyncd/lgforce.lua
/usr/share/doc/lsyncd/limagemagic.lua
/usr/share/doc/lsyncd/lpostcmd.lua
/usr/share/doc/lsyncd/lrsync.lua
/usr/share/doc/lsyncd/lrsyncssh.lua
/usr/share/man/man1/lsyncd.1.gz
%defattr(-,root,root,-)
%doc


%changelog




相关注意事项
Name: lsyncd
Version: 2.0.5
Release: 1%{?dist}
Summary:  lsync is a soft of data sync.


Group: System Environment/Base
License: GNU
URL: ftp://192.168.0.254/soft/lsyncd-2.0.5.tar.gz
Source0: lsyncd-2.0.5.tar.gz             //注意名称要写对
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)


BuildRequires:                 //此处还没有填写,后面根据提示再修改。
Requires:    


%description
lsyncd是一款数据同步软件
use with rsyncd


%prep
%setup -q


%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT   //此处没有填写完整,需根据“make install”的输出填写。


%clean
rm -rf $RPM_BUILD_ROOT


%files               //此处还没有填写,后面根据提示再修改。


%defattr(-,root,root,-)
%doc
%changelog
%changelog              
 //下面填写编译时间5月22日,日期格式为date  +"%a %b %d %Y",必须以*开头,以--end结尾
* Tue May 22 2012 <root@localhost>
--end
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值