From 7037c41c43ed260a203142b9e78d577f03246591f8cb98650efbdb69fb23cc2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20H=C3=BCwe?= Date: Tue, 1 Aug 2017 10:34:44 +0000 Subject: [PATCH] Accepting request 512849 from home:jberry:release-tools - Provide non-deprecated plugin directory and macro for plugins. OBS-URL: https://build.opensuse.org/request/show/512849 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/osc?expand=0&rev=250 --- osc.changes | 5 +++++ osc.spec | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/osc.changes b/osc.changes index b76a873..ade20f4 100644 --- a/osc.changes +++ b/osc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 27 22:06:25 UTC 2017 - jberry@suse.com + +- Provide non-deprecated plugin directory and macro for plugins. + ------------------------------------------------------------------- Thu Jul 20 21:18:21 UTC 2017 - adrian@suse.de diff --git a/osc.spec b/osc.spec index fdd40b8..c21e8ba 100644 --- a/osc.spec +++ b/osc.spec @@ -17,6 +17,8 @@ %define version_unconverted 0.159.0 +%define osc_plugin_dir %{_prefix}/lib/osc-plugins +%define macros_file macros.osc Name: osc Version: 0.159.0 @@ -107,9 +109,15 @@ introduction. # ("wrong", because no package provides "/bin/python"). PATH="/usr/bin:$PATH" CFLAGS="%{optflags}" python setup.py build +cat << eom > %{macros_file} +%%osc_plugin_dir %{osc_plugin_dir} +eom +echo >> %{macros_file} + %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} ln -s osc-wrapper.py %{buildroot}/%{_bindir}/osc +mkdir -p %{buildroot}%{osc_plugin_dir} mkdir -p %{buildroot}%{_localstatedir}/lib/osc-plugins install -Dm0644 dist/complete.csh %{buildroot}%{_sysconfdir}/profile.d/osc.csh %if 0%{?suse_version} @@ -123,6 +131,8 @@ install -Dm0755 dist/osc.complete %{buildroot}%{_prefix}/lib/osc/complete install -Dm0755 dist/osc.complete %{buildroot}%{_libdir}/osc/complete %endif +install -m644 %{macros_file} -D %{buildroot}%{_sysconfdir}/rpm/%{macros_file} + %clean rm -rf %{buildroot} @@ -137,6 +147,7 @@ rm -rf %{buildroot} %else %config %{_sysconfdir}/profile.d/osc.sh %endif +%config %{_sysconfdir}/rpm/%{macros_file} %dir %{_localstatedir}/lib/osc-plugins %{_mandir}/man1/osc.* %if 0%{?suse_version} > 1110 @@ -144,5 +155,6 @@ rm -rf %{buildroot} %else %{_libdir}/osc %endif +%dir %{osc_plugin_dir} %changelog