/[packages]/cauldron/gimp/current/SPECS/gimp.spec
ViewVC logotype

Annotation of /cauldron/gimp/current/SPECS/gimp.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 24820 - (hide annotations) (download)
Wed Jan 19 21:44:22 2011 UTC (13 years, 3 months ago) by ahmad
File size: 9068 byte(s)
imported package gimp
1 ahmad 24820 %define name gimp
2     %define version 2.6.11
3     %define release %mkrel 3
4     %define lib_major 0
5    
6     # optional compile flags
7     %define enable_python 1
8     %{?_without_python: %global enable_python 0}
9    
10     %define enable_lzw 0
11     %{?_with_lzw: %global enable_lzw 1}
12    
13     %define req_gtk_version 2.12.1
14    
15     %define api_version 2.0
16     %define abi_version 2.6
17     %define libname %mklibname %{name} %{api_version}_%{lib_major}
18     %define devlibname %mklibname -d %{name}%{api_version}
19    
20     Summary: The GNU Image Manipulation Program
21     Name: %name
22     Epoch: 1
23     Version: %{version}
24     Release: %{release}
25     License: GPLv2+
26     Group: Graphics
27     URL: http://www.gimp.org/
28     BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
29    
30     Source0: ftp://ftp.gimp.org/pub/gimp/v%{abi_version}/gimp-%version.tar.bz2
31     Source1: ftp://ftp.gimp.org/pub/gimp/v%{abi_version}/gimp-%version.tar.bz2.md5
32     Source13: gimp-scripting-sample.pl
33     Patch0: gimp-2.6.4-fix-str-fmt.patch
34     Patch1: gimp-2.6.4-fix-linking.patch
35     #gw fix name in desktop file and disable startup notification
36     Patch6: gimp-2.5.1-desktopentry.patch
37     BuildRequires: libxfixes-devel
38     BuildRequires: gegl-devel >= 0.0.18
39     BuildRequires: imagemagick
40     BuildRequires: aalib-devel
41     BuildRequires: gtk-doc >= 1.11-3mdv
42     BuildRequires: libexif-devel
43     BuildRequires: libart_lgpl-devel
44     BuildRequires: libgtk+2.0-devel >= %{req_gtk_version}
45     BuildRequires: libgnomeui2-devel
46     BuildRequires: libalsa-devel
47     %if %{mdkversion} >= 200800
48     BuildRequires: libpoppler-glib-devel >= 0.4.1
49     %endif
50     BuildRequires: libmng-devel
51     BuildRequires: libpng-devel
52     BuildRequires: libtiff-devel
53     BuildRequires: perl
54     BuildRequires: xpm-devel
55     BuildRequires: librsvg-devel >= 2.14.0
56     BuildRequires: libxmu-devel
57     BuildRequires: intltool
58     # mail plugin
59     BuildRequires: sendmail-command
60     # help browser
61     BuildRequires: libwebkitgtk-devel
62     # print plugin
63     #BuildRequires: libgimpprint-devel >= 4.2.0
64     # python plugin
65     %if %enable_python
66     BuildRequires: pygtk2.0-devel >= 2.10.4
67     BuildRequires: python-devel
68     %endif
69     BuildRequires: automake
70     BuildRequires: lcms-devel
71     BuildRequires: libwmf-devel >= 0.2.8
72     BuildRequires: libhal-devel
73     BuildRequires: libxext-devel
74     BuildRequires: desktop-file-utils
75     %if %{mdkversion} <= 200800
76     BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
77     %endif
78     Provides: gimp1_3 gimp2_0 gimp2_2 gimp2.6
79     Obsoletes: gimp1_3 gimp2_0 gimp2_2 gimp2.6
80     # workaround libgimp not bumping its major on API/ABI changes:
81     Requires: %{libname} = %epoch:%{version}
82     Requires(post): desktop-file-utils
83     Requires(postun): desktop-file-utils
84     Conflicts: perl-Gimp < 2.2
85     Conflicts: gutenprint-gimp2 < 5.0.1
86     Suggests: gimp-help-2
87    
88     %description
89     The GIMP is an image manipulation program suitable for photo retouching,
90     image composition and image authoring. Many people find it extremely useful
91     in creating logos and other graphics for web pages. The GIMP has many of the
92     tools and filters you would expect to find in similar commercial offerings,
93     and some interesting extras as well.
94    
95     The GIMP provides a large image manipulation toolbox, including channel
96     operations and layers, effects, sub-pixel imaging and anti-aliasing,
97     and conversions, all with multi-level undo.
98    
99     This version of The GIMP includes a scripting facility, but many of the
100     included scripts rely on fonts that we cannot distribute. The GIMP ftp
101     site has a package of fonts that you can install by yourself, which
102     includes all the fonts needed to run the included scripts. Some of the
103     fonts have unusual licensing requirements; all the licenses are documented
104     in the package. Get them in ftp://ftp.gimp.org/pub/gimp/fonts/ if you are so
105     inclined. Alternatively, choose fonts which exist on your system before
106     running the scripts.
107    
108     Build Options:
109     --without python Disable pygimp (default enabled)
110     --with lzw Enable LZW compression in GIF (default disabled)
111    
112     %package -n %{devlibname}
113     Summary: GIMP plugin and extension development kit
114     Group: Development/GNOME and GTK+
115     Requires: libgtk+2.0-devel >= %{req_gtk_version}
116     Epoch: 1
117     License: LGPLv2+
118     Requires: %{libname} = %epoch:%{version}
119     Provides: gimp-devel = %{version}-%{release}
120     Provides: gimp2.6-devel = %{version}-%{release}
121     Provides: libgimp-devel = %{version}-%{release}
122    
123     %description -n %{devlibname}
124     Static libraries and header files for writing GIMP plugins and extensions.
125    
126     %package -n %libname
127     Summary: GIMP libraries
128     Group: System/Libraries
129     Epoch: 1
130     License: LGPLv2+
131     Provides: libgimp%{api_version} = %{version}-%{release}
132     Obsoletes: %mklibname gimp 2.6_2.0_0
133    
134     %description -n %libname
135     This is the library that provides core GIMP functionality.
136     It enable other programs to use GIMP's features but is mainly intended
137     to be used by the GIMP and its "external" plugins.
138    
139     %package python
140     Summary: GIMP python extension
141     Group: Graphics
142     Epoch: 1
143     Requires: pygtk2.0
144     Obsoletes: gimp1_3-python, gimp2_0-python, gimp2_2-python
145    
146     %description python
147     This package contains the python modules for GIMP, which act as a
148     wrapper to libgimp allowing the writing of plug-ins for Gimp.
149     This is similar to script-fu, except that you can use the full set
150     of Python extension modules from the plug-in, and you write plug-in
151     in python instead of in scheme.
152    
153     %prep
154     %setup -q -n gimp-%version
155     %patch0 -p1 -b .fix-str-fmt
156     %patch1 -p1 -b .fix-linking
157     %patch6 -p1 -b .desktopentry
158    
159     #needed by patch1
160     autoreconf -fi -I m4macros
161    
162     %build
163    
164     %configure2_5x --enable-default-binary=yes \
165     --enable-mp=yes \
166     %if %enable_python
167     --enable-python=yes \
168     %else
169     --enable-python=no \
170     %endif
171     %if %enable_lzw
172     --with-gif-compression=lzw \
173     %else
174     --with-gif-compression=rle \
175     %endif
176     --enable-gtk-doc=yes
177    
178     %make
179    
180     %install
181     rm -fr $RPM_BUILD_ROOT
182    
183     %makeinstall_std
184    
185     #clean unpackaged files
186     rm -f $RPM_BUILD_ROOT%{_libdir}/gimp/%{api_version}/*/*.a
187     find %buildroot -name \*la|xargs chmod 644
188    
189     # workaround broken help system
190     HELP_DIR=$RPM_BUILD_ROOT%_datadir/gimp/%api_version/help/C
191     [[ -d $HELP_DIR ]] || mkdir -p $HELP_DIR
192     HELP_IDX=$HELP_DIR/introduction.html
193     echo -e '<HTML><HEAD><TITLE>GIMP Base Library</HEAD>\n<BODY><UL>' > $HELP_IDX
194    
195     /bin/ls $RPM_BUILD_ROOT%_datadir/gtk-doc/html/*/index.html | sed -e "s@$RPM_BUILD_ROOT@@g" >> $HELP_IDX
196     perl -pi -e 's!(.*/html/)([^/]*)(/index.html)!<LI><A HREF="\1\2\3">\2</A>!g' $HELP_IDX
197    
198     echo '</UL></BODY></HTML>' >> $HELP_IDX
199    
200     %find_lang gimp20 --all-name
201    
202     %if %enable_python
203     chmod 755 %buildroot%_libdir/gimp/%{api_version}/plug-ins/*.py
204     mkdir -p %{buildroot}%{_libdir}/python%{pyver}/site-packages
205     echo %_libdir/gimp/%{api_version}/python > %{buildroot}%{_libdir}/python%{pyver}/site-packages/gimp.pth
206     echo %_libdir/gimp/%{api_version}/plug-ins >> %{buildroot}%{_libdir}/python%{pyver}/site-packages/gimp.pth
207     %endif
208    
209     desktop-file-install --vendor="" \
210     --add-category="X-MandrivaLinux-CrossDesktop" \
211     --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/*
212    
213     %clean
214     rm -rf $RPM_BUILD_ROOT
215    
216     %if %mdkversion < 200900
217     %post
218     %update_desktop_database
219     %update_icon_cache hicolor
220     %update_menus
221     %endif
222    
223     %if %mdkversion < 200900
224     %postun
225     %clean_desktop_database
226     %clean_icon_cache hicolor
227     %clean_menus
228     %endif
229    
230     %if %mdkversion < 200900
231     %post -n %libname -p /sbin/ldconfig
232     %endif
233     %if %mdkversion < 200900
234     %postun -n %libname -p /sbin/ldconfig
235     %endif
236    
237     %files -f gimp20.lang
238     %defattr(-,root,root,0755)
239     %{_bindir}/gimp
240     %{_bindir}/gimp-%abi_version
241     %{_bindir}/gimp-console
242     %{_bindir}/gimp-console-%abi_version
243     %{_datadir}/applications/*
244     %{_datadir}/gimp
245     %dir %{_libdir}/gimp/%{api_version}
246     %dir %{_libdir}/gimp/%{api_version}/environ
247     %{_libdir}/gimp/%{api_version}/interpreters
248     %{_libdir}/gimp/%{api_version}/environ/default.env
249     %{_libdir}/gimp/%{api_version}/modules
250     %{_libdir}/gimp/%{api_version}/plug-ins
251     %exclude %{_libdir}/gimp/%{api_version}/plug-ins/*.py
252     %{_mandir}/man1/gimp*
253     %{_mandir}/man5/gimp*
254     %_datadir/icons/hicolor/*/apps/gimp.png
255     %_datadir/icons/hicolor/scalable/apps/gimp.svg
256     %config(noreplace) %{_sysconfdir}/gimp
257    
258     %doc AUTHORS NEWS README README.i18n docs/Wilber*
259    
260     %files -n %{devlibname}
261     %defattr(-,root,root,0755)
262     %doc ChangeLog
263     %doc %{_datadir}/gtk-doc/html/*
264     %{_bindir}/gimptool-*
265     %{_datadir}/aclocal/*.m4
266     %{_includedir}/*
267     %{_libdir}/lib*.la
268     %{_libdir}/lib*.so
269     %{_libdir}/pkgconfig/*
270     %{_mandir}/man1/gimptool-*
271    
272     %files -n %libname
273     %defattr(-,root,root,755)
274     # explicitly list all libs to avoid old libtool issue
275     %{_libdir}/libgimpconfig-%{api_version}.so.%{lib_major}*
276     %{_libdir}/libgimp-%{api_version}.so.%{lib_major}*
277     %{_libdir}/libgimpthumb-%{api_version}.so.%{lib_major}*
278     %{_libdir}/libgimpbase-%{api_version}.so.%{lib_major}*
279     %{_libdir}/libgimpcolor-%{api_version}.so.%{lib_major}*
280     %{_libdir}/libgimpmath-%{api_version}.so.%{lib_major}*
281     %{_libdir}/libgimpmodule-%{api_version}.so.%{lib_major}*
282     %{_libdir}/libgimpui-%{api_version}.so.%{lib_major}*
283     %{_libdir}/libgimpwidgets-%{api_version}.so.%{lib_major}*
284    
285     %if %enable_python
286     %files python
287     %defattr(-,root,root,755)
288     %{_libdir}/gimp/%{api_version}/environ/pygimp.env
289     %{_libdir}/gimp/%{api_version}/python
290     %{_libdir}/gimp/%{api_version}/plug-ins/*.py
291     %{_libdir}/python%{pyver}/site-packages/*.pth
292     %endif
293    
294    

  ViewVC Help
Powered by ViewVC 1.1.30