gimp.spec 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. ##
  2. ## gimp.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 version
  26. %define V_major 2.0
  27. %define V_minor 4
  28. # package information
  29. Name: gimp
  30. Summary: GNU Image Manipulation Program
  31. URL: http://www.gimp.org/
  32. Vendor: Peter Mattis, Spencer Kimball
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG
  35. Class: PLUS
  36. Group: Graphics
  37. License: GPL
  38. Version: %{V_major}.%{V_minor}
  39. Release: 20040806
  40. # list of sources
  41. Source0: ftp://ftp.gimp.org/pub/gimp/v%{V_major}/gimp-%{version}.tar.bz2
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig
  46. PreReq: OpenPKG, openpkg >= 20040130
  47. BuildPreReq: glib2, gtk2, pango, fontconfig, freetype, gettext, libiconv
  48. PreReq: glib2, gtk2, pango, fontconfig, freetype, gettext, libiconv
  49. BuildPreReq: tiff, jpeg, png, mng, zlib, xpm, aalib, libwmf, libart
  50. PreReq: tiff, jpeg, png, mng, zlib, xpm, aalib, libwmf, libart
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. The GIMP is the GNU Image Manipulation Program. It is a freely
  55. distributed piece of software suitable for such tasks as photo
  56. retouching, image composition and image authoring.
  57. %track
  58. prog gimp = {
  59. version = %{version}
  60. url = ftp://ftp.gimp.org/pub/gimp/
  61. regex = (?<!\w)v(2\.[024])
  62. url = ftp://ftp.gimp.org/pub/gimp/v__NEWVER__/
  63. regex = gimp-(__VER__)\.tar\.bz2
  64. }
  65. %prep
  66. %setup -q
  67. %build
  68. # configure program
  69. CC="%{l_cc} %{l_cppflags tiff gtk2 glib2}" \
  70. CFLAGS="%{l_cflags -O} %{l_cppflags tiff gtk2 glib2}" \
  71. CPPFLAGS="%{l_cppflags tiff gtk2 glib2}" \
  72. LDFLAGS="%{l_ldflags}" \
  73. LIBS="-lm -ljpeg" \
  74. ./configure \
  75. --prefix=%{l_prefix} \
  76. --with-x \
  77. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  78. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  79. --with-gimpdir=.gimp \
  80. --with-html-dir=%{l_prefix}/share/gimp/doc \
  81. --with-libtiff \
  82. --with-libjpeg \
  83. --with-libpng \
  84. --with-libmng \
  85. --with-aa \
  86. --without-libexif \
  87. --disable-print \
  88. --disable-static \
  89. --enable-shared
  90. # build program
  91. %{l_make} %{l_mflags}
  92. %install
  93. # install program
  94. rm -rf $RPM_BUILD_ROOT
  95. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  96. # strip down installation
  97. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/aclocal
  98. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
  99. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  100. # adjust filesystem paths
  101. ( cd $RPM_BUILD_ROOT%{l_prefix}/bin
  102. rm -f gimp; mv gimp-[0-9].[0-9]* gimp
  103. rm -f gimptool; mv gimptool-[0-9].[0-9]* gimptool
  104. rm -f gimp-remote; mv gimp-remote-[0-9].[0-9]* gimp-remote
  105. rm -f gimp-config; ln gimptool gimp-config
  106. ) || exit $?
  107. ( cd $RPM_BUILD_ROOT%{l_prefix}/man/man1
  108. rm -f gimp.1; mv gimp-[0-9].[0-9]*.1 gimp.1
  109. rm -f gimptool.1; mv gimptool-[0-9].[0-9]*.1 gimptool.1
  110. rm -f gimp-remote.1; mv gimp-remote-[0-9].[0-9]*.1 gimp-remote.1
  111. ) || exit $?
  112. ( cd $RPM_BUILD_ROOT%{l_prefix}/man/man5
  113. rm -f gimprc.5; mv gimprc-[0-9].[0-9]*.5 gimprc.5
  114. ) || exit $?
  115. # wrap executables for DSO run-time environment
  116. mv $RPM_BUILD_ROOT%{l_prefix}/lib/lib* \
  117. $RPM_BUILD_ROOT%{l_prefix}/lib/gimp/
  118. %{l_shtool} mkdir -f -p -m 755 \
  119. $RPM_BUILD_ROOT%{l_prefix}/libexec/gimp
  120. for bin in gimp gimptool gimp-remote gimp-config; do
  121. mv $RPM_BUILD_ROOT%{l_prefix}/bin/$bin \
  122. $RPM_BUILD_ROOT%{l_prefix}/libexec/gimp/$bin
  123. ( echo "#!/bin/sh"
  124. echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib/gimp:/usr/lib:/lib\""
  125. echo "export LD_LIBRARY_PATH"
  126. echo "exec %{l_prefix}/libexec/gimp/$bin \${1+\"\$@\"}"
  127. ) >$RPM_BUILD_ROOT%{l_prefix}/bin/$bin
  128. chmod a+x $RPM_BUILD_ROOT%{l_prefix}/bin/$bin
  129. done
  130. # determine installation files
  131. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  132. %files -f files
  133. %clean
  134. rm -rf $RPM_BUILD_ROOT