get rid of obsolete gimp-plugin-mgr fix typos

This commit is contained in:
Nils Philippsen 2010-06-23 11:58:53 +00:00
parent d828a486e8
commit 5452f12633
2 changed files with 6 additions and 108 deletions

View File

@ -1,79 +0,0 @@
#!/bin/bash
shopt -s nullglob
GIMPPLUGINDIR="@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
plugins=""
for file in *; do
plugins="$plugins ${file%.conf}"
done
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

View File

@ -31,7 +31,7 @@ Summary: GNU Image Manipulation Program
Name: gimp
Epoch: 2
Version: 2.6.8
Release: 9%{?dist}
Release: 10%{?dist}
%define binver 2.6
%define gimp_lang_ver 20
%define interfacever 2.0
@ -117,7 +117,6 @@ Requires: xdg-utils
Requires: gimp-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Source0: ftp://ftp.gimp.org/pub/gimp/v%{binver}/gimp-%{version}.tar.bz2
Source1: gimp-plugin-mgr.in
# distro specific: use xdg-open instead of firefox as web browser
Patch0: gimp-2.6.2-xdg-open.patch
# https://bugzilla.gnome.org/show_bug.cgi?id=559081
@ -276,9 +275,6 @@ LDFLAGS='-pie'
make %{?_smp_mflags}
# convenience stuff for external plugins (e.g. xsane)
sed -e 's|@GIMPPLUGINDIR@|%{_libdir}/gimp/%{interfacever}|g' < %{SOURCE1} > gimp-plugin-mgr
%install
rm -rf %{buildroot}
@ -342,35 +338,15 @@ ln -snf gimptool-%{interfacever}.1 %{buildroot}%{_mandir}/man1/gimptool.1
ln -snf gimprc-%{binver}.5 %{buildroot}/%{_mandir}/man5/gimprc.5
%endif
# convenience stuff for external plugins (e.g. xsane)
mkdir -p %{buildroot}%{_sysconfdir}/gimp/plugins.d
mkdir -p %{buildroot}%{_sbindir}
install -m 0755 gimp-plugin-mgr %{buildroot}%{_sbindir}/gimp-plugin-mgr
%clean
rm -rf %{buildroot}
%pre
# First, remove old symlinks which are possibly in an old location (before a
# major version update)
if [ -x "%{_sbindir}/gimp-plugin-mgr" ]; then
%{_sbindir}/gimp-plugin-mgr --uninstall '*' || :
fi
%post
/usr/bin/update-desktop-database %{_datadir}/applications &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
# Then re-add the symlinks
%{_sbindir}/gimp-plugin-mgr --install '*' || :
%preun
# Only delete symlinks when uninstalling
if [ "$1" = "0" ]; then
%{_sbindir}/gimp-plugin-mgr --uninstall '*' || :
fi
%postun
if [ "$1" = "0" ]; then
@ -419,7 +395,6 @@ fi
%{_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
@ -433,7 +408,6 @@ fi
%{_bindir}/gimp-%{binver}
%{_bindir}/gimp-remote-%{binver}
%{_bindir}/gimp-console-%{binver}
%{_sbindir}/gimp-plugin-mgr
%if %{with convenience}
%{_bindir}/gimp
@ -513,8 +487,11 @@ fi
%{_libdir}/gimp/%{interfacever}/plug-ins/help-browser
%changelog
* Tue Jun 22 2010 Matthias Clasen <mclasen@redhat.com> - 2:26.8-9
- Rebuilda against new poppler
* Wed Jun 23 2010 Nils Philippsen <nils@redhat.com> - 2:2.6.8-10
- get rid of obsolete gimp-plugin-mgr
* Tue Jun 22 2010 Matthias Clasen <mclasen@redhat.com> - 2:2.6.8-9
- Rebuild against new poppler
* Fri Jun 18 2010 Nils Philippsen <nils@redhat.com> - 2:2.6.8-8
- backport fix for saving indexed PNM files (#605615)