[packages/efivar] - added static patch, fixes shared libs packaging

qboosh qboosh at pld-linux.org
Sat Sep 12 09:26:31 CEST 2015


commit 7d8a73df228d246304a5d343b94509dd04bdf9f8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Sep 12 09:28:11 2015 +0200

    - added static patch, fixes shared libs packaging

 efivar-static.patch | 24 ++++++++++++++++++++++++
 efivar.spec         | 12 ++++++++----
 2 files changed, 32 insertions(+), 4 deletions(-)
---
diff --git a/efivar.spec b/efivar.spec
index 95e0d4d..b9cb49b 100644
--- a/efivar.spec
+++ b/efivar.spec
@@ -12,6 +12,7 @@ Group:		Applications/System
 Source0:	https://github.com/rhinstaller/efivar/archive/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	9b2bc790c267614b46b9c9c6528629d6
 Patch0:		%{name}-build.patch
+Patch1:		%{name}-static.patch
 URL:		https://github.com/rhinstaller/efivar
 BuildRequires:	popt-devel
 Requires:	%{name}-libs = %{version}-%{release}
@@ -64,12 +65,13 @@ Statyczna biblioteka efivar.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__make} \
 	CC="%{__cc}" \
 	CFLAGS="%{rpmcflags}" \
-	%{?with_static_libs:LIBTARGETS="libefivar.so.0 libefiboot.so.0 libefivar.a libefiboot.a"} \
+	%{!?with_static_libs:STATICLIBTARGETS=} \
 	libdir=%{_libdir}
 
 %install
@@ -77,7 +79,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT \
-	%{?with_static_libs:LIBTARGETS="libefivar.so.0 libefiboot.so.0 libefivar.a libefiboot.a"} \
+	%{!?with_static_libs:STATICLIBTARGETS=} \
 	libdir=%{_libdir}
 
 %clean
@@ -94,8 +96,10 @@ rm -rf $RPM_BUILD_ROOT
 
 %files libs
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libefiboot.so.0
-%attr(755,root,root) %{_libdir}/libefivar.so.0
+%attr(755,root,root) %{_libdir}/libefiboot.so.0.*
+%attr(755,root,root) %ghost %{_libdir}/libefiboot.so.0
+%attr(755,root,root) %{_libdir}/libefivar.so.0.*
+%attr(755,root,root) %ghost %{_libdir}/libefivar.so.0
 
 %files devel
 %defattr(644,root,root,755)
diff --git a/efivar-static.patch b/efivar-static.patch
new file mode 100644
index 0000000..15dd5d3
--- /dev/null
+++ b/efivar-static.patch
@@ -0,0 +1,24 @@
+--- efivar-0.21/src/Makefile.orig	2015-07-13 22:00:06.000000000 +0200
++++ efivar-0.21/src/Makefile	2015-09-12 09:24:38.062055687 +0200
+@@ -5,11 +5,12 @@
+ include $(TOPDIR)/Make.version
+ 
+ LIBTARGETS = $(foreach x,libefivar libefiboot,$(x).so.$(VERSION) $(x).so.$(MAJOR_VERSION))
++STATICLIBTARGETS = libefivar.a libefiboot.a
+ PCTARGETS = efivar.pc efiboot.pc
+ BINTARGETS = efivar
+ INCTARGETS = include/efivar/efivar-guids.h
+ all : $(EFIVAR_DEPS) $(INCTARGETS) deps
+-all : $(LIBTARGETS) $(PCTARGETS) $(BINTARGETS) libefiboot.so
++all : $(LIBTARGETS) $(STATICLIBTARGETS) $(PCTARGETS) $(BINTARGETS) libefiboot.so
+ 	@$(MAKE) -C test TOPDIR=$(TOPDIR) SRCDIR=$(SRCDIR)/test $@
+ 
+ EFIVAR_OBJECTS = dp.o dp-acpi.o dp-hw.o dp-media.o dp-message.o \
+@@ -89,6 +90,7 @@
+ install : all
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(libdir)
+ 	$(foreach x, $(LIBTARGETS), $(INSTALL) -m 755 $(x) $(DESTDIR)$(libdir);)
++	$(foreach x, $(STATICLIBTARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)$(libdir);)
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(PCDIR)
+ 	$(foreach x, $(PCTARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)$(PCDIR) ;)
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(includedir)/efivar
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/efivar.git/commitdiff/7d8a73df228d246304a5d343b94509dd04bdf9f8



More information about the pld-cvs-commit mailing list