-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RPM spec file a quick howto build a RPM
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# How to build the RPM file | ||
|
||
## Installation | ||
|
||
``` | ||
yum group install "Development Tools" | ||
yum install rpmdevtools | ||
useradd makerpm | ||
``` | ||
|
||
## Building the package | ||
|
||
``` | ||
su - makerpm | ||
rpmdev-setuptree | ||
git clone https://github.com/dalibo/PAF.git | ||
spectool -R -g PAF/resource-agents-paf.spec | ||
rpmbuild -ba PAF/resource-agents-paf.spec | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
%global _tag v1.0.0 | ||
%global _ocfroot /usr/lib/ocf | ||
Name: resource-agents-paf | ||
Version: 1.0.0 | ||
Release: 1 | ||
Summary: PostgreSQL resource agent for Pacemaker | ||
License: PostgreSQL | ||
Group: Applications/Databases | ||
Url: http://dalibo.github.io/PAF/ | ||
|
||
Source0: https://github.com/dalibo/PAF/releases/download/%{_tag}/PAF-%{_tag}.tgz | ||
BuildArch: noarch | ||
#BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
BuildRequires: resource-agents perl perl-Module-Build | ||
Provides: resource-agents-paf = %{version} | ||
|
||
%description | ||
PostgreSQL resource agent for Pacemaker | ||
|
||
%prep | ||
%setup -n PAF-%{_tag} | ||
|
||
%build | ||
perl Build.PL --destdir "%{buildroot}" --install_path bindoc=%{_mandir}/man1 --install_path libdoc=%{_mandir}/man3 | ||
perl Build | ||
|
||
%install | ||
./Build install | ||
rm -f "%{buildroot}"/usr/local/lib64/perl5/auto/PAF/.packlist | ||
|
||
%files | ||
%defattr(-,root,root,0755) | ||
%doc README.md | ||
%license LICENSE | ||
%{_mandir}/man1/*.1* | ||
%{_mandir}/man3/*.3* | ||
%{_ocfroot}/resource.d/heartbeat/pgsqlms | ||
%{_ocfroot}/lib/heartbeat/OCF_ReturnCodes.pm | ||
%{_ocfroot}/lib/heartbeat/OCF_Directories.pm | ||
%{_ocfroot}/lib/heartbeat/OCF_Functions.pm | ||
%{_datadir}/resource-agents/ocft/configs/pgsqlms | ||
|
||
%changelog | ||
* Wed Mar 02 2016 Jehan-Guillaume de Rorthais <[email protected]> 1.0.0-1 | ||
- Official 1.0.0 release | ||
|
||
* Tue Mar 01 2016 Jehan-Guillaume de Rorthais <[email protected]> 0.99.0-1 | ||
- Initial version | ||
|