]> git.pld-linux.org Git - packages/pyp2rpm.git/blame - pyp2rpm.spec
add pld spec template
[packages/pyp2rpm.git] / pyp2rpm.spec
CommitLineData
20e72201
ER
1#
2# Conditional build:
c1f92037 3%bcond_without tests # do not perform "make test"
20e72201
ER
4
5Summary: Convert Python packages to RPM .spec files
6Name: pyp2rpm
7Version: 1.0.1
8Release: 1
14705ca7
ER
9License: MIT
10Group: Applications
20e72201
ER
11Source0: http://pypi.python.org/packages/source/p/pyp2rpm/%{name}-%{version}.tar.gz
12# Source0-md5: 1e9a514d8dab9782f699ded2eb268237
13# to get tests:
14# git clone git@bitbucket.org:bkabrda/pyp2rpm.git && cd pyp2rpm
15# git checkout v1.0.1 && tar czf pyp2rpm-1.0.1-tests.tgz tests/
16Source1: %{name}-%{version}-tests.tgz
c1f92037 17# Source1-md5: d6ffe3cd0acb10af01c99a77e6bd51f3
41a9b90b 18Source2: pld.spec.tmpl
aa1c3d8d 19Patch0: default-savepath.patch
86badbed 20Patch1: no-rpmdev-packager.patch
20e72201 21URL: https://pypi.python.org/pypi/pyp2rpm
20e72201 22BuildRequires: python-flexmock >= 0.9.3
20e72201
ER
23BuildRequires: python-pytest
24BuildRequires: python-setuptools
25BuildRequires: rpm-pythonprov
26BuildRequires: rpmbuild(macros) >= 1.219
27Requires: python-jinja2
28Requires: python-setuptools
29BuildArch: noarch
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33Convert Python packages to RPM .spec.
34
35Users can provide their own templates for rendering the package
36metadata. Both the package source and metadata can be extracted from
37PyPI or from local filesystem (local file doesn't provide that much
38information though).
39
40%prep
c1f92037 41%setup -q
aa1c3d8d 42%patch0 -p1
86badbed 43%patch1 -p1
20e72201
ER
44# Remove bundled egg-info
45rm -r %{name}.egg-info
46
41a9b90b
ER
47cp -p %{SOURCE2} pyp2rpm/templates/pld.spec
48
20e72201
ER
49%build
50%{__python} setup.py build
51
52%if %{with tests}
53PYTHONPATH=$(pwd) py.test
54%endif
55
56%install
57rm -rf $RPM_BUILD_ROOT
58%{__python} setup.py install \
59 --skip-build \
60 --optimize=2 \
61 --root=$RPM_BUILD_ROOT
62
63%py_postclean
64
65%clean
66rm -rf $RPM_BUILD_ROOT
67
68%files
69%defattr(644,root,root,755)
70%doc README.rst LICENSE
71%attr(755,root,root) %{_bindir}/pyp2rpm
41a9b90b
ER
72%dir %{py_sitescriptdir}/%{name}
73%{py_sitescriptdir}/%{name}/*.py[co]
74%dir %{py_sitescriptdir}/%{name}/templates
75%{py_sitescriptdir}/%{name}/templates/macros.spec
76%{py_sitescriptdir}/%{name}/templates/fedora.spec
77%{py_sitescriptdir}/%{name}/templates/mageia.spec
78%{py_sitescriptdir}/%{name}/templates/pld.spec
20e72201 79%{py_sitescriptdir}/%{name}-%{version}-py*.egg-info
41a9b90b 80
This page took 0.076487 seconds and 4 git commands to generate.