rpms/gimp/devel gimp-plugin-mgr.in,NONE,1.1 gimp.spec,1.106,1.107
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Aug 16 11:11:38 UTC 2006
- Previous message (by thread): rpms/openoffice.org/devel openoffice.org-2.0.4.ooo68665.x86_64gcj.jvm.patch, NONE, 1.1 openoffice.org.spec, 1.846, 1.847
- Next message (by thread): rpms/xsane/devel xsane.conf.in, NONE, 1.1 xsane.spec, 1.36, 1.37 xsane-install-gimp-plugin, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: nphilipp
Update of /cvs/dist/rpms/gimp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv28713
Modified Files:
gimp.spec
Added Files:
gimp-plugin-mgr.in
Log Message:
revamp scheme for integrating external plugins (#202545)
--- NEW FILE gimp-plugin-mgr.in ---
#!/bin/bash
shopt -s nullglob
GIMPTOOL="@GIMPTOOL@"
GIMPPLUGINDIR="`"$GIMPTOOL" --gimpplugindir`"
EXITVAL=0
showhelp () {
cat << EOF
Usage: gimp-plugin-mgr <mode> [<pluginname> [<pluginname> [...]]
Mode can be:
--install|-i: install plugin(s)
--uninstall|-u: uninstall plugin(s)
--help|-h: show this message
EOF
}
install_uninstall () {
local action="$1"
shift
local plugins="$@"
pushd "$GIMPPLUGINDIR/plug-ins" >&/dev/null
if [ "$plugins" == "*" ]; then
pushd "/etc/gimp/plugins.d" >&/dev/null
shopt -u nullglob
plugins=""
for file in *; do
plugins="$plugins ${file%.conf}"
done
shopt -s nullglob
popd >&/dev/null
fi
for plugin in $plugins; do
PLUGINFILE=
if [ ! -r "/etc/gimp/plugins.d/${plugin}.conf" ]; then
echo "gimp-plugin-mgr: can't read /etc/gimp/plugins.d/${plugin}.conf" >&2
EXITVAL=$(( $EXITVAL + 1 ))
continue
fi
. "/etc/gimp/plugins.d/${plugin}.conf"
case "$action" in
install)
if [ ! "$PLUGINFILE" ]; then
echo "gimp-plugin-mgr: PLUGINFILE not defined for $plugin" >&2
EXITVAL=$(( $EXITVAL + 1 ))
continue
fi
ln -snf "$PLUGINFILE" "$GIMPPLUGINDIR/plug-ins/$plugin"
;;
uninstall)
if [ ! -L "$GIMPPLUGINDIR/plug-ins/$plugin" ]; then
echo "gimp-plugin-mgr: $GIMPPLUGINDIR/plug-ins/$plugin not a symbolic link" >&2
EXITVAL=$(( $EXITVAL + 1 ))
continue
fi
rm -f "$plugin"
;;
esac
done
popd >&/dev/null
}
case "$1" in
--install|-i)
shift
install_uninstall install "$@"
;;
--uninstall|-u)
shift
install_uninstall uninstall "$@"
;;
*)
if [ "$1" != "--help" -a "$1" != "-h" ]; then
EXITVAL=1
fi
showhelp
;;
esac
exit $EXITVAL
Index: gimp.spec
===================================================================
RCS file: /cvs/dist/rpms/gimp/devel/gimp.spec,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -r1.106 -r1.107
--- gimp.spec 2 Aug 2006 14:52:50 -0000 1.106
+++ gimp.spec 16 Aug 2006 11:11:31 -0000 1.107
@@ -36,7 +36,7 @@
%define age 0
%define minorver 200
%define microver %(ver=%{version}; echo ${ver##*.*.})
-Release: 3%{?dist}
+Release: 4%{?dist}
Epoch: 2
License: GPL, LGPL
Group: Applications/Multimedia
@@ -71,7 +71,7 @@
BuildRequires: automake >= 1.7
BuildRequires: autoconf >= 2.54
BuildRequires: libtool >= 1.5
-BuildRequires: perl
+BuildRequires: sed
BuildRequires: libwmf-devel >= 0.2.8
BuildRequires: intltool
BuildRequires: gettext
@@ -90,6 +90,7 @@
Requires(postun): /usr/bin/update-desktop-database
Requires(postun): hicolor-icon-theme
Source0: ftp://ftp.gimp.org/pub/gimp/v%{binver}/gimp-%{version}.tar.bz2
+Source1: gimp-plugin-mgr.in
Patch0: gimp-2.0pre3-buildroot.patch
Patch1: gimp-2.0.1-gimphelpmissing.patch
Patch2: gimp-2.2.3-icontheme.patch
@@ -196,6 +197,9 @@
make %{?_smp_mflags}
+# convenience stuff for external plugins (e.g. xsane)
+sed -e 's|@GIMPTOOL@|%{_bindir}/gimptool-%{interfacever}|g' < %{SOURCE1} > gimp-plugin-mgr
+
%install
export PATH="$PATH:$PWD/bin"
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
@@ -252,24 +256,24 @@
ln -snf gimptool-%{interfacever}.1 %{buildroot}/%{_mandir}/man1/gimptool.1
%endif
+# convenience stuff for external plugins (e.g. xsane)
+mkdir -p %{buildroot}%{_sysconfdir}/gimp/plugins.d
+mkdir -p %{_sbindir}
+install -m 0755 gimp-plugin-mgr %{_sbindir}/gimp-plugin-mgr
+
%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
%post
/usr/bin/update-desktop-database %{_datadir}/applications
-if [ -x %{_sbindir}/xsane-install-gimp-plugin ]; then
- %{_sbindir}/xsane-install-gimp-plugin --install %{interfacever}
-fi
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi
+%{_sbindir}/gimp-plugin-mgr --install '*'
%preun
-# Do this always, because interfacever could be different
-if [ -x %{_sbindir}/xsane-install-gimp-plugin ]; then
- %{_sbindir}/xsane-install-gimp-plugin --uninstall %{interfacever}
-fi
+%{_sbindir}/gimp-plugin-mgr --uninstall '*'
%postun
if [ "$1" = "0" ]; then
@@ -321,6 +325,7 @@
%{_datadir}/gimp/%{interfacever}/themes/
%dir %{_sysconfdir}/gimp
+%dir %{_sysconfdir}/gimp/plugins.d
%dir %{_sysconfdir}/gimp/%{interfacever}
%config(noreplace) %{_sysconfdir}/gimp/%{interfacever}/controllerrc
%config(noreplace) %{_sysconfdir}/gimp/%{interfacever}/gimprc
@@ -337,6 +342,7 @@
%{_bindir}/gimp-%{binver}
%{_bindir}/gimp-remote-%{binver}
%{_bindir}/gimptool-%{interfacever}
+%{_sbindir}/gimp-plugin-mgr
#%{_bindir}/embedxpm
#%{_bindir}/escputil-%{interfacever}
@@ -396,6 +402,9 @@
%{_libdir}/pkgconfig/*
%changelog
+* Wed Aug 16 2006 Nils Philippsen <nphilipp at redhat.com> - 2:2.2.12-4
+- revamp scheme for integrating external plugins (#202545)
+
* Wed Aug 02 2006 Nils Philippsen <nphilipp at redhat.com> - 2:2.2.12-3
- allow spaces in filenames when saving (#200888, patch by Michael Natterer)
- Previous message (by thread): rpms/openoffice.org/devel openoffice.org-2.0.4.ooo68665.x86_64gcj.jvm.patch, NONE, 1.1 openoffice.org.spec, 1.846, 1.847
- Next message (by thread): rpms/xsane/devel xsane.conf.in, NONE, 1.1 xsane.spec, 1.36, 1.37 xsane-install-gimp-plugin, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list