You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
142 lines
4.9 KiB
142 lines
4.9 KiB
## |
|
## gimp.spec -- OpenPKG RPM Package Specification |
|
## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/> |
|
## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/> |
|
## |
|
## Permission to use, copy, modify, and distribute this software for |
|
## any purpose with or without fee is hereby granted, provided that |
|
## the above copyright notice and this permission notice appear in all |
|
## copies. |
|
## |
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
## SUCH DAMAGE. |
|
## |
|
|
|
# package version |
|
%define V_major 2.2 |
|
%define V_minor 13 |
|
|
|
# package information |
|
Name: gimp |
|
Summary: GNU Image Manipulation Program |
|
URL: http://www.gimp.org/ |
|
Vendor: Peter Mattis, Spencer Kimball |
|
Packager: OpenPKG Foundation e.V. |
|
Distribution: OpenPKG Community |
|
Class: PLUS |
|
Group: Graphics |
|
License: GPL |
|
Version: %{V_major}.%{V_minor} |
|
Release: 20061013 |
|
|
|
# list of sources |
|
Source0: ftp://ftp.gimp.org/pub/gimp/v%{V_major}/gimp-%{version}.tar.bz2 |
|
|
|
# build information |
|
Prefix: %{l_prefix} |
|
BuildRoot: %{l_buildroot} |
|
BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig, perl, perl-xml |
|
PreReq: OpenPKG, openpkg >= 20040130 |
|
BuildPreReq: glib2, gtk2, pango, fontconfig, freetype, gettext, libiconv |
|
PreReq: glib2, gtk2, pango, fontconfig, freetype, gettext, libiconv |
|
BuildPreReq: tiff, jpeg, png, mng, zlib, xpm, aalib, libwmf, libart |
|
PreReq: tiff, jpeg, png, mng, zlib, xpm, aalib, libwmf, libart |
|
AutoReq: no |
|
AutoReqProv: no |
|
|
|
%description |
|
The GIMP is the GNU Image Manipulation Program. It is a freely |
|
distributed piece of software suitable for such tasks as photo |
|
retouching, image composition and image authoring. |
|
|
|
%track |
|
prog gimp = { |
|
version = %{version} |
|
url = ftp://ftp.gimp.org/pub/gimp/ |
|
regex = v(2\.[024]) |
|
url = ftp://ftp.gimp.org/pub/gimp/v__NEWVER__/ |
|
regex = gimp-(__VER__)\.tar\.bz2 |
|
} |
|
|
|
%prep |
|
%setup -q |
|
|
|
%build |
|
# configure program |
|
CC="%{l_cc} %{l_cppflags tiff gtk2 glib2}" \ |
|
CFLAGS="%{l_cflags -O} %{l_cppflags tiff gtk2 glib2}" \ |
|
CPPFLAGS="%{l_cppflags tiff gtk2 glib2}" \ |
|
LDFLAGS="%{l_ldflags}" \ |
|
LIBS="-lm -ljpeg" \ |
|
./configure \ |
|
--prefix=%{l_prefix} \ |
|
--with-x \ |
|
--x-includes=`%{l_rc} --query x11_incdir` \ |
|
--x-libraries=`%{l_rc} --query x11_libdir` \ |
|
--with-gimpdir=.gimp \ |
|
--with-html-dir=%{l_prefix}/share/gimp/doc \ |
|
--with-libtiff \ |
|
--with-libjpeg \ |
|
--with-libpng \ |
|
--with-libmng \ |
|
--with-aa \ |
|
--without-libexif \ |
|
--disable-print \ |
|
--disable-static \ |
|
--enable-shared |
|
|
|
# build program |
|
%{l_make} %{l_mflags} |
|
|
|
%install |
|
# install program |
|
rm -rf $RPM_BUILD_ROOT |
|
%{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
|
|
|
# strip down installation |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/aclocal |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale |
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
|
|
|
# adjust filesystem paths |
|
( cd $RPM_BUILD_ROOT%{l_prefix}/bin |
|
rm -f gimp; mv gimp-[0-9].[0-9]* gimp |
|
rm -f gimptool; mv gimptool-[0-9].[0-9]* gimptool |
|
rm -f gimp-remote; mv gimp-remote-[0-9].[0-9]* gimp-remote |
|
rm -f gimp-config; ln gimptool gimp-config |
|
) || exit $? |
|
|
|
# wrap executables for DSO run-time environment |
|
mv $RPM_BUILD_ROOT%{l_prefix}/lib/lib* \ |
|
$RPM_BUILD_ROOT%{l_prefix}/lib/gimp/ |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/gimp |
|
for bin in gimp gimptool gimp-remote gimp-config; do |
|
mv $RPM_BUILD_ROOT%{l_prefix}/bin/$bin \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/gimp/$bin |
|
( echo "#!/bin/sh" |
|
echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib/gimp:/usr/lib:/lib\"" |
|
echo "export LD_LIBRARY_PATH" |
|
echo "exec %{l_prefix}/libexec/gimp/$bin \${1+\"\$@\"}" |
|
) >$RPM_BUILD_ROOT%{l_prefix}/bin/$bin |
|
chmod a+x $RPM_BUILD_ROOT%{l_prefix}/bin/$bin |
|
done |
|
|
|
# determine installation files |
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
|
|
|
%files -f files |
|
|
|
%clean |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
|