Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > de132fa8fb629cf4c5b517c541886adc > files > 1

mingw32-qwt-5.2.0-3.fc13.src.rpm

%global name1 qwt
%global name2 %{name1}5

Name:           mingw32-%{name1}
Summary:        MinGW Windows Qwt library
Version:        5.2.0
Release:        3%{?dist}
URL:            http://qwt.sourceforge.net
License:        LGPLv2 with exceptions
Group:          Development/Libraries
Source:         http://downloads.sourceforge.net/%{name1}/%{name1}-%{version}.tar.bz2
Patch0:         qwt-path.patch
Patch1:         qwt-qhash.patch
BuildRequires:  mingw32-filesystem >= 52
BuildRequires:  mingw32-qt
BuildRequires:  mingw32-gcc-c++
Buildroot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

%description
MinGW Windows Qwt library.


%global _use_internal_dependency_generator 0
%global __find_requires %{_mingw32_findrequires}
%global __find_provides %{_mingw32_findprovides}

%global __strip %{_mingw32_strip}
%global __objdump %{_mingw32_objdump}

%define __debug_install_post %{_mingw32_debug_install_post}

%{_mingw32_debug_package}

%prep
%setup -qn %{name1}-%{version}
%patch0 -p1
%patch1 -p0 -b .qhash
sed -i "s\LIBPATH\ $RPM_BUILD_ROOT%{_mingw32_libdir}\1" qwtconfig.pri
sed -i "s\HEADERPATH\ $RPM_BUILD_ROOT%{_mingw32_includedir}/%{name1}\1" qwtconfig.pri
sed -i "s\DOCKPATH\ $RPM_BUILD_ROOT%{_mingw32_docdir}/%{name1}\1" qwtconfig.pri
#sed -i "s\QTDESIGNERPATH\ $RPM_BUILD_ROOT%{_qt4_plugindir}/designer\1" designer/designer.pro
sed -i "s\QTDESIGNERPATH\ $RPM_BUILD_ROOT%{_mingw32_libdir}/qt4/plugins/designer\1" designer/designer.pro
#disable Designer
sed -i "s\CONFIG *+= *QwtDesigner\#CONFIG += QwtDesigner\1" qwtconfig.pri
#disable Examples
sed -i "s\CONFIG *+= *QwtExamples\#CONFIG += QwtExamples\1" qwtconfig.pri
#enable debug and release
sed -i "s\ *CONFIG *+= *release\#CONFIG += release\1" qwtconfig.pri
sed -i "s\ *#CONFIG *+= *debug_and_release\CONFIG += debug_and_release\1" qwtconfig.pri


%build
export QMAKESPEC=fedora-win32-cross
qmake-qt4 -win32 QT_LIBINFIX=4
#parallel build fails sometime so I disable it
make
pushd src
perl -i -pe 's,4d,d4,g' Makefile.Debug
make debug
popd

%install
rm -rf $RPM_BUILD_ROOT
make install
#remove unneeded stuff
rm -rf $RPM_BUILD_ROOT%{_mingw32_docdir}/%{name1}
%{__install} -d $RPM_BUILD_ROOT%{_mingw32_bindir}
%{__mv} $RPM_BUILD_ROOT%{_mingw32_libdir}/%{name2}.dll $RPM_BUILD_ROOT%{_mingw32_bindir}/
%{__cp} lib/%{name1}d5.dll $RPM_BUILD_ROOT%{_mingw32_bindir}/
%{__cp} lib/lib%{name1}d5.a $RPM_BUILD_ROOT%{_mingw32_libdir}/


%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc CHANGES
%doc COPYING
%doc README
%{_mingw32_bindir}/%{name2}.dll
%{_mingw32_bindir}/%{name1}d5.dll
%{_mingw32_includedir}/%{name1}
%{_mingw32_libdir}/lib%{name2}.a
%{_mingw32_libdir}/lib%{name1}d5.a

%changelog
* Sat Feb 13 2010 Thomas Sailer <t.sailer@alumni.ethz.ch> - 5.2.0-3
- qt 4.6.1 compile workaround

* Wed Dec  2 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 5.2.0-2
- qt 4.6.0 compile workarounds

* Tue Nov 24 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 5.2.0-1
- update to 5.2.0

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Jun 22 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 5.1.1-8
- add debuginfo packages

* Thu Apr 16 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 5.1.1-7
- replace %%define with %%global

* Mon Mar 16 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 5.1.1-6
- actually fix the source line as required by the reviewer
- remove commented out designer files in files section

* Mon Mar 16 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 5.1.1-5
- fix missing BR

* Fri Mar 13 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 5.1.1-4
- enable debug build

* Wed Mar 11 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 5.1.1-3
- copied from native qwt