| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- ##
- ## gimp.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
- ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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.0
- %define V_minor 4
- # package information
- Name: gimp
- Summary: GNU Image Manipulation Program
- URL: http://www.gimp.org/
- Vendor: Peter Mattis, Spencer Kimball
- Packager: The OpenPKG Project
- Distribution: OpenPKG
- Class: PLUS
- Group: Graphics
- License: GPL
- Version: %{V_major}.%{V_minor}
- Release: 20040806
- # 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
- 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 = (?<!\w)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_prefix}/etc/rc --query x11_incdir` \
- --x-libraries=`%{l_prefix}/etc/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 $?
- ( cd $RPM_BUILD_ROOT%{l_prefix}/man/man1
- rm -f gimp.1; mv gimp-[0-9].[0-9]*.1 gimp.1
- rm -f gimptool.1; mv gimptool-[0-9].[0-9]*.1 gimptool.1
- rm -f gimp-remote.1; mv gimp-remote-[0-9].[0-9]*.1 gimp-remote.1
- ) || exit $?
- ( cd $RPM_BUILD_ROOT%{l_prefix}/man/man5
- rm -f gimprc.5; mv gimprc-[0-9].[0-9]*.5 gimprc.5
- ) || 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
|