Skip to content

Commit

Permalink
RPM spec file
Browse files Browse the repository at this point in the history
Change-Id: I63fd0cafe3b2b93c337851c5965acec43f43ac8a
  • Loading branch information
danc86 committed Jul 12, 2016
1 parent 39a9b21 commit 98866c9
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
56 changes: 56 additions & 0 deletions rpmdeplint.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

%global upstream_version 1.0rc1

Name: rpmdeplint
Version: 1.0
Release: 0.rc1%{?dist}
Summary: Tool to find errors in RPM packages in the context of their dependency graph
License: GPLv2+
URL: https://pypi.python.org/pypi/rpmdeplint
Source0: https://files.pythonhosted.org/packages/source/r/%{name}/%{name}-%{upstream_version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-sphinx
BuildRequires: pytest
BuildRequires: python-rpmfluff
%ifarch x86_64
BuildRequires: glibc-devel.i686
BuildRequires: libgcc.i686
%endif
BuildRequires: rpm-python
BuildRequires: python-hawkey
BuildRequires: python-librepo
Requires: rpm-python
Requires: python-hawkey
Requires: python-librepo

%description
Rpmdeplint is a tool to find errors in RPM packages in the context of their
dependency graph.

%prep
%setup -q -n %{name}-%{upstream_version}
rm -r rpmdeplint.egg-info

%build
%py2_build

%install
%py2_install

%check
py.test rpmdeplint
# Acceptance tests currently broken inside mock, due to rpmfluff:
# https://pagure.io/rpmfluff/pull-request/4
#export PATH=%%{buildroot}%%{_bindir}:$PATH PYTHONPATH=%%{buildroot}%%{python2_sitelib}
#py.test acceptance_tests

%files
%license COPYING
%doc README.rst
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1.*
%{python2_sitelib}/%{name}
%{python2_sitelib}/%{name}*.egg-info

%changelog
9 changes: 8 additions & 1 deletion tag-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ if git status --porcelain | grep -q '^.M' ; then
exit 1
fi

sed -i -e "/%global upstream_version /c\%global upstream_version ${version}${prerelease}" rpmdeplint.spec
sed -i -e "/^Version:/c\Version: $version" rpmdeplint.spec
if [ -n "$prerelease" ] ; then
sed -i -e "/^Release:/c\Release: 0.$prerelease%{?dist}" rpmdeplint.spec
else
sed -i -e "/^Release:/c\Release: 1%{?dist}" rpmdeplint.spec
fi
sed -i -e "/^version = /c\version = '$version$prerelease'" setup.py
git add setup.py
git add setup.py rpmdeplint.spec
git commit -m "Automatic commit of release $version$prerelease"
git tag -a "rpmdeplint-$version$prerelease" -m "Tagging release $version$prerelease"

0 comments on commit 98866c9

Please sign in to comment.