]>
Commit | Line | Data |
---|---|---|
ff69fcfa JB |
1 | # |
2 | # Conditional build: | |
7a009e4c | 3 | %bcond_without apidocs # API documentation |
ff69fcfa | 4 | %bcond_without ftdi # FTDI chips |
fac14747 | 5 | %bcond_without jaylink # J-Link chips |
556fb812 JP |
6 | |
7 | %ifarch %{ix86} %{x8664} x32 | |
8 | %define with_port_io 1 | |
9 | %endif | |
ff69fcfa | 10 | # |
7cbc1f08 | 11 | Summary: Tool Flashing your BIOS from the Unix/Linux command line |
e8789d13 | 12 | Summary(pl.UTF-8): Narzędzie do aktualizacji BIOS-u z linii poleceń Uniksa/Linuksa |
7cbc1f08 | 13 | Name: flashrom |
a65c0526 | 14 | Version: 1.3.0 |
054405d2 | 15 | Release: 2 |
31451be6 | 16 | License: GPL v2+ |
563c0602 | 17 | Group: Applications/System |
fac14747 | 18 | Source0: https://download.flashrom.org/releases/%{name}-v%{version}.tar.bz2 |
a65c0526 | 19 | # Source0-md5: dd2727f8fa05a4517689ca4f9d87e600 |
054405d2 | 20 | Patch0: x32.patch |
fac14747 | 21 | URL: https://www.flashrom.org/Flashrom |
7a009e4c | 22 | %{?with_apidocs:BuildRequires: doxygen} |
5cd34de0 | 23 | %{?with_ftdi:BuildRequires: libftdi1-devel >= 1.0} |
fac14747 | 24 | %{?with_jaylink:BuildRequires: libjaylink-devel} |
5cd34de0 | 25 | BuildRequires: libusb-devel >= 1.0 |
a10965e8 | 26 | BuildRequires: meson >= 0.53.0 |
7a009e4c | 27 | BuildRequires: ninja >= 1.5 |
e41553f7 | 28 | BuildRequires: pciutils-devel |
7a009e4c JB |
29 | BuildRequires: rpm-build >= 4.6 |
30 | BuildRequires: rpmbuild(macros) >= 1.736 | |
3610a7aa | 31 | BuildRequires: pkgconfig |
7cbc1f08 | 32 | BuildRequires: zlib-devel |
d3c478c9 | 33 | ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 mips ppc ppc64 sparc sparcv9 sparc64 |
7cbc1f08 | 34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
35 | ||
7cbc1f08 | 36 | %description |
37 | flashrom is a utility for identifying, reading, writing, verifying and | |
38 | erasing flash chips. It's often used to flash BIOS / EFI / coreboot / | |
39 | firmware images. | |
fac14747 JB |
40 | - Supports more than 470 flash chips, 291 chipsets, 500 mainboards, |
41 | 79 PCI devices, 17 USB devices and various parallel/serial port | |
42 | programmers. | |
e8789d13 | 43 | - Supports parallel, LPC, FWH and SPI flash interfaces and various |
fac14747 JB |
44 | chip packages (DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, TSOP40, |
45 | TSOP48, BGA and more) | |
e8789d13 JB |
46 | - No physical access needed, root access is sufficient. |
47 | - No bootable floppy disk, bootable CD-ROM or other media needed. | |
48 | - No keyboard or monitor needed. Simply reflash remotely via SSH. | |
49 | - No instant reboot needed. Reflash your chip in a running system, | |
50 | verify it, be happy. The new firmware will be present next time you | |
51 | boot. | |
85a10d97 ŁK |
52 | - Crossflashing and hotflashing is possible as long as the flash chips |
53 | are electrically and logically compatible (same protocol). Great for | |
54 | recovery. | |
e8789d13 | 55 | - Scriptability. Reflash a whole pool of identical machines at the |
85a10d97 ŁK |
56 | same time from the command line. It is recommended to check flashrom |
57 | output and error codes. | |
e8789d13 | 58 | - Speed. flashrom is often much faster than most vendor flash tools. |
fac14747 JB |
59 | - Portability. Supports DOS, Linux, FreeBSD (including |
60 | Debian/kFreeBSD), NetBSD, OpenBSD, DragonFly BSD, Solaris, Mac OS | |
61 | X, and other Unix-like OSes, as well as GNU Hurd. | |
7cbc1f08 | 62 | |
63 | %description -l pl.UTF-8 | |
8d0a87ec | 64 | flashrom to narzędzie do identyfikacji, odczytu, zapisu, weryfikacji i |
e8789d13 JB |
65 | kasowania układów flash. Jest często używany do programowania obrazów |
66 | BIOS-u / EFI / coreboot / firmware'u. | |
fac14747 JB |
67 | - Obsługuje ponad 470 układów flash, 291 chipsetów, 500 płyt głównych, |
68 | 79 urządzeń PCI, 17 urządzeń USB i różne programatory podłączane | |
69 | przez port równoległy/szeregowy. | |
70 | - Wspiera układy flash równoległe, LPC, FWH i SPI o różnych | |
e8789d13 | 71 | obudowach/wyprowadzeniach (DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, |
fac14747 | 72 | TSOP40, TSOP48, BGA i inne) |
e8789d13 JB |
73 | - Nie wymaga fizycznego dostępu, wystarczy dostęp do konta roota. |
74 | - Nie potrzebuje bootowalnej dyskietki, rozruchowego dysku CD-ROM lub | |
75 | innych nośników. | |
76 | - Nie jest wymagana klawiatura ani monitor. Wystarczy przeprogramować | |
77 | zdalnie poprzez SSH. | |
78 | - Nie ma potrzeby ponownego uruchamiania komputera. Wystarczy | |
79 | przeprogramować układ w uruchomionym systemie, zweryfikować i być | |
fac14747 JB |
80 | szczęśliwym. Nowy firmware będzie dostępny po następnym |
81 | uruchomieniu. | |
e8789d13 | 82 | - Crossflashing i hotflashing są możliwe na tyle, na ile układy flash |
85a10d97 ŁK |
83 | są elektrycznie i logicznie kompatybilne (ten sam protokół). Jest to |
84 | świetna metoda do przywracania sprzętu ze źle zaprogramowanym | |
e8789d13 JB |
85 | firmwarem/BIOS-em. |
86 | - Pozwala na tworzenie skryptów do wielokrotnego programowania. | |
87 | Programowanie identycznych maszyn w tym samym czasie z wiersza | |
fac14747 JB |
88 | poleceń. Zaleca się sprawdzanie komunikatów programu flashrom i |
89 | kodów błędów. | |
e8789d13 JB |
90 | - Szybkość. flashrom jest często znacznie szybszy niż większość |
91 | sprzedawanych narzędzi do flashowania. | |
fac14747 JB |
92 | - Przenośność. Obsługuje systemy DOS, Linux, FreeBSD (w tym |
93 | Debian/kFreeBSD), Dragonfly BSD, Solaris, Mac OS X oraz inne | |
94 | systemy operacyjne oparte na Uniksie, a także GNU Hurd. | |
7cbc1f08 | 95 | |
7a009e4c JB |
96 | %package -n libflashrom |
97 | Summary: Flash ROM programming library | |
98 | Summary(pl.UTF-8): Biblioteka do programowania pamięci Flash ROM | |
99 | Group: Libraries | |
100 | ||
101 | %description -n libflashrom | |
102 | Flash ROM programming library. | |
103 | ||
104 | %description -n libflashrom -l pl.UTF-8 | |
105 | Biblioteka do programowania pamięci Flash ROM. | |
106 | ||
107 | %package -n libflashrom-devel | |
108 | Summary: Header files for libflashrom library | |
109 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libflashrom | |
110 | Group: Development/Libraries | |
111 | Requires: libflashrom = %{version}-%{release} | |
112 | ||
113 | %description -n libflashrom-devel | |
114 | Header files for libflashrom library. | |
115 | ||
116 | %description -n libflashrom-devel -l pl.UTF-8 | |
117 | Pliki nagłówkowe biblioteki libflashrom. | |
118 | ||
a65c0526 JB |
119 | %package -n libflashrom-static |
120 | Summary: Static libflashrom library | |
121 | Summary(pl.UTF-8): Statyczna biblioteka libflashrom | |
122 | Group: Development/Libraries | |
123 | Requires: libflashrom-devel = %{version}-%{release} | |
124 | ||
125 | %description -n libflashrom-static | |
126 | Static libflashrom library. | |
127 | ||
128 | %description -n libflashrom-static -l pl.UTF-8 | |
129 | Statyczna biblioteka libflashrom. | |
130 | ||
7a009e4c JB |
131 | %package -n libflashrom-apidocs |
132 | Summary: API documentation for libflashrom library | |
133 | Summary(pl.UTF-8): Dokumentacja API biblioteki libflashrom | |
134 | Group: Documentation | |
135 | BuildArch: noarch | |
136 | ||
137 | %description -n libflashrom-apidocs | |
138 | API documentation for libflashrom library. | |
139 | ||
140 | %description -n libflashrom-apidocs -l pl.UTF-8 | |
141 | Dokumentacja API biblioteki libflashrom. | |
142 | ||
7cbc1f08 | 143 | %prep |
fac14747 | 144 | %setup -q -n %{name}-v%{version} |
054405d2 | 145 | %patch0 -p1 |
7cbc1f08 | 146 | |
147 | %build | |
7a009e4c | 148 | %meson build \ |
556fb812 | 149 | -Dprogrammer=group_i2c,group_pci,group_serial,group_usb%{?with_ftdi:,group_ftdi}%{?with_jaylink:,group_jlink},internal,linux_mtd,linux_spi%{?with_port_io:,rayer_spi} |
7a009e4c JB |
150 | |
151 | %ninja_build -C build | |
152 | ||
7a009e4c JB |
153 | %if %{with apidocs} |
154 | doxygen | |
155 | %endif | |
7cbc1f08 | 156 | |
157 | %install | |
158 | rm -rf $RPM_BUILD_ROOT | |
7a009e4c JB |
159 | install -d $RPM_BUILD_ROOT%{_mandir}/man8 |
160 | ||
161 | %ninja_install -C build | |
162 | ||
7cbc1f08 | 163 | %clean |
164 | rm -rf $RPM_BUILD_ROOT | |
165 | ||
7a009e4c JB |
166 | %post -n libflashrom -p /sbin/ldconfig |
167 | %postun -n libflashrom -p /sbin/ldconfig | |
168 | ||
7cbc1f08 | 169 | %files |
170 | %defattr(644,root,root,755) | |
7a009e4c | 171 | %doc README Documentation/*.txt |
7cbc1f08 | 172 | %attr(755,root,root) %{_sbindir}/flashrom |
173 | %{_mandir}/man8/flashrom.8* | |
7a009e4c JB |
174 | |
175 | %files -n libflashrom | |
176 | %defattr(644,root,root,755) | |
177 | %attr(755,root,root) %{_libdir}/libflashrom.so.*.*.* | |
178 | %attr(755,root,root) %ghost %{_libdir}/libflashrom.so.1 | |
179 | ||
180 | %files -n libflashrom-devel | |
181 | %defattr(644,root,root,755) | |
182 | %attr(755,root,root) %{_libdir}/libflashrom.so | |
183 | %{_includedir}/libflashrom.h | |
184 | %{_pkgconfigdir}/flashrom.pc | |
185 | ||
a65c0526 JB |
186 | %files -n libflashrom-static |
187 | %defattr(644,root,root,755) | |
188 | %{_libdir}/libflashrom.a | |
189 | ||
7a009e4c JB |
190 | %if %{with apidocs} |
191 | %files -n libflashrom-apidocs | |
192 | %defattr(644,root,root,755) | |
193 | %doc libflashrom-doc/html/{search,*.css,*.html,*.js,*.png} | |
194 | %endif |