Chinaunix首页 | 论坛 | 博客
  • 博客访问: 389668
  • 博文数量: 32
  • 博客积分: 2410
  • 博客等级: 大尉
  • 技术积分: 687
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-10 11:34
文章分类
文章存档

2012年(2)

2011年(6)

2010年(6)

2009年(7)

2008年(11)

分类: LINUX

2009-12-14 17:15:19

此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


阅读(3612) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~