qtscriptgenerator-vl.spec 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. %define qt4_ver 4.8.0
  2. # Qt4 version auto-detection
  3. %define _qt4_version %(pkg-config --modversion --silence-errors Qt 2>/dev/null || echo %{qt4_ver})
  4. %define _qt4_prefix %(pkg-config --variable prefix --silence-errors Qt 2>/dev/null || echo %{_libdir}/qt4)
  5. %define _qt4_bindir %(pkg-config --variable bindir --silence-errors Qt 2>/dev/null || echo %{_qt4_prefix}/bin)
  6. %define _qt4_headerdir %(pkg-config --variable headerdir --silence-errors Qt 2>/dev/null || echo %{_includedir})
  7. %define _qt4_plugindir %(pkg-config --variable plugindir --silence-errors Qt 2>/dev/null || echo %{_qt4_prefix}/plugins)
  8. %define _qt4_qmake %(pkg-config --variable qmake --silence-errors Qt 2>/dev/null || echo %{_qt4_bindir}/qmake)
  9. Name: qtscriptgenerator
  10. Summary: A tool to generate Qt bindings for Qt Script
  11. Version: 0.1.0
  12. Release: 15%{?_dist_release}
  13. Group: System Environment/Libraries
  14. License: GPLv2
  15. URL: http://code.google.com/p/qtscriptgenerator/
  16. Source0: http://qtscriptgenerator.googlecode.com/files/qtscriptgenerator-src-%{version}.tar.gz
  17. Patch1: qtscriptgenerator-0.1.0-gcc44.patch
  18. Patch2: qtscriptgenerator-src-0.1.0-no_phonon.patch
  19. Patch3: qtscriptgenerator-src-0.1.0-no_QFileOpenEvent.patch
  20. ## upstreamable patches
  21. Patch50: qtscriptgenerator-src-0.1.0-qmake_target.path.patch
  22. Patch51: qtscriptgenerator-kde_phonon443.patch
  23. ## debian patches
  24. Patch60: memory_alignment_fix.diff
  25. ## upstream patches
  26. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  27. # explictly BR libxslt, for xsltproc
  28. BuildRequires: libxslt
  29. BuildRequires: phonon-devel >= 4.4.2-2%{?_dist_release}
  30. BuildRequires: qt4-devel >= 4.5.0-7
  31. #BuildRequires: qt4-webkit-devel
  32. # not strictly required, but the expectation would be for the
  33. # bindings to be present
  34. Requires: qtscriptbindings = %{version}-%{release}
  35. %description
  36. Qt Script Generator is a tool to generate Qt bindings for Qt Script.
  37. %package -n qtscriptbindings
  38. Summary: Qt bindings for Qt Script
  39. Group: System Environment/Libraries
  40. Requires: qt4 >= %{_qt4_version}
  41. Provides: qtscript-qt = %{version}-%{release}
  42. %description -n qtscriptbindings
  43. Bindings providing access to substantial portions of the Qt API
  44. from within Qt Script.
  45. %prep
  46. %setup -q -n %{name}-src-%{version}
  47. %patch1 -p0 -b .gcc44
  48. %patch2 -p1 -b .no_phonon
  49. %patch3 -p1 -b .no_QFileOpenEvent
  50. %patch50 -p1 -b .qmake_target.path
  51. %patch51 -p1 -b .kde_phonon
  52. %patch60 -p1 -b .memory_alignment
  53. %build
  54. # workaround buildsys bogosity, see also:
  55. # http://code.google.com/p/qtscriptgenerator/issues/detail?id=38
  56. export INCLUDE=%{_qt4_headerdir}
  57. pushd generator
  58. %{_qt4_qmake}
  59. make %{?_smp_mflags}
  60. ./generator
  61. popd
  62. pushd qtbindings
  63. %{_qt4_qmake}
  64. make %{?_smp_mflags}
  65. popd
  66. pushd tools/qsexec/src
  67. %{_qt4_qmake}
  68. make %{?_smp_mflags}
  69. popd
  70. %install
  71. rm -rf %{buildroot}
  72. mkdir -p %{buildroot}%{_qt4_plugindir}/script/
  73. # install doesn't do symlinks
  74. cp -a plugins/script/libqtscript* \
  75. %{buildroot}%{_qt4_plugindir}/script/
  76. cp -a tools/qsexec/README.TXT README.qsexec
  77. install -D -p -m755 tools/qsexec/qsexec %{buildroot}%{_bindir}/qsexec
  78. install -D -p -m755 generator/generator %{buildroot}%{_qt4_bindir}/generator
  79. %clean
  80. rm -rf %{buildroot}
  81. %files
  82. %defattr(-,root,root,-)
  83. %{_qt4_bindir}/generator
  84. %files -n qtscriptbindings
  85. %defattr(-,root,root,-)
  86. %doc README LICENSE.GPL
  87. %doc README.qsexec
  88. %doc doc/
  89. %doc examples/
  90. %{_bindir}/qsexec
  91. %{_qt4_plugindir}/script/libqtscript*
  92. %changelog
  93. * Mon Jan 9 2012 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.1.0-15
  94. - rebuilt with qt-4.8.0
  95. - added Patch3
  96. * Sun Mar 13 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.1.0-14
  97. - rebuilt with qt-4.7.2
  98. - added Patch1
  99. * Sun Oct 17 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.1.0-13
  100. - initial build for Vine Linux
  101. * Sat May 08 2010 Rex Dieter <rdieter@fedoraproject.org> - 0.1.0-12
  102. - BR: qt4-webkit-devel
  103. * Mon Mar 01 2010 Rex Dieter <rdieter@fedoraproject.org> - 0.1.0-11
  104. - borrow memory_alignment_fix.diff from debian (should help arm/sparc)
  105. * Wed Nov 18 2009 Rex Dieter <rdieter@fedoraproject.org> - 0.1.0-10
  106. - rebuild (qt-4.6.0-rc1, fc13+)
  107. * Mon Oct 19 2009 Rex Dieter <rdieter@fedoraproject.org> - 0.1.0-9
  108. - fix build (for qt-4.6.0/phonon-isms)
  109. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-8
  110. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  111. * Tue Jun 09 2009 Rex Dieter <rdieter@fedoraproject.org> 0.1.0-7
  112. - upstream sun_issue27 patch
  113. * Fri Apr 10 2009 Rex Dieter <rdieter@fedoraproject.org> 0.1.0-6
  114. - qtscriptbindings: Provides: qtscript-qt ...
  115. * Tue Mar 24 2009 Rex Dieter <rdieter@fedoraproject.org> 0.1.0-5
  116. - qtscriptgenerator/qtscriptbindings pkgs
  117. - qtscriptbindings: include docs, examples
  118. * Mon Mar 23 2009 Rex Dieter <rdieter@fedoraproject.org> 0.1.0-4
  119. - include qsexec
  120. * Mon Mar 23 2009 Rex Dieter <rdieter@fedoraproject.org> 0.1.0-3
  121. - BR: phonon-devel
  122. * Fri Mar 20 2009 Rex Dieter <rdieter@fedoraproject.org> 0.1.0-2
  123. - qt-4.5.0-7 fixed wrt phonon, drop no_phonon patch
  124. * Fri Mar 06 2009 Rex Dieter <rdieter@fedoraproject.org> 0.1.0-1
  125. - first try