Blob Blame History Raw
%global upstream_name PythonQt2.1_Qt4.8

Name:           pythonqt
Version:        2.1
Release:        7%{?dist}
Summary:        Lightweight script binding of the Qt framework to the Python language
Group:          System Environment/Libraries
License:        LGPLv2
URL:            http://pythonqt.sourceforge.net
Source0:        http://downloads.sourceforge.net/pythonqt/%{upstream_name}.zip
# There is Python-2.7 in Fedora, not Python-2.6
Patch0:         pythonqt-2.1-python27.patch
# Patch in the "make install" command
Patch1:         pythonqt-2.1-install.patch
BuildRequires:  python2-devel
BuildRequires:  qt4-devel
BuildRequires:  qtwebkit-devel
BuildRequires:  phonon-devel

%description
PythonQt is a dynamic and lightweight script binding of the Qt framework
to the Python language. It can be easily embedded into Qt applications and
makes any QObject derived object scriptable via Python without the need of
wrapper code generation.

%package devel
Summary:        Lightweight script binding of the Qt framework to the Python language
Group:          Development/Libraries
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description devel
Header files and development libraries for pythonqt package. PythonQt
is a dynamic and lightweight script binding of the Qt framework
to the Python language. 

%prep
%setup -q -n %{upstream_name}
%patch0 -p1 -b .python27
%patch1 -p1 -b .install

# Fix README end-of-line encoding
sed -i 's/\r//' README

%build
qmake-qt4 -config verbose "VERSION=%{version}" \
    "LIB_INSTALL=%{buildroot}%{_libdir}" \
    "HEADER_INSTALL=%{buildroot}%{_includedir}/PythonQt" \
    "QMAKE_LFLAGS_SHLIB *= -Wl,--as-needed" \
    "QMAKE_CXXFLAGS_RELEASE *= -fno-strict-aliasing"
make %{_smp_mflags}

%install
make install

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%doc README COPYING
%{_libdir}/libPythonQt.so.*
%{_libdir}/libPythonQt_QtAll.so.*

%files devel
%{_includedir}/PythonQt
%{_libdir}/libPythonQt.so
%{_libdir}/libPythonQt_QtAll.so

%changelog
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.1-6
- Rebuilt for GCC 5 C++11 ABI change

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Mon Jun 10 2013 Jan Kaluza <jkaluza@redhat.com> - 2.1-2
- improve devel package description
- add --as-needed to linker flags
- compile with -fno-strict-aliasing to workaround Python
  bug http://www.python.org/dev/peps/pep-3123/

* Wed Jun 05 2013 Jan Kaluza <jkaluza@redhat.com> - 2.1-1
- Initial Fedora packaging