此spec文件仅供自己记录,关于rpmbuild打包以及spec文件的编写请google。
%define fuse-ufs-0.1
Name: fuse-ufs
Version: 1.0
Release: 5
Summary: a tool to access ufs
License: GPL
Group: Applications/System
Prefix: /usr/local
AutoReqProv: no
Packager: jiliang@uit.com.cn
Vendor: UIT
#BuildRoot: /usr/src/redhat/OBJ
%description
A application to access ufs
%prep
%build
make
%install
cp fuse-ufs /bin/
mkdir /usr/local/fuse-ufs
mkdir /usr/local/fuse-ufs/lib/
mkdir /usr/local/fuse-ufs/jar/
mkdir /usr/local/fuse-ufs/conf/
mkdir /usr/local/fuse-ufs/jre/
cp *.so /usr/local/fuse-ufs/lib/
cp *.jar /usr/local/fuse-ufs/jar/
cp -r conf /usr/local/fuse-ufs/
cp -r jre /usr/local/fuse-ufs/
%clean
rm -rf /bin/fuse-ufs /usr/local/fuse-ufs/
%pre
%post
echo "/usr/local/fuse-ufsS/lib/" >> /etc/ld.so.conf
#echo "/usr/local/fuse-ufs/jre/lib/i386/client/" >> /etc/ld.so.conf
ldconfig
echo "export CLASSPATH=/usr/local/fuse-ufs/conf/:/usr/local/fuse-ufs/jar/commons-logging-1.0.4.jar:/usr/local/fuse-ufs/jar/ufs-1.0-dev-core.jar" >> /etc/profile
echo "export LD_LIBRARY_PATH=/usr/local/fuse-ufs/jre/lib/i386/client/" >> /etc/profile
source /etc/profile
%preun
%postun
%files
/bin/fuse-ufs
/usr/local/fuse-ufs/lib/libufs.so
/usr/local/fuse-ufs/lib/libfuse.so
/usr/local/fuse-ufs/lib/libjvm.so
/usr/local/fuse-ufs/jar/commons-logging-1.0.4.jar
/usr/local/fuse-ufs/jar/ufs-1.0-dev-core.jar
/usr/local/fuse-ufs/conf/
/usr/local/fuse-ufs/jre/
%changelog
*Mon Dec 14 2009 jiliang <jl@***.com.cn>
-add append function to adopt ftp
*Mon Jun 22 2009 jiliang <jl@***.com.cn>
-add jre
|
运行rpmbuild命令根据spec文件打包一个二进制文件。
rpmbuild -bb fuse-ufs.spec
|
阅读(3652) | 评论(0) | 转发(0) |