%global shortname da %global prever a2 Name: devassistant Version: 0.9.0 Release: 0.2.%{prever}%{?dist} Summary: DevAssistant - Making life easier for developers License: GPLv2+ URL: https://github.com/bkabrda/devassistant Source0: https://pypi.python.org/packages/source/d/%{name}/%{name}-%{version}%{prever}.tar.gz # to get desktop and appdata file: # git clone https://github.com/bkabrda/devassistant.git && cd devassistant # git checkout v0.8.0 # # devassistant.desktop, appdata/devassistant.appdata.xml Source1: %{name}.desktop Source2: %{name}.appdata.xml Source3: devassistant-assistants-rhel-7.tar.gz Patch0: devassistant-0.6.0-alter-paths-for-fedora.patch BuildArch: noarch BuildRequires: desktop-file-utils #BuildRequires: pytest BuildRequires: python2-devel # no flexmock in RHEL 7 => no testing during build :( #BuildRequires: python-flexmock BuildRequires: python-jinja2 BuildRequires: python-setuptools BuildRequires: PyYAML # it seems that other packages using bash-completion don't depend # on it and rather just own the directory, so we will do the same Requires: git Requires: polkit Requires: pygobject3 Requires: python-jinja2 Requires: python-setuptools Requires: python-six Requires: python-progress Requires: PyYAML %global __requires_exclude ^\(/usr/bin/php\|/usr/bin/perl\|perl\\(\) %description DevAssistant can help you with creating and setting up basic projects in various languages, installing dependencies, setting up environmens, working with source control, etc. %package assistants Summary: DevAssistant assistants for RHEL-7 %description assistants DevAssistant assistants for RHEL-7 %prep %setup -q -n %{name}-%{version}%{prever} # Remove bundled egg-info rm -rf %{name}.egg-info # Remove PyGithub dependency, so that devassistant doesn't fail without it sed -i "s|, 'PyGithub>=1.14.2'||" setup.py cp %{SOURCE1} . sed -i '/Version/d' %{name}.desktop %build %{__python} setup.py build %install %{__python} setup.py install --skip-build --root %{buildroot} # install manpages for both short and long forms of the binaries mkdir -p %{buildroot}%{_mandir}/man1 install -p manpages/%{shortname}.1 %{buildroot}%{_mandir}/man1 install -p manpages/%{shortname}-gui.1 %{buildroot}%{_mandir}/man1 install -p manpages/%{name}.1 %{buildroot}%{_mandir}/man1 # bash completion script mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/ install -p %{shortname}.bash %{buildroot}%{_sysconfdir}/bash_completion.d/ ## move data (assistants, snippets, templates) into %%{_datadir} # first, do the alterations to paths in devassistant pushd %{buildroot}%{python_sitelib} patch -p1 < %{PATCH0} sed -i 's|_DATADIR_DEVASSISTANT|%{_datadir}/%{name}|' devassistant/settings.py popd # now extract RHEL-specific assistants and remove the upstream ones mkdir -p %{buildroot}%{_datadir}/%{name}/ pushd %{buildroot}%{_datadir}/%{name}/ tar -xzf %{SOURCE3} popd rm -rf %{buildroot}%{python_sitelib}/%{name}/data # desktop and appdata desktop-file-install --dir %{buildroot}%{_datadir}/applications %{name}.desktop mkdir -p %{buildroot}/%{_datadir}/appdata cp -a %{SOURCE2} %{buildroot}/%{_datadir}/appdata %check #%{__python} setup.py test -t py.test %files %doc README.rst LICENSE %{_bindir}/%{shortname} %{_bindir}/%{shortname}-gui %{_bindir}/%{name} %{_bindir}/%{name}-gui %{_mandir}/man1/%{shortname}.1.gz %{_mandir}/man1/%{shortname}-gui.1.gz %{_mandir}/man1/%{name}.1.gz %{_datadir}/applications/%{name}.desktop %{_datadir}/appdata/%{name}.appdata.xml %{_sysconfdir}/bash_completion.d/ %{python_sitelib}/%{name} %{python_sitelib}/%{name}-%{version}%{prever}-py?.?.egg-info %files assistants %{_datadir}/%{name} %changelog * Wed Apr 16 2014 Jaromír Končický - 0.9.0-0.2.a2 - Use master tarball * Mon Apr 14 2014 Jaromír Končický - 0.9.0-0.1.a2 - Update to 0.9.0a2. * Mon Feb 10 2014 Jaromír Končický - 0.8.0-2 - Add several upstream fixes: When no assistants are installed, print pretty message instead of crashing Install dependencies for rhel's Fix some gui issues (project name not required when deps-only is selected) * Wed Dec 04 2013 Bohuslav Kabrda - 0.8.0-1 - Update to 0.8.0. - Don't create the /usr/local hierarchy, leave it up to users. * Wed Oct 02 2013 Bohuslav Kabrda - 0.7.0-1 - Update to 0.7.0. * Wed Aug 28 2013 Bohuslav Kabrda - 0.6.1-2 - Properly create and own the /usr/local hierarchy. * Wed Aug 28 2013 Bohuslav Kabrda - 0.6.1-1 - Update to 0.6.1. - Introduce gui, add its dependencies. * Sat Aug 03 2013 Fedora Release Engineering - 0.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Fri Jul 26 2013 Bohuslav Kabrda - 0.5.0-1 - Update to 0.5.0. - Regenerated patch0. * Wed Jul 17 2013 Petr Pisar - 0.4.0-3 - Perl 5.18 rebuild * Wed Jul 03 2013 Bohuslav Kabrda - 0.4.0-2 - Fix manpage typo, rhbz#980646. * Mon Jul 01 2013 Bohuslav Kabrda - 0.4.0-1 - Update to 0.4.0. * Wed May 15 2013 Bohuslav Kabrda - 0.3.1-1 - Update to 0.3.1. - Remove no longer needed dependencies (jinja2, plumbum). * Wed Mar 20 2013 Bohuslav Kabrda - 0.2.2-1 - Update to 0.2.2 because of minor bug in 0.2.1. * Wed Mar 20 2013 Bohuslav Kabrda - 0.2.1-1 - Update to devassistant 0.2.1. - Introduce bash completion script. * Mon Mar 18 2013 Bohuslav Kabrda - 0.2.0-1 - Update to devassistant 0.2.0. - Move assistants and snippets to %%{datadir}/%%{name}. - Introduce manpage. * Tue Mar 12 2013 Bohuslav Kabrda - 0.1.0-3 - Move templates to %%{_datadir}. * Tue Mar 12 2013 Bohuslav Kabrda - 0.1.0-2 - Use BR: python2-devel instead of python-devel. * Fri Mar 08 2013 Bohuslav Kabrda - 0.1.0-1 - Initial package.