scribus.spec 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. ##
  2. ## scribus.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: scribus
  27. Summary: Desktop Publishing Application
  28. URL: http://www.scribus.net/
  29. Vendor: Franz Schmid
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: EVAL
  33. Group: Editor
  34. License: GPL
  35. Version: 1.1.7
  36. Release: 20040829
  37. # list of sources
  38. Source0: http://web2.altmuehlnet.de/fschmid/scribus-%{version}.tar.gz
  39. Source1: http://web2.altmuehlnet.de/fschmid/scribus-i18n-en.tar.gz
  40. Patch0: scribus.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20040130, qt, freetype, libart
  45. BuildPreReq: ghostscript, png, jpeg, tiff, zlib, lcms, pkgconfig, make
  46. PreReq: OpenPKG, openpkg >= 20040130, qt, freetype, libart
  47. PreReq: ghostscript, png, jpeg, tiff, zlib, lcms, gimp
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. Scribus is a Layout program similar to QuarkXPress, Adobe® PageMaker,
  52. or Adobe® InDesign. It has the ability to layout newsletters, create
  53. corporate stationery, small posters and other documents which need
  54. flexible layout and/or the ability to output to professional quality
  55. imagesetting equipment. Graphic formats which can be placed include
  56. EPS, JPEG, PNG, and XPM. Scribus also offers more advanced professional
  57. publishing features, such as CMYK color, easy PDF creation, Encapsulated
  58. Postscript import/export and creation of color separations.
  59. %track
  60. prog scribus = {
  61. version = %{version}
  62. url = http://web2.altmuehlnet.de/fschmid/download.html
  63. regex = scribus-(\d+\.\d+(\.\d+)*).tar.gz
  64. }
  65. %prep
  66. %setup -q
  67. %setup -a1
  68. %patch -p0
  69. %{l_shtool} subst \
  70. -e 's;$(prefix);$(DESTDIR)$(prefix);' \
  71. scribus/Makefile.in \
  72. scribus/dicts/Makefile.in \
  73. scribus/icons/Makefile.in \
  74. scribus/profiles/Makefile.in \
  75. scribus/qm/Makefile.in \
  76. scribus/plugins/psimport/Makefile.in \
  77. scribus/plugins/fontpreview/Makefile.in \
  78. scribus/plugins/scriptplugin/doc/en/Makefile.in
  79. %{l_shtool} subst \
  80. -e 's;\(pluginsdir = \)$(DESTDIR)\($(prefix)\);\1\2;' \
  81. scribus/plugins/fontpreview/Makefile.in \
  82. scribus/plugins/psimport/Makefile.in \
  83. scribus/libpostscript/Makefile.in \
  84. scribus/libpdf/Makefile.in
  85. %{l_shtool} subst \
  86. -e 's;\([^=] *\)$(prefix);\1$(DESTDIR)$(prefix);' \
  87. scribus/libpostscript/Makefile.in \
  88. scribus/libpdf/Makefile.in
  89. %{l_shtool} subst \
  90. -e 's;\(LIBFREETYPE_LIBS =\).*;\1;' \
  91. `find . -name Makefile.in -print`
  92. %{l_shtool} subst \
  93. -e 's; ! -f $libstdcpp;;g' \
  94. -e 's;^\(jpeg_incdirs="\)[^"]*\("\);\1%{l_prefix}/include\2;' \
  95. configure
  96. %build
  97. # make dynamic plugins, but build statically again later
  98. mkdir libsdyn plugdyn
  99. CC="%{l_cc}" \
  100. CXX="%{l_cxx}" \
  101. CFLAGS="%{l_cflags -O} `%{l_prefix}/bin/pkg-config --cflags-only-other qt`" \
  102. CXXFLAGS="%{l_cxxflags -O} `%{l_prefix}/bin/pkg-config --cflags-only-other qt`" \
  103. CPPFLAGS="%{l_cppflags tiff} `%{l_prefix}/bin/pkg-config --cflags-only-I qt`" \
  104. LDFLAGS="%{l_ldflags} `%{l_prefix}/bin/pkg-config --libs-only-L qt`" \
  105. LIBS="$LIBS `%{l_prefix}/bin/pkg-config --libs-only-l --libs-only-other qt`" \
  106. ./configure \
  107. --prefix=%{l_prefix} \
  108. --disable-threading \
  109. --enable-shared \
  110. --disable-static \
  111. --with-x \
  112. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  113. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir`\
  114. --with-qt-dir=%{l_prefix} \
  115. --with-qt-includes=%{l_prefix}/include/qt/ \
  116. --with-qt-libraries=%{l_prefix}/lib/
  117. for buildir in libabout libpdf libpostscript libprefs
  118. do
  119. ( cd scribus/$buildir
  120. %{l_make} %{l_mflags -O} AM_LDFLAGS=""
  121. cp -f .libs/*.s[ol] ../../libsdyn
  122. %{l_make} %{l_mflags} distclean
  123. ) || exit $?
  124. done
  125. for buildir in fontpreview libchar pixmapexport \
  126. printpreview psimport svgexplugin svgimplugin
  127. do
  128. ( cd scribus/plugins/$buildir
  129. %{l_make} %{l_mflags -O} AM_LDFLAGS=""
  130. cp -f .libs/*.s[ol] ../../../plugdyn
  131. %{l_make} %{l_mflags} distclean
  132. ) || exit $?
  133. done
  134. # now make everything statically as we normally do
  135. CC="%{l_cc}" \
  136. CXX="%{l_cxx}" \
  137. CFLAGS="%{l_cflags -O} `%{l_prefix}/bin/pkg-config --cflags-only-other qt`" \
  138. CXXFLAGS="%{l_cxxflags -O} `%{l_prefix}/bin/pkg-config --cflags-only-other qt`" \
  139. CPPFLAGS="%{l_cppflags tiff} `%{l_prefix}/bin/pkg-config --cflags-only-I qt`" \
  140. LDFLAGS="%{l_ldflags} `%{l_prefix}/bin/pkg-config --libs-only-L qt`" \
  141. LIBS="$LIBS `%{l_prefix}/bin/pkg-config --libs-only-l --libs-only-other qt`" \
  142. ./configure \
  143. --prefix=%{l_prefix} \
  144. --disable-threading \
  145. --disable-shared \
  146. --enable-static \
  147. --with-x \
  148. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  149. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir`\
  150. --with-qt-dir=%{l_prefix} \
  151. --with-qt-includes=%{l_prefix}/include/qt/ \
  152. --with-qt-libraries=%{l_prefix}/lib/
  153. %{l_make} %{l_mflags -O}
  154. %install
  155. rm -rf $RPM_BUILD_ROOT
  156. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  157. %{l_shtool} install -c -m 755 \
  158. libsdyn/*.s[ol] \
  159. $RPM_BUILD_ROOT%{l_prefix}/lib/scribus/libs
  160. %{l_shtool} install -c -m 755 \
  161. plugdyn/*.s[ol] \
  162. $RPM_BUILD_ROOT%{l_prefix}/lib/scribus/plugins
  163. %{l_shtool} mkdir -f -p -m 755 \
  164. $RPM_BUILD_ROOT%{l_prefix}/share/scribus/doc
  165. mv -f scribus-i18n-en/docs/en $RPM_BUILD_ROOT%{l_prefix}/share/scribus/doc
  166. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  167. %files -f files
  168. %clean
  169. rm -rf $RPM_BUILD_ROOT