-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from blkart/build-rpm
Build rpm
- Loading branch information
Showing
2 changed files
with
58 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,5 @@ | ||
project_name = eayunstack-tools | ||
version = $(shell grep "Version" $(project_name).spec | awk '{print $$2}') | ||
|
||
sources: | ||
git archive --format=tar --prefix=$(project_name)-$(version)/ HEAD | gzip -9v > $(project_name)-$(version).tar.gz |
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,53 @@ | ||
Name: eayunstack-tools | ||
Version: 1.0 | ||
Release: 1%{?dist} | ||
Summary: EayunStack Management tools | ||
|
||
Group: Application | ||
License: GPL | ||
URL: https://github.com/eayunstack/eayunstack-tools | ||
Source0: eayunstack-tools-%{version}.tar.gz | ||
|
||
BuildRequires: /bin/bash | ||
Requires: python | ||
Requires: MySQL-python | ||
Requires: python-paramiko | ||
Requires: python-fuelclient | ||
Requires: python-cinder | ||
|
||
%description | ||
EayunStack Management Tools | ||
|
||
%prep | ||
%setup -q | ||
|
||
|
||
%build | ||
|
||
|
||
%install | ||
rm -rf %{buildroot} | ||
%{__python2} setup.py install --skip-build --root %{buildroot} | ||
mkdir -p %{buildroot}/.eayunstack/ | ||
cp -r template %{buildroot}/.eayunstack/ | ||
|
||
%post | ||
useradd eayunadm &> /dev/null | ||
passwd -d eayunadm &> /dev/null | ||
passwd -e eayunadm &> /dev/null | ||
echo 'eayunadm ALL=(ALL) NOPASSWD:/bin/eayunstack' >> /etc/sudoers | ||
|
||
%postun | ||
userdel -r eayunadm | ||
sed -i -e '/^eayunadm/d' /etc/sudoers | ||
|
||
%files | ||
%doc | ||
%attr(0755,root,root)/.eayunstack | ||
/usr/bin/eayunstack | ||
/usr/lib/python2.7/site-packages/ | ||
|
||
|
||
%changelog | ||
* Thu May 7 2015 blkart <[email protected]> 1.0-1 | ||
- commit ed7658fbe90d3165591a02f06bdf9af63091c907 |