diff --git a/.gitignore b/.gitignore index e69de29..9f58212 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/fedfind-1.1.4.tar.xz diff --git a/fedfind.spec b/fedfind.spec new file mode 100644 index 0000000..cebb233 --- /dev/null +++ b/fedfind.spec @@ -0,0 +1,151 @@ +# RHEL 6 compatibility. +%if 0%{?fedora} > 12 +%global with_python3 1 +%else +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} +%endif + +%global srcname fedfind + +Name: fedfind +Version: 1.1.4 +Release: 1%{?dist} +Summary: Fedora Finder finds Fedora + +Group: Applications/Productivity +License: GPLv3+ +URL: https://www.happyassassin.net/fedfind +Source0: https://www.happyassassin.net/fedfind/releases/%{srcname}-%{version}.tar.xz +BuildArch: noarch + +BuildRequires: python2-devel +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%endif # if with_python3 +BuildRequires: python-setuptools +Requires: python-setuptools +# Not available on EPEL, so made optional in code +# Recommends: python-subprocess32 +Requires: python-argparse +Requires: python2-cached_property +Requires: python-six +Provides: python2-fedfind +Provides: python-fedfind + +%description +Fedora Finder finds Fedora. For now, that means it finds Fedora images - +for stable releases, milestone pre-releases, TC/RC composes, and nightly +builds. + +%if 0%{?with_python3} +%package -n python3-fedfind +Summary: Fedora Finder finds Fedora (using Python 3) +Group: Applications/Productivity +# Yes, it's really named differently between py2 and py3... +Requires: python3-cached-property +Requires: python3-six +Requires: python3-setuptools +# old name from pre-Fedora packaging on happyassassin +Obsoletes: fedfind3 < %{version}-%{release} +Provides: fedfind3 = %{version}-%{release} + +%description -n python3-fedfind +Fedora Finder finds Fedora. For now, that means it finds Fedora images - +for stable releases, milestone pre-releases, TC/RC composes, and nightly +builds. This is the Python 3 build of the fedfind module. +%endif # with_python3 + + +%prep +%setup -q -n %{srcname}-%{version} +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!.*python2|#!%{__python3}|' +%endif # with_python3 + +%build +%{__python2} setup.py build + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif # with_python3 + +%install +rm -rf %{buildroot} + +# Must do the python3 install first because the scripts in /usr/bin are +# overwritten with every setup.py install (and we want the python2 version +# to be the default for now). +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install --skip-build --root %{buildroot} +popd +%endif # with_python3 + +%{__python2} setup.py install --skip-build --root %{buildroot} + +%files +%{!?_licensedir:%global license %%doc} +%doc README.md +%license COPYING +%{python2_sitelib}/%{srcname}* +%{_bindir}/fedfind + +%if 0%{?with_python3} +%files -n python3-fedfind +%doc README.md +%license COPYING +%{python3_sitelib}/%{srcname}* +%endif # with_python3 + + +%changelog +* Thu Apr 23 2015 Adam Williamson - 1.1.4-1 +- new release: drop shebangs from non-exec files, fix them in exec files +- rename 'fedfind3' to 'python3-fedfind' +- drop the executables from the python3 package (not really needed) + +* Thu Apr 16 2015 Adam Williamson - 1.1.3-1 +- new release: drop bundled cached_property + +* Tue Mar 10 2015 Adam Williamson - 1.1.2-1 +- new release: fix path for milestone releases + +* Thu Feb 26 2015 Adam Williamson - 1.1.1-1 +- 1.1.1: handle a python3 argparse bug causing a crash when no subcmd given + +* Thu Feb 26 2015 Adam Williamson - 1.1.0-1 +- new release 1.1.0: cleaner URL pref implementation, Python 3 support +- add a fedfind3 package for Python 3 + +* Wed Feb 25 2015 Adam Williamson - 1.0.8-1 +- 1.0.8: use dl.fp.o not download.fp.o URLs for TC/RC images + +* Wed Feb 25 2015 Adam Williamson - 1.0.7-1 +- 1.0.7: fix a bug in finding nightly images by type + +* Wed Feb 18 2015 Adam Williamson - 1.0.6-1 +- consolidate image versioning with python-wikitcms/relval, bugfixes + +* Thu Feb 12 2015 Adam Williamson - 1.0.5-1 +- new release 1.0.5: image detection bugfixes, no koji dep, cleanups + +* Mon Feb 09 2015 Adam Williamson - 1.0.4-1 +- new release 1.0.4: fix EL 6 compat + +* Mon Feb 09 2015 Adam Williamson - 1.0.3-1 +- new release 1.0.3: bugfixes, Python 2.6 / RHEL 6 compatibility + +* Fri Feb 06 2015 Adam Williamson - 1.0.2-1 +- new release 1.0.2: misc. bugfixes and CLI reorg + +* Fri Feb 06 2015 Adam Williamson - 1.0.1-1 +- add ppc to arches + +* Thu Feb 05 2015 Adam Williamson - 1.0-1 +- first package build of fedfind diff --git a/sources b/sources index e69de29..16fb3a9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c2aa152c8e5d435409638e375b0e5413 fedfind-1.1.4.tar.xz