rpmbuild打包qwt

OS:CentOS6.6

打包过程:

只把二进制文件做了拷贝,从目录1=》目的目录

 %{buildroot}%{_libdir}
这是安装的目的目录,其中

buildroot即BuildRoot

而_libdir是来自rpmbuild的内部定义,对应/usr/lib64


打包文件如下:

%define _topdir %(echo $PWD)/

Name:	        qwt-lib		

Version:	6.1svn
Release:	1%{?dist}
Summary:	Installs the qwt-lib

License:	th-z
URL:		
Source0:f 
BuildRoot: %{_tmppath}/%{name}-%{version}-root

Requires: qt

%description


%prep

%build

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_libdir}
cp ../thirdparty/qwt-6.1/lib/libqwt* %{buildroot}%{_libdir}


%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%{_libdir}/libqwt*


%changelog

该文件参考自

github.com/ bitcoin packet qt spec


你可能感兴趣的:(qt5,centos)