/[packages]/updates/5/gimp/current/SPECS/gimp.spec
ViewVC logotype

Contents of /updates/5/gimp/current/SPECS/gimp.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30