From 091efceb306f80450961058a76c9e41aefd20fd3 Mon Sep 17 00:00:00 2001 From: zzm_567 Date: Thu, 20 Aug 2020 18:13:29 +0800 Subject: [PATCH 1/2] add a condition devel --- libXxf86misc.spec | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/libXxf86misc.spec b/libXxf86misc.spec index 920794d..a5a5f14 100644 --- a/libXxf86misc.spec +++ b/libXxf86misc.spec @@ -1,6 +1,8 @@ +%global with_devel 0%{?rhel} && 0%{?rhel} <= 8 + Name: libXxf86misc Version: 1.0.4 -Release: 5 +Release: 6 Summary: Extension library for the XFree86-Misc X extension License: MIT URL: https://www.x.org @@ -11,15 +13,21 @@ Source2: xf86mscstr.h BuildRequires: autoconf automake libtool xorg-x11-util-macros BuildRequires: pkgconfig(xproto) pkgconfig(xext) sed +%if !%{with_devel} +Obsoletes: libXxf86misc-devel <= 1.0.4-4 +%endif + %description Extension library for the XFree86-Misc X extension. +%if %{with_devel} %package devel Summary: Development package for libXxf86misc Requires: %{name} = %{version}-%{release} %description devel The development package for libXxf86misc. +%endif %package_help @@ -38,6 +46,15 @@ autoreconf -vif %make_install %delete_la +%if %{with_devel} +mkdir -p $RPM_BUILD_ROOT%{_includedir}/X11/extensions +install -m 0644 -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/X11/extensions +%else +rm -f $RPM_BUILD_ROOT%{_libdir}/*.so +rm -f $RPM_BUILD_ROOT%{_libdir}/*.a +rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig +%endif + %ldconfig_scriptlets %files @@ -45,10 +62,12 @@ autoreconf -vif %{_libdir}/*.so.* %doc COPYING README +%if %{with_devel} %files devel %defattr(-,root,root) %{_libdir}/{*.a,*.so} %{_libdir}/*/*.pc +%endif %files help %defattr(-,root,root) @@ -56,6 +75,12 @@ autoreconf -vif %doc ChangeLog %changelog +* Thu Aug 20 2020 wangye - 1.0.4-6 +- Type: bugfix +- ID: NA +- SUG: NA +- DESC: add a condition devel + * Thu Aug 06 2020 xiaoweiwei - 1.0.4-5 - Type: bugfix - ID: NA -- Gitee From 78be370a0dc55139cb670a3cee5e5413485a6644 Mon Sep 17 00:00:00 2001 From: zzm_567 Date: Thu, 20 Aug 2020 19:09:26 +0800 Subject: [PATCH 2/2] add a condition devel --- libXxf86misc.spec | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libXxf86misc.spec b/libXxf86misc.spec index a5a5f14..1ea3538 100644 --- a/libXxf86misc.spec +++ b/libXxf86misc.spec @@ -1,5 +1,4 @@ -%global with_devel 0%{?rhel} && 0%{?rhel} <= 8 - +%bcond_with devel Name: libXxf86misc Version: 1.0.4 Release: 6 @@ -13,14 +12,14 @@ Source2: xf86mscstr.h BuildRequires: autoconf automake libtool xorg-x11-util-macros BuildRequires: pkgconfig(xproto) pkgconfig(xext) sed -%if !%{with_devel} +%if !%{with devel} Obsoletes: libXxf86misc-devel <= 1.0.4-4 %endif %description Extension library for the XFree86-Misc X extension. -%if %{with_devel} +%if %{with devel} %package devel Summary: Development package for libXxf86misc Requires: %{name} = %{version}-%{release} @@ -46,7 +45,7 @@ autoreconf -vif %make_install %delete_la -%if %{with_devel} +%if %{with devel} mkdir -p $RPM_BUILD_ROOT%{_includedir}/X11/extensions install -m 0644 -p %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/X11/extensions %else @@ -62,7 +61,7 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig %{_libdir}/*.so.* %doc COPYING README -%if %{with_devel} +%if %{with devel} %files devel %defattr(-,root,root) %{_libdir}/{*.a,*.so} -- Gitee