| |
@@ -1,13 +1,17 @@
|
| |
Name: flashrom
|
| |
Version: 1.2
|
| |
- Release: 1%{?dist}
|
| |
+ Release: 2%{?dist}
|
| |
Summary: Simple program for reading/writing flash chips content
|
| |
License: GPLv2
|
| |
URL: https://flashrom.org
|
| |
|
| |
Source0: https://download.flashrom.org/releases/%{name}-v%{version}.tar.bz2
|
| |
|
| |
+ # upstream already: https://review.coreboot.org/c/flashrom/+/38939
|
| |
+ Patch0: 0001-Install-the-man-file-when-using-meson-as-a-buildsyst.patch
|
| |
+
|
| |
BuildRequires: gcc
|
| |
+ BuildRequires: meson
|
| |
BuildRequires: pciutils-devel
|
| |
BuildRequires: libftdi-devel
|
| |
BuildRequires: libusb-devel
|
| |
@@ -30,28 +34,53 @@
|
| |
images on mainboards, network/graphics/storage controller cards, and various
|
| |
other programmer devices.
|
| |
|
| |
+ %package devel
|
| |
+ Summary: Development package for %{name}
|
| |
+ Requires: %{name}%{?_isa} = %{version}-%{release}
|
| |
+
|
| |
+ %description devel
|
| |
+ Files for development with %{name}.
|
| |
|
| |
%prep
|
| |
- %setup -q -n %{name}-v%{version}
|
| |
+ %autosetup -p1 -n %{name}-v%{version}
|
| |
# Replace GROUP="plugdev" specifiers with TAG+="uaccess"
|
| |
sed -e 's/MODE="[0-9]*", GROUP="plugdev"/TAG+="uaccess"/g' util/z60_flashrom.rules -i
|
| |
|
| |
+ %build
|
| |
+ %meson \
|
| |
%ifarch %{ix86} x86_64
|
| |
- # 'internal' programmer is only supported on x86 platforms
|
| |
- %global flashrom_flags CFLAGS='%{optflags}'
|
| |
+ -Dconfig_internal=true
|
| |
%else
|
| |
- %global flashrom_flags CFLAGS='%{optflags}' CONFIG_INTERNAL=no
|
| |
+ -Dconfig_atahpt=false \
|
| |
+ -Dconfig_atapromise=false \
|
| |
+ -Dconfig_atavia=false \
|
| |
+ -Dconfig_drkaiser=false \
|
| |
+ -Dconfig_gfxnvidia=false \
|
| |
+ -Dconfig_it8212=false \
|
| |
+ -Dconfig_nic3com=false \
|
| |
+ -Dconfig_nicintel_eeprom=false \
|
| |
+ -Dconfig_nicintel=false \
|
| |
+ -Dconfig_nicintel_spi=false \
|
| |
+ -Dconfig_nicnatsemi=false \
|
| |
+ -Dconfig_nicrealtek=false \
|
| |
+ -Dconfig_ogp_spi=false \
|
| |
+ -Dconfig_rayer_spi=false \
|
| |
+ -Dconfig_satamv=false \
|
| |
+ -Dconfig_satasii=false \
|
| |
+ -Dconfig_internal=false
|
| |
%endif
|
| |
|
| |
+ %meson_build
|
| |
|
| |
- %build
|
| |
- make %{?_smp_mflags} %{flashrom_flags}
|
| |
-
|
| |
+ %if 0%{?enable_tests}
|
| |
+ %check
|
| |
+ %meson_test
|
| |
+ %endif
|
| |
|
| |
%install
|
| |
- make install %{flashrom_flags} DESTDIR=%{buildroot} PREFIX=%{_prefix}
|
| |
- install -D -p -m 0644 util/z60_flashrom.rules %{buildroot}/%{_udevrulesdir}/60_flashrom.rules
|
| |
+ %meson_install
|
| |
|
| |
+ install -D -p -m 0644 util/z60_flashrom.rules %{buildroot}/%{_udevrulesdir}/60_flashrom.rules
|
| |
|
| |
%files
|
| |
%{!?_licensedir:%global license %%doc}
|
| |
@@ -60,9 +89,19 @@
|
| |
%{_sbindir}/%{name}
|
| |
%{_mandir}/man8/%{name}.*
|
| |
%{_udevrulesdir}/60_flashrom.rules
|
| |
+ %{_libdir}/libflashrom.so.1
|
| |
+ %{_libdir}/libflashrom.so.1.0.0
|
| |
|
| |
+ %files devel
|
| |
+ %{_includedir}/libflashrom.h
|
| |
+ %{_libdir}/libflashrom.so
|
| |
+ %{_libdir}/pkgconfig/flashrom.pc
|
| |
|
| |
%changelog
|
| |
+ * Mon Feb 17 2020 Richard Hughes <richard@hughsie.com> - 1.2-2
|
| |
+ - Build the package using meson to get the libflashrom shared library support
|
| |
+ required by fwupd.
|
| |
+
|
| |
* Tue Feb 11 2020 mrnuke <mr.nuke.me@gmail.com> - 1.2-1
|
| |
- Update to flashrom 1.2 (Release was intended to fix #1799344)
|
| |
|
| |
This builds the libflashrom shared library used by other projects such as fwupd.