[ 
https://issues.apache.org/jira/browse/HAWQ-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15889199#comment-15889199
 ] 

Kyle R Dunn commented on HAWQ-326:
----------------------------------

I've done some initial work on this.

After compiling HAWQ from source and running {{make install}}, with the 
{{rpmbuild}} utility installed, perform the following steps:
{code}
$ mkdir -p ~/RPMBUILD/hawq
$ cd /usr/local
$ tar cjf ~/RPMBUILD/hawq/hawq-2.1.0.0-rc4.tar.bz2 hawq )

$ rpmbuild -bb SPECS/hawq-2.1.0.0-rc4.spec
{code}

where the above RPM SPEC file contains the following:
{code}
# Don't try fancy stuff like debuginfo, which is useless on binary-only
# packages. Don't strip binary too
# Be sure buildpolicy set to do nothing
%define        __spec_install_post %{nil}
%define          debug_package %{nil}
%define        __os_install_post %{_dbpath}/brp-compress
%define _unpackaged_files_terminate_build 0

Summary: Apache HAWQ
Name: hawq
Version: 2.1.0.0
Release: rc4
License: Apache 2.0
Group: Development/Tools
SOURCE0 : %{name}-%{version}-%{release}.tar.bz2
URL: https://hawq.incubator.apache.org

%define installdir hawq

BuildRoot: %{_tmppath}/%{name}

%description
%{summary}

%prep
%setup -n %{installdir}

#%build
# Empty section.

%install
rm -rf /usr/local/%{installdir}
mkdir /usr/local/%{installdir}

# in buildroot
cp -ra * /usr/local/%{installdir}/


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
/greenplum_path.sh
/bin
/sbin
/docs
/etc
/include
/lib
/share
{code}

Note, we need to add steps to create the {{gpadmin}} user and ensure 
installation directory permissions are the correct owner and mode.

> Support RPM build for HAWQ
> --------------------------
>
>                 Key: HAWQ-326
>                 URL: https://issues.apache.org/jira/browse/HAWQ-326
>             Project: Apache HAWQ
>          Issue Type: Wish
>          Components: Build
>            Reporter: Lei Chang
>            Assignee: Paul Guo
>             Fix For: 2.2.0.0-incubating
>
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to