Skip to content

Commit

Permalink
Merge pull request #65 from TimothyAsirJeyasing/python-etcd
Browse files Browse the repository at this point in the history
Packaging python-etcd
  • Loading branch information
r0h4n authored Nov 22, 2016
2 parents cce7eea + 7f11427 commit 2247e66
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
23 changes: 23 additions & 0 deletions dependencies/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
NAME = python-etcd
VERSION = 0.4.3

all: srpm

clean:
rm -rf dist/
rm -rf $(NAME)-$(VERSION).tar.gz
rm -rf $(NAME)-$(VERSION)-1.src.rpm
rm -fr *.log

dist:
git clone https://github.com/jplana/python-etcd $(NAME)-$(VERSION)
tar -zcvf python-etcd-0.4.3.tar.gz $(NAME)-$(VERSION)
rm -fr $(NAME)-$(VERSION)

srpm: dist
fedpkg --dist epel7 srpm

rpm: srpm
mock -r epel-7-x86_64 rebuild $(NAME)-$(VERSION)-1.src.rpm --resultdir=.

.PHONY: dist rpm srpm
41 changes: 41 additions & 0 deletions dependencies/python-etcd.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
%define name python-etcd
%define version 0.4.3
%define unmangled_version 0.4.3
%define unmangled_version 0.4.3
%define release 1

Summary: A python client for etcd
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{unmangled_version}.tar.gz
License: MIT
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Jose Plana <[email protected]>
Url: http://github.com/jplana/python-etcd

BuildRequires: pytest
BuildRequires: python2-devel

%description
python-etcd documentation
A python client for Etcd https://github.com/coreos/etcd
Official documentation: http://python-etcd.readthedocs.org/

%prep
%setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version}

%build
python setup.py build

%install
python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES

%clean
rm -rf $RPM_BUILD_ROOT

%files -f INSTALLED_FILES
%defattr(-,root,root)

0 comments on commit 2247e66

Please sign in to comment.