]> git.pld-linux.org Git - packages/fwupdate.git/blob - fwupdate.spec
- updated URL
[packages/fwupdate.git] / fwupdate.spec
1 #
2 # Conditional build:
3 %bcond_with     pesign          # EFI apps signing with pesign
4 #
5 Summary:        Tools to manage UEFI firmware updates
6 Summary(pl.UTF-8):      Narzędzia do zarządzania aktualizacjami firmware'u przez UEFI
7 Name:           fwupdate
8 Version:        11
9 Release:        1
10 License:        GPL v2
11 Group:          Libraries
12 #Source0Download: https://github.com/rhboot/fwupdate/releases
13 Source0:        https://github.com/rhboot/fwupdate/releases/download/%{version}/%{name}-%{version}.tar.bz2
14 # Source0-md5:  ec833aea7a59c17128f1bdf521a9ac9f
15 URL:            https://github.com/rhinstaller/fwupdate
16 BuildRequires:  efivar-devel >= 0.33
17 BuildRequires:  gnu-efi >= 3.0.5
18 BuildRequires:  libsmbios-devel
19 %{?with_pesign:BuildRequires:   pesign}
20 BuildRequires:  popt-devel
21 BuildRequires:  sed >= 4.0
22 Requires:       %{name}-libs = %{version}-%{release}
23 #Requires(post):        efibootmgr >= 0.13
24 ExclusiveArch:  %{ix86} %{x8664} x32 %{arm} aarch64 ia64
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         efidir          pld
28
29 %description
30 fwupdate provides a simple command line interface to the UEFI firmware
31 updates.
32
33 %description -l pl.UTF-8
34 fwupdate zapewnia prosty interfejs linii poleceń do aktualizacji
35 firmware'u przez UEFI.
36
37 %package libs
38 Summary:        Library to manage UEFI firmware updates
39 Summary(pl.UTF-8):      Biblioteka do zarządzania aktualizacjami firmware'u przez UEFI
40 Group:          Libraries
41 Requires:       efivar-libs >= 0.33
42
43 %description libs
44 Library to manage UEFI firmware updates.
45
46 %description libs -l pl.UTF-8
47 Biblioteka do zarządzania aktualizacjami firmware'u przez UEFI.
48
49 %package devel
50 Summary:        Header files for libfwup library
51 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libfwup
52 Group:          Development/Libraries
53 Requires:       %{name}-libs = %{version}-%{release}
54 Requires:       efivar-devel >= 0.33
55
56 %description devel
57 Header files for libfwup library.
58
59 %description devel -l pl.UTF-8
60 Pliki nagłówkowe biblioteki libfwup.
61
62 %package -n bash-completion-fwupdate
63 Summary:        Bash completion for fwupdate command
64 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów polecenia fwupdate
65 Group:          Applications/Shells
66 Requires:       %{name} = %{version}-%{release}
67 Requires:       bash-completion >= 2.0
68
69 %description -n bash-completion-fwupdate
70 Bash completion for fwupdate command.
71
72 %description -n bash-completion-fwupdate -l pl.UTF-8
73 Bashowe uzupełnianie parametrów polecenia fwupdate.
74
75 %prep
76 %setup -q
77
78 %if %{without pesign}
79 %{__sed} -i -e 's/pesign/cp $< $@ \&\& : &/' efi/Makefile
80 %endif
81
82 %ifarch x32
83 %{__sed} -i -e '/^BUILDFLAGS\s*:= /s/:= /:= -m64 /' efi/Makefile
84 %endif
85
86 %build
87 %{__make} -j1 \
88 %ifarch x32
89         ARCH=x86_64 \
90 %endif
91         CC="%{__cc}" \
92         CFLAGS="%{rpmcflags}" \
93         EFIDIR=%{efidir} \
94         GNUEFIDIR=%{_libdir} \
95         libdir=%{_libdir} \
96         libexecdir=%{_libexecdir}
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 %{__make} -j1 install \
102 %ifarch x32
103         ARCH=x86_64 \
104 %endif
105         DESTDIR=$RPM_BUILD_ROOT \
106         EFIDIR=%{efidir} \
107         libdir=%{_libdir} \
108         libexecdir=%{_libexecdir}
109
110 # fix location
111 install -d $RPM_BUILD_ROOT%{systemdunitdir}
112 %{__mv} $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system/*.service $RPM_BUILD_ROOT%{systemdunitdir}
113
114 # empty
115 %{__rm} $RPM_BUILD_ROOT%{_localedir}/en/*.po
116
117 # debuginfo installed by make install?
118 %{__rm} -r $RPM_BUILD_ROOT{%{_prefix}/lib/debug,%{_prefix}/src/debug}
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %if 0
124 # Fedora script below - but we don't want to hardcode /dev/sda
125 %post
126 efibootmgr -b 1337 -B >/dev/null || :
127 efibootmgr -C -b 1337 -d /dev/sda -p 1 -l /EFI/%{efidir}/fwupdate.efi -L "Firmware Update" >/dev/null || :
128 %endif
129
130 %post   libs -p /sbin/ldconfig
131 %postun libs -p /sbin/ldconfig
132
133 %files
134 %defattr(644,root,root,755)
135 %doc TODO
136 %attr(755,root,root) %{_bindir}/fwupdate
137 %dir %{_libexecdir}/fwupdate
138 %attr(755,root,root) %{_libexecdir}/fwupdate/cleanup
139 %{systemdunitdir}/fwupdate-cleanup.service
140 %{_mandir}/man1/fwupdate.1*
141 %dir /boot/efi/EFI/%{efidir}
142 %ifarch %{ix86}
143 /boot/efi/EFI/%{efidir}/fwupia32.efi
144 %endif
145 %ifarch %{x8664} x32
146 /boot/efi/EFI/%{efidir}/fwupx64.efi
147 %endif
148 %ifarch %{arm}
149 /boot/efi/EFI/%{efidir}/fwuparm.efi
150 %endif
151 %ifarch aarch64
152 /boot/efi/EFI/%{efidir}/fwupaa64.efi
153 %endif
154 %ifnarch %{ix86} %{x8664} x32 %{arm} aarch64
155 /boot/efi/EFI/%{efidir}/fwupdate.efi
156 %endif
157 %dir /boot/efi/EFI/%{efidir}/fw
158
159 %files libs
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_libdir}/libfwup.so.*.*
162 %attr(755,root,root) %ghost %{_libdir}/libfwup.so.1
163
164 %files devel
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_libdir}/libfwup.so
167 %{_includedir}/fwup.h
168 %{_includedir}/fwup-version.h
169 %{_pkgconfigdir}/fwup.pc
170 %{_mandir}/man3/fwup_*.3*
171 %{_mandir}/man3/libfwup.3*
172 %{_mandir}/man3/libfwup.h.3*
173
174 %files -n bash-completion-fwupdate
175 %defattr(644,root,root,755)
176 %{_datadir}/bash-completion/completions/fwupdate
This page took 0.076499 seconds and 3 git commands to generate.