From 2c987ae1cad500d077d454aa174ed288a5cc52d6ec9442627bf2695d275fb48e Mon Sep 17 00:00:00 2001 From: Nicholas Yang Date: Wed, 15 May 2024 04:02:28 +0000 Subject: [PATCH 1/3] Accepting request 1173953 from home:nicholasyang:branches:Base:System - Enable building libled. OBS-URL: https://build.opensuse.org/request/show/1173953 OBS-URL: https://build.opensuse.org/package/show/Base:System/ledmon?expand=0&rev=53 --- ledmon.changes | 5 +++++ ledmon.spec | 44 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/ledmon.changes b/ledmon.changes index 1c87f01..1c12c6c 100644 --- a/ledmon.changes +++ b/ledmon.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 14 10:09:04 UTC 2024 - Nicholas Yang + +- Enable building libled. + ------------------------------------------------------------------- Thu Mar 28 04:28:18 UTC 2024 - Nicholas Yang diff --git a/ledmon.spec b/ledmon.spec index 2cc485c..ed1c93d 100644 --- a/ledmon.spec +++ b/ledmon.spec @@ -20,7 +20,7 @@ Name: ledmon Version: 1.0.0 Release: 0 Summary: Enclosure LED Utilities -License: GPL-2.0-only AND LGPL-2.1-or-later +License: GPL-2.0-only Group: Hardware/Other URL: https://github.com/intel/ledmon/ Source0: https://github.com/intel/ledmon/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz @@ -52,7 +52,8 @@ solutions. %define _lto_cflags %{nil} autoreconf -fiv %configure \ - --enable-systemd=yes + --enable-systemd=yes \ + --enable-library=yes %make_build %install @@ -60,6 +61,8 @@ autoreconf -fiv ln -sv %{_sbindir}/service \ %{buildroot}%{_sbindir}/rc%{name} rm %{buildroot}%{_datarootdir}/doc/ledmon/README.md +rm -f %{buildroot}%{_libdir}/*.a +rm -f %{buildroot}%{_libdir}/*.la %pre %service_add_pre %{name}.service @@ -74,7 +77,7 @@ rm %{buildroot}%{_datarootdir}/doc/ledmon/README.md %service_del_postun %{name}.service %files -%license COPYING COPYING.LIB +%license COPYING %doc README.md %{_sbindir}/ledmon %{_sbindir}/ledctl @@ -84,4 +87,39 @@ rm %{buildroot}%{_datarootdir}/doc/ledmon/README.md %{_mandir}/man8/ledctl.8%{?ext_man} %{_mandir}/man8/ledmon.8%{?ext_man} +%package -n libled1 +Summary: Enclosure LED Control Library +License: LGPL-2.1-or-later + +%description -n libled1 +libled enable enclosure LED control for applications. + +%files -n libled1 +%license COPYING.LIB +%{_libdir}/libled.so.1 +%{_libdir}/libled.so.1.* + +%post -n libled1 -p /sbin/ldconfig +%postun -n libled1 -p /sbin/ldconfig + +%package -n libled1-devel +Summary: Document and Include Files for Enclosure LED Control Library +License: LGPL-2.1-or-later +Group: Development/Libraries/C and C++ +Requires: libled1 = %{version}-%{release} +Requires: pkgconfig +Provides: ledmon-devel = %{version} + +%description -n libled1-devel +This package contains the files that are necessary for software development +using libled. + +%files -n libled1-devel +%license COPYING.LIB +%doc src/lib/LIBRARY.md +%dir %{_includedir}/led/ +%{_includedir}/led/libled.h +%{_libdir}/libled.so +%{_libdir}/pkgconfig/ledmon.pc + %changelog From 053a069b74449f26e7d7e6ca7687691b025275a4d6b70fb259ff9f4764106cf4 Mon Sep 17 00:00:00 2001 From: Nicholas Yang Date: Thu, 16 May 2024 03:13:35 +0000 Subject: [PATCH 2/3] Accepting request 1174327 from home:nicholasyang:branches:Base:System fix the naming of the shared lib package * should not have a ${NUM} suffix * follow the name used in pkgconfig for better discoverability OBS-URL: https://build.opensuse.org/request/show/1174327 OBS-URL: https://build.opensuse.org/package/show/Base:System/ledmon?expand=0&rev=54 --- ledmon.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ledmon.spec b/ledmon.spec index ed1c93d..2b30f3b 100644 --- a/ledmon.spec +++ b/ledmon.spec @@ -102,19 +102,18 @@ libled enable enclosure LED control for applications. %post -n libled1 -p /sbin/ldconfig %postun -n libled1 -p /sbin/ldconfig -%package -n libled1-devel +%package devel Summary: Document and Include Files for Enclosure LED Control Library License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ Requires: libled1 = %{version}-%{release} Requires: pkgconfig -Provides: ledmon-devel = %{version} -%description -n libled1-devel +%description devel This package contains the files that are necessary for software development using libled. -%files -n libled1-devel +%files devel %license COPYING.LIB %doc src/lib/LIBRARY.md %dir %{_includedir}/led/ From fdcf8e6f75334da0517fbc9b199ca105685ca70afca7824753c1e4d1662a8916 Mon Sep 17 00:00:00 2001 From: Nicholas Yang Date: Thu, 16 May 2024 07:47:04 +0000 Subject: [PATCH 3/3] Accepting request 1174375 from home:dimstar:Factory - Re-arrange spec files block to be in line with all other openSUSE spec files. OBS-URL: https://build.opensuse.org/request/show/1174375 OBS-URL: https://build.opensuse.org/package/show/Base:System/ledmon?expand=0&rev=55 --- ledmon.changes | 6 ++++++ ledmon.spec | 43 +++++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/ledmon.changes b/ledmon.changes index 1c12c6c..33207bc 100644 --- a/ledmon.changes +++ b/ledmon.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 16 07:01:36 UTC 2024 - Dominique Leuenberger + +- Re-arrange spec files block to be in line with all other openSUSE + spec files. + ------------------------------------------------------------------- Tue May 14 10:09:04 UTC 2024 - Nicholas Yang diff --git a/ledmon.spec b/ledmon.spec index 2b30f3b..a876d34 100644 --- a/ledmon.spec +++ b/ledmon.spec @@ -45,6 +45,24 @@ The ledctl application and ledmon daemon are part of Intel(R) LED ControlUtilities. They help to enable LED management for software RAID solutions. +%package -n libled1 +Summary: Enclosure LED Control Library +License: LGPL-2.1-or-later + +%description -n libled1 +libled enable enclosure LED control for applications. + +%package devel +Summary: Document and Include Files for Enclosure LED Control Library +License: LGPL-2.1-or-later +Group: Development/Libraries/C and C++ +Requires: libled1 = %{version}-%{release} +Requires: pkgconfig + +%description devel +This package contains the files that are necessary for software development +using libled. + %prep %autosetup -p1 @@ -62,7 +80,7 @@ ln -sv %{_sbindir}/service \ %{buildroot}%{_sbindir}/rc%{name} rm %{buildroot}%{_datarootdir}/doc/ledmon/README.md rm -f %{buildroot}%{_libdir}/*.a -rm -f %{buildroot}%{_libdir}/*.la +find %{buildroot} -type f -name "*.la" -delete -print %pre %service_add_pre %{name}.service @@ -76,6 +94,8 @@ rm -f %{buildroot}%{_libdir}/*.la %postun %service_del_postun %{name}.service +%ldconfig_scriptlets -n libled1 + %files %license COPYING %doc README.md @@ -87,32 +107,11 @@ rm -f %{buildroot}%{_libdir}/*.la %{_mandir}/man8/ledctl.8%{?ext_man} %{_mandir}/man8/ledmon.8%{?ext_man} -%package -n libled1 -Summary: Enclosure LED Control Library -License: LGPL-2.1-or-later - -%description -n libled1 -libled enable enclosure LED control for applications. - %files -n libled1 %license COPYING.LIB %{_libdir}/libled.so.1 %{_libdir}/libled.so.1.* -%post -n libled1 -p /sbin/ldconfig -%postun -n libled1 -p /sbin/ldconfig - -%package devel -Summary: Document and Include Files for Enclosure LED Control Library -License: LGPL-2.1-or-later -Group: Development/Libraries/C and C++ -Requires: libled1 = %{version}-%{release} -Requires: pkgconfig - -%description devel -This package contains the files that are necessary for software development -using libled. - %files devel %license COPYING.LIB %doc src/lib/LIBRARY.md