Skip to content

Commit

Permalink
Merge pull request #59 from blkart/build-rpm
Browse files Browse the repository at this point in the history
Build rpm
  • Loading branch information
blkart committed May 7, 2015
2 parents ed7658f + 9763f0b commit bde49e0
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
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
53 changes: 53 additions & 0 deletions eayunstack-tools.spec
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

0 comments on commit bde49e0

Please sign in to comment.