From 3e44f2668539630504278a8c574df5256c8b3f23aaf7f129060c20d550c69b11 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 25 Aug 2010 20:02:56 +0000 Subject: [PATCH 1/3] Accepting request 46226 from home:vuntz:branches:GNOME:Factory Copy from home:vuntz:branches:GNOME:Factory/hicolor-icon-theme via accept of submit request 46226 revision 4. Request was accepted with message: Looks fine. All we need now is lint warnings telling us when an icon is installed, and the macros not used... OBS-URL: https://build.opensuse.org/request/show/46226 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/hicolor-icon-theme?expand=0&rev=17 --- hicolor-icon-theme-rpmlintrc | 1 + hicolor-icon-theme.changes | 11 +++++++ hicolor-icon-theme.spec | 10 ++++++ macros.hicolor | 63 ++++++++++++++++++++++++++++++++++++ ready | 0 5 files changed, 85 insertions(+) create mode 100644 hicolor-icon-theme-rpmlintrc create mode 100644 macros.hicolor delete mode 100644 ready diff --git a/hicolor-icon-theme-rpmlintrc b/hicolor-icon-theme-rpmlintrc new file mode 100644 index 0000000..9cae743 --- /dev/null +++ b/hicolor-icon-theme-rpmlintrc @@ -0,0 +1 @@ +addFilter(".*ghost-files-without-postin") diff --git a/hicolor-icon-theme.changes b/hicolor-icon-theme.changes index 85dc81d..253c420 100644 --- a/hicolor-icon-theme.changes +++ b/hicolor-icon-theme.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Aug 25 15:06:12 CEST 2010 - vuntz@opensuse.org + +- Add rpm macros to update icon themes. +- Add a %ghost file for the hicolor icon cache, but since this + package actually doesn't contain any icon, do not do anything in + %post/%postun: this will be done by packages installing icons in + the hicolor icon theme. +- Add a rpmlintrc file to suppress the ghost-files-without-postin + warning which is wrong in this specific case. + ------------------------------------------------------------------- Thu Jan 14 05:22:00 CET 2010 - captain.magnus@opensuse.org diff --git a/hicolor-icon-theme.spec b/hicolor-icon-theme.spec index 9b799b0..0b30ad9 100644 --- a/hicolor-icon-theme.spec +++ b/hicolor-icon-theme.spec @@ -26,6 +26,8 @@ Version: 0.12 Release: 1 Url: http://icon-theme.freedesktop.org/wiki/HicolorTheme Source: %{name}-%{version}.tar.bz2 +Source1: macros.hicolor +Source99: %{name}-rpmlintrc # PATCH-FIX-UPSTREAM hicolor-scalable-sizes.patch fdo25449 vuntz@opensuse.org -- Add some MinSize for scalable, since the icons won't look that good at small sizes Patch1: hicolor-scalable-sizes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -45,14 +47,22 @@ theme specification. %install %makeinstall +touch %{buildroot}%{_datadir}/icons/hicolor/icon-theme.cache chmod -x COPYING +# Install rpm macros +install -D -m644 %{S:1} %{buildroot}%{_sysconfdir}/rpm/macros.hicolor %clean rm -rf %{buildroot} +# No %post/%postun: there are actually no icons in this package. It's just the +# directory structure. + %files %defattr(-, root, root) %doc COPYING ChangeLog README +%ghost %{_datadir}/icons/hicolor/icon-theme.cache %{_datadir}/icons/hicolor/ +%{_sysconfdir}/rpm/macros.hicolor %changelog diff --git a/macros.hicolor b/macros.hicolor new file mode 100644 index 0000000..b4177aa --- /dev/null +++ b/macros.hicolor @@ -0,0 +1,63 @@ +# RPM macros for packages installing icons or a whole icon theme +# +### +# +# When a package installs icons (or a whole icon theme), it should use +# both macros: +# +# - %icon_theme_cache_post in %post +# - %icon_theme_cache_postun in %postun +# +# Additionally, if a package installs a whole icon theme, it should use +# this macro: +# +# - %icon_theme_cache_create_ghost in %install +# +# This macro takes the name of an icon theme as argument. The +# icon-theme.cache created this way should be added with %ghost in the +# file list. +# +# Note that %icon_theme_cache_post and %icon_theme_cache_postun can +# optionally take the name of the icon theme where icons are installed. +# This is useful for packages containing a whole icon theme. If no +# argument is passed, the hicolor icon theme is assumed (which is where +# applications usually install their icons). +# +### + +%icon_theme_cache_create_ghost() \ +if test "x%1" == "x%%1"; then \ + echo "Missing argument in call to %%icon_theme_cache_create_ghost." \ + false \ +fi \ +mkdir -p "%{buildroot}%{_datadir}/icons/%1" \ +touch "%{buildroot}%{_datadir}/icons/%1/icon-theme.cache" + +# On install, update the icon cache +%icon_theme_cache_post() \ +%if "x%1" != "x%%1" \ + ICON_THEME="%1" \ +%else \ + ICON_THEME="hicolor" \ +%endif \ +if test -x /usr/bin/gtk-update-icon-cache; then \ + /usr/bin/gtk-update-icon-cache --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true \ +elif test -x /usr/bin/gtk-update-icon-cache-3.0; then \ + /usr/bin/gtk-update-icon-cache-3.0 --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true \ +fi + +# On uninstall, update the icon cache. Note: we ignore upgrades (already +# handled in %post of the new package). +%icon_theme_cache_postun() \ +if [ $1 -eq 0 ]; then \ + %if "x%1" != "x%%1" \ + ICON_THEME="%1" \ + %else \ + ICON_THEME="hicolor" \ + %endif \ + if test -x /usr/bin/gtk-update-icon-cache; then \ + /usr/bin/gtk-update-icon-cache --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true \ + elif test -x /usr/bin/gtk-update-icon-cache-3.0; then \ + /usr/bin/gtk-update-icon-cache-3.0 --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true \ + fi \ +fi diff --git a/ready b/ready deleted file mode 100644 index 473a0f4..0000000 From 1c3e54ac2bfb38dee8a4bf5421e2085915e0ed2459f40845eccd8861ca39351b Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 27 Aug 2010 15:11:39 +0000 Subject: [PATCH 2/3] Accepting request 46345 from GNOME:Factory checked in (request 46345) OBS-URL: https://build.opensuse.org/request/show/46345 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/hicolor-icon-theme?expand=0&rev=18 --- hicolor-icon-theme-rpmlintrc | 1 - hicolor-icon-theme.changes | 11 ------- hicolor-icon-theme.spec | 10 ------ macros.hicolor | 63 ------------------------------------ 4 files changed, 85 deletions(-) delete mode 100644 hicolor-icon-theme-rpmlintrc delete mode 100644 macros.hicolor diff --git a/hicolor-icon-theme-rpmlintrc b/hicolor-icon-theme-rpmlintrc deleted file mode 100644 index 9cae743..0000000 --- a/hicolor-icon-theme-rpmlintrc +++ /dev/null @@ -1 +0,0 @@ -addFilter(".*ghost-files-without-postin") diff --git a/hicolor-icon-theme.changes b/hicolor-icon-theme.changes index 253c420..85dc81d 100644 --- a/hicolor-icon-theme.changes +++ b/hicolor-icon-theme.changes @@ -1,14 +1,3 @@ -------------------------------------------------------------------- -Wed Aug 25 15:06:12 CEST 2010 - vuntz@opensuse.org - -- Add rpm macros to update icon themes. -- Add a %ghost file for the hicolor icon cache, but since this - package actually doesn't contain any icon, do not do anything in - %post/%postun: this will be done by packages installing icons in - the hicolor icon theme. -- Add a rpmlintrc file to suppress the ghost-files-without-postin - warning which is wrong in this specific case. - ------------------------------------------------------------------- Thu Jan 14 05:22:00 CET 2010 - captain.magnus@opensuse.org diff --git a/hicolor-icon-theme.spec b/hicolor-icon-theme.spec index 0b30ad9..9b799b0 100644 --- a/hicolor-icon-theme.spec +++ b/hicolor-icon-theme.spec @@ -26,8 +26,6 @@ Version: 0.12 Release: 1 Url: http://icon-theme.freedesktop.org/wiki/HicolorTheme Source: %{name}-%{version}.tar.bz2 -Source1: macros.hicolor -Source99: %{name}-rpmlintrc # PATCH-FIX-UPSTREAM hicolor-scalable-sizes.patch fdo25449 vuntz@opensuse.org -- Add some MinSize for scalable, since the icons won't look that good at small sizes Patch1: hicolor-scalable-sizes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -47,22 +45,14 @@ theme specification. %install %makeinstall -touch %{buildroot}%{_datadir}/icons/hicolor/icon-theme.cache chmod -x COPYING -# Install rpm macros -install -D -m644 %{S:1} %{buildroot}%{_sysconfdir}/rpm/macros.hicolor %clean rm -rf %{buildroot} -# No %post/%postun: there are actually no icons in this package. It's just the -# directory structure. - %files %defattr(-, root, root) %doc COPYING ChangeLog README -%ghost %{_datadir}/icons/hicolor/icon-theme.cache %{_datadir}/icons/hicolor/ -%{_sysconfdir}/rpm/macros.hicolor %changelog diff --git a/macros.hicolor b/macros.hicolor deleted file mode 100644 index b4177aa..0000000 --- a/macros.hicolor +++ /dev/null @@ -1,63 +0,0 @@ -# RPM macros for packages installing icons or a whole icon theme -# -### -# -# When a package installs icons (or a whole icon theme), it should use -# both macros: -# -# - %icon_theme_cache_post in %post -# - %icon_theme_cache_postun in %postun -# -# Additionally, if a package installs a whole icon theme, it should use -# this macro: -# -# - %icon_theme_cache_create_ghost in %install -# -# This macro takes the name of an icon theme as argument. The -# icon-theme.cache created this way should be added with %ghost in the -# file list. -# -# Note that %icon_theme_cache_post and %icon_theme_cache_postun can -# optionally take the name of the icon theme where icons are installed. -# This is useful for packages containing a whole icon theme. If no -# argument is passed, the hicolor icon theme is assumed (which is where -# applications usually install their icons). -# -### - -%icon_theme_cache_create_ghost() \ -if test "x%1" == "x%%1"; then \ - echo "Missing argument in call to %%icon_theme_cache_create_ghost." \ - false \ -fi \ -mkdir -p "%{buildroot}%{_datadir}/icons/%1" \ -touch "%{buildroot}%{_datadir}/icons/%1/icon-theme.cache" - -# On install, update the icon cache -%icon_theme_cache_post() \ -%if "x%1" != "x%%1" \ - ICON_THEME="%1" \ -%else \ - ICON_THEME="hicolor" \ -%endif \ -if test -x /usr/bin/gtk-update-icon-cache; then \ - /usr/bin/gtk-update-icon-cache --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true \ -elif test -x /usr/bin/gtk-update-icon-cache-3.0; then \ - /usr/bin/gtk-update-icon-cache-3.0 --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true \ -fi - -# On uninstall, update the icon cache. Note: we ignore upgrades (already -# handled in %post of the new package). -%icon_theme_cache_postun() \ -if [ $1 -eq 0 ]; then \ - %if "x%1" != "x%%1" \ - ICON_THEME="%1" \ - %else \ - ICON_THEME="hicolor" \ - %endif \ - if test -x /usr/bin/gtk-update-icon-cache; then \ - /usr/bin/gtk-update-icon-cache --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true \ - elif test -x /usr/bin/gtk-update-icon-cache-3.0; then \ - /usr/bin/gtk-update-icon-cache-3.0 --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true \ - fi \ -fi From 06c2270803e25d682c713a56169591246e51b7e32712b8fd1ae89645af9660c9 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Fri, 27 Aug 2010 15:11:40 +0000 Subject: [PATCH 3/3] Updating link to change in openSUSE:Factory/hicolor-icon-theme revision 14.0 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/hicolor-icon-theme?expand=0&rev=ae638c5c8f077577aaea87cf5476de0d --- hicolor-icon-theme-rpmlintrc | 1 + hicolor-icon-theme.changes | 11 +++++++ hicolor-icon-theme.spec | 12 ++++++- macros.hicolor | 63 ++++++++++++++++++++++++++++++++++++ 4 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 hicolor-icon-theme-rpmlintrc create mode 100644 macros.hicolor diff --git a/hicolor-icon-theme-rpmlintrc b/hicolor-icon-theme-rpmlintrc new file mode 100644 index 0000000..9cae743 --- /dev/null +++ b/hicolor-icon-theme-rpmlintrc @@ -0,0 +1 @@ +addFilter(".*ghost-files-without-postin") diff --git a/hicolor-icon-theme.changes b/hicolor-icon-theme.changes index 85dc81d..253c420 100644 --- a/hicolor-icon-theme.changes +++ b/hicolor-icon-theme.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Aug 25 15:06:12 CEST 2010 - vuntz@opensuse.org + +- Add rpm macros to update icon themes. +- Add a %ghost file for the hicolor icon cache, but since this + package actually doesn't contain any icon, do not do anything in + %post/%postun: this will be done by packages installing icons in + the hicolor icon theme. +- Add a rpmlintrc file to suppress the ghost-files-without-postin + warning which is wrong in this specific case. + ------------------------------------------------------------------- Thu Jan 14 05:22:00 CET 2010 - captain.magnus@opensuse.org diff --git a/hicolor-icon-theme.spec b/hicolor-icon-theme.spec index 9b799b0..9d2c24e 100644 --- a/hicolor-icon-theme.spec +++ b/hicolor-icon-theme.spec @@ -23,9 +23,11 @@ Summary: Fallback Icon Theme License: GPLv2+ Group: System/X11/Utilities Version: 0.12 -Release: 1 +Release: 6 Url: http://icon-theme.freedesktop.org/wiki/HicolorTheme Source: %{name}-%{version}.tar.bz2 +Source1: macros.hicolor +Source99: %{name}-rpmlintrc # PATCH-FIX-UPSTREAM hicolor-scalable-sizes.patch fdo25449 vuntz@opensuse.org -- Add some MinSize for scalable, since the icons won't look that good at small sizes Patch1: hicolor-scalable-sizes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -45,14 +47,22 @@ theme specification. %install %makeinstall +touch %{buildroot}%{_datadir}/icons/hicolor/icon-theme.cache chmod -x COPYING +# Install rpm macros +install -D -m644 %{S:1} %{buildroot}%{_sysconfdir}/rpm/macros.hicolor %clean rm -rf %{buildroot} +# No %post/%postun: there are actually no icons in this package. It's just the +# directory structure. + %files %defattr(-, root, root) %doc COPYING ChangeLog README +%ghost %{_datadir}/icons/hicolor/icon-theme.cache %{_datadir}/icons/hicolor/ +%{_sysconfdir}/rpm/macros.hicolor %changelog diff --git a/macros.hicolor b/macros.hicolor new file mode 100644 index 0000000..b4177aa --- /dev/null +++ b/macros.hicolor @@ -0,0 +1,63 @@ +# RPM macros for packages installing icons or a whole icon theme +# +### +# +# When a package installs icons (or a whole icon theme), it should use +# both macros: +# +# - %icon_theme_cache_post in %post +# - %icon_theme_cache_postun in %postun +# +# Additionally, if a package installs a whole icon theme, it should use +# this macro: +# +# - %icon_theme_cache_create_ghost in %install +# +# This macro takes the name of an icon theme as argument. The +# icon-theme.cache created this way should be added with %ghost in the +# file list. +# +# Note that %icon_theme_cache_post and %icon_theme_cache_postun can +# optionally take the name of the icon theme where icons are installed. +# This is useful for packages containing a whole icon theme. If no +# argument is passed, the hicolor icon theme is assumed (which is where +# applications usually install their icons). +# +### + +%icon_theme_cache_create_ghost() \ +if test "x%1" == "x%%1"; then \ + echo "Missing argument in call to %%icon_theme_cache_create_ghost." \ + false \ +fi \ +mkdir -p "%{buildroot}%{_datadir}/icons/%1" \ +touch "%{buildroot}%{_datadir}/icons/%1/icon-theme.cache" + +# On install, update the icon cache +%icon_theme_cache_post() \ +%if "x%1" != "x%%1" \ + ICON_THEME="%1" \ +%else \ + ICON_THEME="hicolor" \ +%endif \ +if test -x /usr/bin/gtk-update-icon-cache; then \ + /usr/bin/gtk-update-icon-cache --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true \ +elif test -x /usr/bin/gtk-update-icon-cache-3.0; then \ + /usr/bin/gtk-update-icon-cache-3.0 --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true \ +fi + +# On uninstall, update the icon cache. Note: we ignore upgrades (already +# handled in %post of the new package). +%icon_theme_cache_postun() \ +if [ $1 -eq 0 ]; then \ + %if "x%1" != "x%%1" \ + ICON_THEME="%1" \ + %else \ + ICON_THEME="hicolor" \ + %endif \ + if test -x /usr/bin/gtk-update-icon-cache; then \ + /usr/bin/gtk-update-icon-cache --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true \ + elif test -x /usr/bin/gtk-update-icon-cache-3.0; then \ + /usr/bin/gtk-update-icon-cache-3.0 --quiet --force "%{_datadir}/icons/${ICON_THEME}" || true \ + fi \ +fi