2014-10-01 07:20:23 +00:00
|
|
|
#
|
|
|
|
# spec file for package efivar
|
|
|
|
#
|
2017-02-09 03:37:29 +00:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-10-01 07:20:23 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-02-09 03:37:29 +00:00
|
|
|
%if 0%{?suse_version} <= 1320
|
|
|
|
# Allow building on older products (SLE11SP4, SLES12, and Leap 42.2)
|
|
|
|
%bcond_without forced_lto
|
|
|
|
%if 0%{?suse_version} == 1110
|
|
|
|
%define gcc 48
|
|
|
|
%define gcc_v 4.8
|
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
%bcond_with forced_lto
|
|
|
|
%endif
|
|
|
|
|
2014-10-01 07:20:23 +00:00
|
|
|
Name: efivar
|
2016-07-13 04:06:46 +00:00
|
|
|
Version: 0.24
|
2014-10-01 07:20:23 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Tools to manage UEFI variables
|
|
|
|
License: LGPL-2.1
|
|
|
|
Group: Development/Libraries/Other
|
2015-12-01 09:16:44 +00:00
|
|
|
Url: https://github.com/rhinstaller/efivar
|
|
|
|
Source0: https://github.com/rhinstaller/efivar/releases/download/%{version}/%{name}-%{version}.tar.bz2
|
2016-07-13 04:06:46 +00:00
|
|
|
Patch1: efivar-no-static.patch
|
|
|
|
Patch2: deprecated-readdir_r.patch
|
2017-02-09 04:40:38 +00:00
|
|
|
Patch3: efivar-use-sysmacros.patch
|
2017-02-09 03:37:29 +00:00
|
|
|
%if "0%{?buildroot}" == "0"
|
|
|
|
# set a sane value for buildroot, unless it's already there!
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%endif
|
2015-06-12 01:46:12 +00:00
|
|
|
BuildRequires: fdupes
|
2014-10-01 07:20:23 +00:00
|
|
|
BuildRequires: pkg-config
|
2014-10-31 10:20:55 +00:00
|
|
|
BuildRequires: popt-devel
|
2017-02-09 03:37:29 +00:00
|
|
|
%if 0%{?gcc} != 0
|
|
|
|
BuildRequires: gcc%{gcc}
|
|
|
|
%endif
|
2014-10-01 07:20:23 +00:00
|
|
|
Requires: libefivar0 = %{version}-%{release}
|
|
|
|
|
|
|
|
%description
|
|
|
|
efivar provides a simple command line interface to the UEFI variable facility.
|
|
|
|
|
|
|
|
%package -n libefivar0
|
2014-10-31 10:20:55 +00:00
|
|
|
Summary: Library to manage UEFI variables
|
|
|
|
Group: Development/Libraries/Other
|
2014-10-01 07:20:23 +00:00
|
|
|
|
|
|
|
%description -n libefivar0
|
|
|
|
Library to allow for the simple manipulation of UEFI variables.
|
|
|
|
|
|
|
|
%package devel
|
2014-10-31 10:20:55 +00:00
|
|
|
Summary: Development headers for libefivar
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
Requires: libefivar0 = %{version}-%{release}
|
2014-10-01 07:20:23 +00:00
|
|
|
|
|
|
|
%description devel
|
2017-02-09 03:37:29 +00:00
|
|
|
Development headers required to use libefivar.
|
2014-10-01 07:20:23 +00:00
|
|
|
|
|
|
|
%prep
|
2014-11-07 08:07:49 +00:00
|
|
|
%setup -q
|
2016-07-13 04:06:46 +00:00
|
|
|
%patch1 -p1
|
2016-03-09 06:47:51 +00:00
|
|
|
%patch2 -p1
|
2017-02-09 04:40:38 +00:00
|
|
|
%patch3 -p1
|
2017-02-09 03:37:29 +00:00
|
|
|
%if 0%{?suse_version} == 1110
|
|
|
|
# Instead of conditional patching:
|
|
|
|
# - 'popt.pc' missing in 'popt-devel' on SLE11
|
|
|
|
perl -pi -e 's{^.*PKGS=popt.*$}{}; s{(efivar\S* : LIBS=.*)dl}{$1popt dl}' \
|
|
|
|
src/Makefile
|
|
|
|
# - 'uchar.h' missing in both 'glibc-devel' and 'gcc-5' packages on SLE11
|
|
|
|
perl -pi -e 's{\#include \<uchar\.h\>}{typedef __CHAR16_TYPE__ char16_t;}' \
|
|
|
|
src/export.c
|
|
|
|
%endif
|
2014-10-01 07:20:23 +00:00
|
|
|
|
|
|
|
%build
|
2017-02-09 03:37:29 +00:00
|
|
|
# SUSE multi-dist building effort
|
|
|
|
if [ "0%{?gcc}" != "0" ]||[ ! -x /usr/bin/gcc-ar ]; then
|
|
|
|
mkdir bin
|
|
|
|
if [ "0%{?gcc}" != "0" ]; then
|
|
|
|
for p in "" -ar -nm -ranlib; do
|
|
|
|
ln -s /usr/bin/gcc$p-%{gcc_v} bin/gcc$p
|
|
|
|
done
|
|
|
|
else
|
|
|
|
ln -s /usr/bin/ar bin/gcc-ar
|
|
|
|
fi
|
|
|
|
PATH=$PWD/bin:$PATH
|
|
|
|
fi
|
|
|
|
|
|
|
|
CFLAGS="%{optflags} -Wno-nonnull"
|
|
|
|
%if %{with forced_lto}
|
|
|
|
CFLAGS="$CFLAGS -flto"
|
|
|
|
%endif
|
|
|
|
%ifarch ia64
|
|
|
|
CFLAGS="${CFLAGS//-fstack-protector/}"
|
|
|
|
%endif
|
|
|
|
export CFLAGS
|
|
|
|
|
2015-06-12 01:46:12 +00:00
|
|
|
make \
|
|
|
|
libdir=%{_libdir} \
|
|
|
|
bindir=%{_bindir}
|
2014-10-01 07:20:23 +00:00
|
|
|
|
|
|
|
%install
|
2017-02-09 03:37:29 +00:00
|
|
|
make DESTDIR=%{buildroot} \
|
|
|
|
libdir=%{_libdir} \
|
|
|
|
bindir=%{_bindir} \
|
|
|
|
install
|
2015-06-12 01:46:12 +00:00
|
|
|
%fdupes -s %{buildroot}
|
2014-10-01 07:20:23 +00:00
|
|
|
|
|
|
|
%post -n libefivar0 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libefivar0 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2016-04-12 02:48:46 +00:00
|
|
|
%doc COPYING
|
2014-10-01 07:20:23 +00:00
|
|
|
%{_bindir}/efivar
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_mandir}/man3/*
|
|
|
|
%{_includedir}/*
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
|
|
|
|
%files -n libefivar0
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/*.so.*
|
|
|
|
|
|
|
|
%changelog
|