gimp.spec.in 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. %define subver @GIMP_MAJOR_VERSION@.@GIMP_MINOR_VERSION@
  2. %define microver @GIMP_MICRO_VERSION@
  3. %define ver @VERSION@
  4. %define prefix /usr
  5. %define sysconfdir /etc
  6. Summary: The GNU Image Manipulation Program
  7. Name: gimp
  8. Version: %{ver}
  9. Release: 1
  10. Copyright: GPL, LGPL
  11. Group: Applications/Graphics
  12. URL: http://www.gimp.org/
  13. BuildRoot: %{_tmppath}/%{name}-%{ver}-root
  14. Docdir: %{prefix}/doc
  15. Prefix: %{prefix}
  16. Obsoletes: gimp-data-min
  17. Obsoletes: gimp-libgimp
  18. Requires: gtk+ >= 2.0.0
  19. Source: ftp://ftp.gimp.org/pub/gimp/v%{subver}/%{name}-%{ver}.tar.bz2
  20. %description
  21. The GIMP (GNU Image Manipulation Program) is a powerful image
  22. composition and editing program, which can be extremely useful for
  23. creating logos and other graphics for Web pages. The GIMP has many of
  24. the tools and filters you would expect to find in similar commercial
  25. offerings, and some interesting extras as well. The GIMP provides a
  26. large image manipulation toolbox, including channel operations and
  27. layers, effects, sub-pixel imaging and anti-aliasing, and conversions,
  28. all with multi-level undo.
  29. The GIMP includes a scripting facility, but many of the included
  30. scripts rely on fonts that we cannot distribute. The GIMP FTP site
  31. has a package of fonts that you can install by yourself, which
  32. includes all the fonts needed to run the included scripts. Some of
  33. the fonts have unusual licensing requirements; all the licenses are
  34. documented in the package. Get
  35. ftp://ftp.gimp.org/pub/gimp/fonts/freefonts-0.10.tar.gz and
  36. ftp://ftp.gimp.org/pub/gimp/fonts/sharefonts-0.10.tar.gz if you are so
  37. inclined. Alternatively, choose fonts which exist on your system
  38. before running the scripts.
  39. Install the GIMP if you need a powerful image manipulation
  40. program. You may also want to install other GIMP packages:
  41. gimp-libgimp if you're going to use any GIMP plug-ins and
  42. gimp-data-extras, which includes various extra files for the GIMP.
  43. %package devel
  44. Summary: GIMP plugin and extension development kit
  45. Group: Applications/Graphics
  46. Requires: gtk+-devel
  47. %description devel
  48. The gimp-devel package contains the static libraries and header files
  49. for writing GNU Image Manipulation Program (GIMP) plug-ins and
  50. extensions.
  51. Install gimp-devel if you're going to create plug-ins and/or
  52. extensions for the GIMP. You'll also need to install gimp-limpgimp
  53. and gimp, and you may want to install gimp-data-extras.
  54. %prep
  55. %setup -q
  56. %build
  57. %ifarch alpha
  58. MYARCH_FLAGS="--host=alpha-redhat-linux"
  59. %endif
  60. if [ ! -f configure ]; then
  61. CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --quiet $MYARCH_FLAGS --prefix=%{prefix}
  62. else
  63. CFLAGS="$RPM_OPT_FLAGS" %configure --quiet
  64. fi
  65. if [ "$SMP" != "" ]; then
  66. (make "MAKE=make -k -j $SMP"; exit 0)
  67. make
  68. else
  69. make
  70. fi
  71. %install
  72. [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
  73. mkdir -p $RPM_BUILD_ROOT/%{prefix}/info $RPM_BUILD_ROOT/%{prefix}/include \
  74. $RPM_BUILD_ROOT/%{prefix}/lib $RPM_BUILD_ROOT/%{prefix}/bin
  75. make prefix=$RPM_BUILD_ROOT/%{prefix} PREFIX=$RPM_BUILD_ROOT/%{prefix} install
  76. # Strip the executables
  77. strip $RPM_BUILD_ROOT/%{prefix}/bin/gimp
  78. # Only strip execuable files and leave scripts alone.
  79. strip `file $RPM_BUILD_ROOT/%{prefix}/lib/gimp/%{subver}/plug-ins/* | grep ELF | cut -d':' -f 1`
  80. # Compress down the online documentation.
  81. if [ -d $RPM_BUILD_ROOT/%{prefix}/man ]; then
  82. find $RPM_BUILD_ROOT/%{prefix}/man -type f -exec gzip -9nf {} \;
  83. fi
  84. #
  85. # Plugins and modules change often (grab the executeable ones)
  86. #
  87. echo "%defattr (0555, bin, bin)" > gimp-plugin-files
  88. find $RPM_BUILD_ROOT/%{prefix}/lib/gimp/%{subver} -type f -exec file {} \; | cut -d':' -f 1 | sed "s@^$RPM_BUILD_ROOT@@g" >>gimp-plugin-files
  89. #
  90. # Auto detect the lang files.
  91. #
  92. if [ -f /usr/lib/rpm/find-lang.sh ] ; then
  93. /usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT %{name}
  94. /usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT gimp-libgimp
  95. /usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT gimp-std-plugins
  96. /usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT gimp-script-fu
  97. cat %{name}.lang gimp-libgimp gimp-std-plugins.lang gimp-script-fu.lang \
  98. | sed "s:(644, root, root, 755):(444, bin, bin, 555):" > gimp-all.lang
  99. fi
  100. #
  101. # Tips
  102. #
  103. echo "%defattr (444, bin, bin, 555)" >gimp-tips-files
  104. echo "%{prefix}/share/gimp/%{subver}/tips/gimp_tips.txt" >> gimp-tips-files
  105. for I in `ls $RPM_BUILD_ROOT/%{prefix}/share/gimp/%{subver}/tips/gimp*.[a-z]*.txt | sed "s@^$RPM_BUILD_ROOT/@@g"`; do
  106. tip_lang=`basename $I | cut -d'.' -f2`
  107. echo "%lang($tip_lang) $I" >> gimp-tips-files
  108. done
  109. #
  110. # Build the master filelists generated from the above mess.
  111. #
  112. cat gimp-plugin-files gimp-all.lang gimp-tips-files > gimp.files
  113. %clean
  114. [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
  115. %post -p /sbin/ldconfig
  116. %postun -p /sbin/ldconfig
  117. %files -f gimp.files
  118. %attr (0555, bin, man) %doc AUTHORS COPYING ChangeLog MAINTAINERS NEWS README TODO
  119. %attr (0555, bin, man) %doc docs/*.txt docs/*.eps ABOUT-NLS README.i18n README.win32 TODO
  120. %defattr (0444, bin, bin, 0555)
  121. %dir %{prefix}/share/gimp/%{subver}
  122. %dir %{prefix}/share/gimp/%{subver}/tips
  123. %dir %{prefix}/lib/gimp/%{subver}
  124. %dir %{prefix}/lib/gimp/%{subver}/modules
  125. %dir %{prefix}/lib/gimp/%{subver}/plug-ins
  126. %{prefix}/share/gimp/%{subver}/brushes/
  127. %{prefix}/share/gimp/%{subver}/fractalexplorer/
  128. %{prefix}/share/gimp/%{subver}/gfig/
  129. %{prefix}/share/gimp/%{subver}/gflare/
  130. %{prefix}/share/gimp/%{subver}/gimpressionist/
  131. %{prefix}/share/gimp/%{subver}/gradients/
  132. %{prefix}/share/gimp/%{subver}/help/
  133. %{prefix}/share/gimp/%{subver}/palettes/
  134. %{prefix}/share/gimp/%{subver}/patterns/
  135. %{prefix}/share/gimp/%{subver}/scripts/
  136. %{sysconfdir}/gimp/%{subver}/gimprc
  137. %{sysconfdir}/gimp/%{subver}/gimprc_user
  138. %{sysconfdir}/gimp/%{subver}/gtkrc
  139. %{sysconfdir}/gimp/%{subver}/gtkrc_user
  140. %{sysconfdir}/gimp/%{subver}/unitrc
  141. %{sysconfdir}/gimp/%{subver}/ps-menurc
  142. %{prefix}/share/gimp/%{subver}/gimp_logo.ppm
  143. %{prefix}/share/gimp/%{subver}/gimp_splash.ppm
  144. %defattr (0555, bin, bin)
  145. %{prefix}/share/gimp/%{subver}/user_install
  146. %{prefix}/lib/libgimp-%{subver}.so.%{microver}.0.0
  147. %{prefix}/lib/libgimp-%{subver}.so.%{microver}
  148. %{prefix}/lib/libgimpui-%{subver}.so.%{microver}.0.0
  149. %{prefix}/lib/libgimpui-%{subver}.so.%{microver}
  150. %{prefix}/lib/libgck-%{subver}.so.%{microver}.0.0
  151. %{prefix}/lib/libgck-%{subver}.so.%{microver}
  152. %{prefix}/bin/gimp
  153. %{prefix}/bin/gimp-remote
  154. %{prefix}/bin/embedxpm
  155. %{prefix}/bin/gimpdoc
  156. %{prefix}/bin/xcftopnm
  157. %defattr (0444, bin, man)
  158. %{prefix}/man/man1/gimp.1*
  159. %{prefix}/man/man1/gimp-remote.1*
  160. %{prefix}/man/man5/gimprc.5*
  161. %{prefix}/man/man1/
  162. %files devel
  163. %defattr (0555, bin, bin, 0555)
  164. %{prefix}/bin/gimptool
  165. %{prefix}/bin/gimp-config
  166. %{prefix}/lib/*.so
  167. %{prefix}/lib/*.la
  168. %dir %{prefix}/lib/gimp/%{subver}
  169. %dir %{prefix}/lib/gimp/%{subver}/modules
  170. %{prefix}/lib/gimp/%{subver}/modules/*.la
  171. %defattr (0444, root, root, 0555)
  172. %{prefix}/share/aclocal/gimp.m4
  173. %{prefix}/lib/*.a
  174. %{prefix}/lib/gimp/%{subver}/modules/*.a
  175. %{prefix}/include/libgimp/
  176. %{prefix}/include/gck/
  177. %{prefix}/man/man1/gimptool.1*
  178. %changelog
  179. * Fri Apr 14 2000 Matt Wilson <msw@redhat.com>
  180. - include subdirs in the help find
  181. - remove gimp-help-files generation
  182. - both gimp and gimp-perl own prefix/lib/gimp/1.1/plug-ins
  183. - both gimp and gimp-devel own prefix/lib/gimp/1.1 and
  184. prefix/lib/gimp/1.1/modules
  185. * Thu Apr 13 2000 Matt Wilson <msw@redhat.com>
  186. - 1.1.19
  187. - get all .mo files
  188. * Wed Jan 19 2000 Gregory McLean <gregm@comstar.net>
  189. - Version 1.1.15
  190. * Wed Dec 22 1999 Gregory McLean <gregm@comstar.net>
  191. - Version 1.1.14
  192. - Added some auto %files section generation scriptlets