OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 03-Apr-2004 15:15:11 Branch: HEAD Handle: 2004040314151100 Modified files: openpkg-src/gimp gimp.spec Log: reduce output binary package from 350MB to 17MB by leveraging shared libraries. This implicitly also removes the problems that the plugins complain during loading that they cannot resolve symbols Summary: Revision Changes Path 1.45 +34 -9 openpkg-src/gimp/gimp.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/gimp/gimp.spec ============================================================================ $ cvs diff -u -r1.44 -r1.45 gimp.spec --- openpkg-src/gimp/gimp.spec 3 Apr 2004 07:41:57 -0000 1.44 +++ openpkg-src/gimp/gimp.spec 3 Apr 2004 13:15:11 -0000 1.45 @@ -46,10 +46,10 @@ # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20040130, libiconv, gtk2, glib2, gcc -BuildPreReq: tiff, jpeg, png, xpm, zlib, make, pkgconfig -PreReq: OpenPKG, openpkg >= 20040130, libiconv, gtk2, glib2 -PreReq: tiff, jpeg, png, xpm, zlib +BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig +PreReq: OpenPKG, openpkg >= 20040130 +BuildPreReq: libiconv, gtk2, glib2, tiff, jpeg, png, xpm, zlib +PreReq: libiconv, gtk2, glib2, tiff, jpeg, png, xpm, zlib AutoReq: no AutoReqProv: no @@ -71,6 +71,7 @@ %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}" \ @@ -78,22 +79,29 @@ LIBS="-lpangoft2" \ ./configure \ --prefix=%{l_prefix} \ - --disable-shared \ - --enable-static \ --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 \ - --disable-print + --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" - rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/lib*.so* + + # 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 @@ -108,7 +116,24 @@ ( cd $RPM_BUILD_ROOT%{l_prefix}/man/man5 rm -f gimprc.5; mv gimprc-[0-9].[0-9]*.5 gimprc.5 ) || exit $? - strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + + # 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+\"[EMAIL PROTECTED]"}" + ) >$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 @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]