%define doc_license %{nil} %define doc_license 1 %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} < 7 %define doc_license 0 %endif %else %if 0%{?fedora} < 19 %define doc_license 0 %endif %endif %endif %define license_file LICENSE.txt %define python2_package python2 %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} <= 7 %define python2_package python %endif %else %if 0%{?fedora} <= 25 %define python2_package python %endif %endif %endif %define python3_package python%{python3_pkgversion} Name: wxGlade Version: 0.7.2 Release: 5%{?dist} Summary: A wxWidgets/wxPython/wxPerl GUI designer License: MIT URL: http://wxglade.sourceforge.net Source0: http://downloads.sourceforge.net/project/wxglade/wxglade/%{version}/%{name}-%{version}.tar.gz Source1: wxglade.desktop Source2: wxglade.png BuildArch: noarch BuildRequires: desktop-file-utils BuildRequires: %{python2_package}-devel BuildRequires: %{python2_package}-setuptools Requires: wxPython >= 2.8 %description wxGlade is a GUI designer written in Python with the popular GUI toolkit wxPython, that helps you create wxWidgets/wxPython user interfaces. At the moment it can generate Python, C++, Perl and XRC (wxWidgets' XML resources) code. Starting from version 0.7.0, wxGlade requires wxPython >= 2.8 and Python >= 2.4 and <= 2.7. %prep %setup -q %build %{__python2} setup.py build %install %{__python2} setup.py install --prefix="%{_prefix}" -O1 --skip-build --root="%{buildroot}" # Let's handle licenses by ourselves. rm -frv "%{buildroot}%{_docdir}/wxglade/LICENSE.txt" # Install desktop related entries desktop-file-install --dir="%{buildroot}%{_datadir}/applications" "%{S:1}" install -pm 755 -d "%{buildroot}%{_datadir}/icons/hicolor/32x32/apps" install -pm 644 "%{S:2}" "%{buildroot}%{_datadir}/icons/hicolor/32x32/apps" %post touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null || : %postun if [ $1 -eq 0 ] ; then touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : fi %posttrans gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : %files %{_docdir}/wxglade/ %if 0%{?doc_license} %license %{license_file} %else %doc %{license_file} %endif %{_bindir}/wxglade* %{_datadir}/icons/hicolor/*x*/apps/* %{_datadir}/applications/* %{_datadir}/wxglade %{_mandir}/man1/wxglade.1* %{python2_sitelib}/wxglade/ %{python2_sitelib}/%{name}-%{version}-py%{python2_version}.egg-info %changelog * Fri Oct 27 2017 Tomasz Tomasik - 0.7.2-5 - Add a few changes to the SPEC file - Rebuilt for EL7 * Thu Jul 27 2017 Fedora Release Engineering - 0.7.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.7.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Tue Jul 19 2016 Fedora Release Engineering - 0.7.2-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Tue Apr 12 2016 Sérgio Basto - 0.7.2-1 - Update wxGlade to 0.7.2 . - Fix URL of Source0 . - Better document dir handling . * Fri Feb 05 2016 Fedora Release Engineering - 0.7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Jan 21 2015 Christopher Meng - 0.7.0-1 - Update to 0.7.0 * Sun Jun 08 2014 Fedora Release Engineering - 0.6.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed Sep 11 2013 Christopher Meng - 0.6.8-1 - New version(BZ#1006631) with major cleanup/rewrite. - Fix unversioned docdir issue(BZ#993886). - Fix old version bug(BZ#948782). * Sun Aug 04 2013 Fedora Release Engineering - 0.6.3tip20100625-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sun Feb 10 2013 Parag Nemade - 0.6.3tip20100625-6 - Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077 - Cleanup spec as per recently changed packaging guidelines * Sun Jul 22 2012 Fedora Release Engineering - 0.6.3tip20100625-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Sat Jan 14 2012 Fedora Release Engineering - 0.6.3tip20100625-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Mon Feb 07 2011 Fedora Release Engineering - 0.6.3tip20100625-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Aug 11 2010 David Malcolm - 0.6.3tip20100625-2 - recompiling .py files against Python 2.7 (rhbz#623417) * Fri Jun 25 2010 ZC Miao - 0.6.3tip20100625-1 - update to tip20100625 * Sun Jun 6 2010 ZC Miao - 0.6.3tip20091130-2 - update source * Mon Nov 30 2009 ZC Miao - 0.6.3tip20091130-1 - update to tip version * Mon Jul 27 2009 Fedora Release Engineering - 0.6.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Wed Feb 25 2009 Fedora Release Engineering - 0.6.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat May 24 2008 ZC Miao - 0.6.3-2 - update to 0.6.3 * Sat Nov 24 2007 ZC Miao - 0.6.1-1 - update to 0.6.1 - remove docs path patch, add a docs symlink instead * Thu Jul 19 2007 ZC Miao - 0.5-6 - 248795 , patch for launch help docs correctly * Mon Apr 16 2007 ZC Miao - 0.5-5 - update to fix EVR problem * Sun Apr 15 2007 ZC Miao - 0.5-2 - file permissions with install command * Sun Apr 15 2007 ZC Miao - 0.5-1 - update to 0.5 - launch script with quoted $@ - name to wxGlade * Tue Feb 27 2007 ZC Miao - 0.4.1-3 - Desktop entry do not need version number - remove some comments * Sun Feb 25 2007 ZC Miao - 0.4.1-2 - install icon to hicolor directory - change name to wxglade - BuildRequires desktop-file-utils - remove Application category in desktop file - remove some macro redefination * Fri Feb 16 2007 ZC Miao - 0.4.1-2 - Add missing icons * Fri Feb 16 2007 ZC Miao - 0.4.1-1 - update to 0.4.1 * Wed Oct 27 2004 Alberto Griggio 0.3.5-1 - Updated to version 0.3.5 * Wed Mar 10 2004 Alberto Griggio 0.3.4-1 - Updated to version 0.3.4 * Wed Mar 10 2004 Alberto Griggio 0.3.2-1 - Updated to version 0.3.2 * Tue Sep 02 2003 Alberto Griggio 0.3.1-1 - Updated to version 0.3.1 * Fri Aug 29 2003 Robin Dunn 0.3-5 - Initial version