From 7a836001f00cd86f642d3a7256e26c9af8e4b571 Mon Sep 17 00:00:00 2001 From: Sami Wagiaalla Date: Mon, 19 Dec 2011 13:56:12 -0500 Subject: [PATCH] Cleanups requested by FPC. * Mon Dec 19 2011 Sami Wagiaalla 1:3.7.1-9 - Remove _eclipse_pkg macro. - Use mktemp for creating a backup directory in eclipse-reconciler.sh --- eclipse-reconciler.sh | 3 ++- eclipse.spec | 6 +++++- macros.eclipse | 29 ++++++++++------------------- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/eclipse-reconciler.sh b/eclipse-reconciler.sh index d51850b..af76908 100755 --- a/eclipse-reconciler.sh +++ b/eclipse-reconciler.sh @@ -22,7 +22,8 @@ then exit 0 fi -tmp_dir=/var/run/eclipse +tmp_dir=$(mktemp -d) +echo "Tmpdir: $tmp_dir" if [ -e /usr/lib64/eclipse ] then diff --git a/eclipse.spec b/eclipse.spec index 76ee7c8..4185251 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -17,7 +17,7 @@ Epoch: 1 Summary: An open, extensible IDE Name: eclipse Version: %{eclipse_majmin}.%{eclipse_micro} -Release: 13%{?dist} +Release: 14%{?dist} License: EPL Group: Text Editors/Integrated Development Environments (IDE) URL: http://www.eclipse.org/ @@ -647,6 +647,10 @@ rm -rf %{_bindir}/efj/ %{_libdir}/%{name}/dropins/sdk %changelog +* Mon Jan 19 2012 Sami Wagiaalla 1:3.7.1-14 +- Remove _eclipse_pkg macro. +- Use mktemp for creating a backup directory in eclipse-reconciler.sh + * Fri Jan 16 2012 Alexander Kurtakov - 1:3.7.1-13 - Fix o.e.osgi.services pom to remove fake parent. diff --git a/macros.eclipse b/macros.eclipse index 9d539e8..f685337 100644 --- a/macros.eclipse +++ b/macros.eclipse @@ -1,28 +1,19 @@ # RPM macros for eclipse packages. # -%_eclipse_pkg() \ -%define __name %{lua: - if rpm.expand("%#") == "0" - then - print("") - else - print(rpm.expand("%1")) - end -} \ -\ -Requires(post): eclipse-platform >= 1:3.7.0-8 \ -Requires(postun): eclipse-platform >= 1:3.7.0-8 \ -\ -%post %__name \ -touch /var/run/eclipse/run-reconciler \ -\ -%postun %__name\ +%_eclipse_pkg_post \ +touch /var/run/eclipse/run-reconciler + +%_eclipse_pkg_postun \ touch /var/run/eclipse/run-reconciler \ \ if [ $1 == 0 ]; then \ eclipse-reconciler.sh > /dev/null \ fi \ -\ -%posttrans %__name \ + +%_eclipse_pkg_posttrans \ eclipse-reconciler.sh > /dev/null + +%_eclipse_pkg_reqs \ +Requires(post): eclipse-platform >= 1:3.7.0-8 \ +Requires(postun): eclipse-platform >= 1:3.7.0-8 \