]> git.pld-linux.org Git - packages/fwupdate.git/blob - fwupdate.spec
- updated to 9
[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:        9
9 Release:        1
10 License:        GPL v2
11 Group:          Libraries
12 Source0:        https://github.com/rhinstaller/fwupdate/archive/%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5:  0ce656b18a60256a7cf9fa42fd5d99de
14 Patch0:         %{name}-overflow.patch
15 Patch1:         %{name}-undefined.patch
16 URL:            https://github.com/rhinstaller/fwupdate
17 BuildRequires:  efivar-devel >= 0.30
18 BuildRequires:  gnu-efi
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.12
24 ExclusiveArch:  %{ix86} %{x8664} 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.30
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.30
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 %patch0 -p1
78 %patch1 -p1
79
80 %if %{without pesign}
81 %{__sed} -i -e 's/pesign/cp $< $@ \&\& : &/' efi/Makefile
82 %endif
83
84 %build
85 %{__make} \
86 %ifarch x32
87         ARCH=x86_64 \
88 %endif
89         CC="%{__cc}" \
90         CFLAGS="%{rpmcflags}" \
91         EFIDIR=%{efidir} \
92         GNUEFIDIR=%{_libdir} \
93         libdir=%{_libdir} \
94         libexecdir=%{_libexecdir}
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98
99 %{__make} install \
100 %ifarch x32
101         ARCH=x86_64 \
102 %endif
103         DESTDIR=$RPM_BUILD_ROOT \
104         EFIDIR=%{efidir} \
105         libdir=%{_libdir} \
106         libexecdir=%{_libexecdir}
107
108 # fix location
109 install -d $RPM_BUILD_ROOT%{systemdunitdir}
110 %{__mv} $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system/*.service $RPM_BUILD_ROOT%{systemdunitdir}
111
112 # empty
113 %{__rm} $RPM_BUILD_ROOT%{_localedir}/en/*.po
114
115 # debuginfo installed by make install?
116 %{__rm} -r $RPM_BUILD_ROOT{%{_prefix}/lib/debug,%{_prefix}/src/debug}
117
118 %clean
119 rm -rf $RPM_BUILD_ROOT
120
121 %if 0
122 # Fedora script below - but we don't want to hardcode /dev/sda
123 %post
124 efibootmgr -b 1337 -B >/dev/null || :
125 efibootmgr -C -b 1337 -d /dev/sda -p 1 -l /EFI/%{efidir}/fwupdate.efi -L "Firmware Update" >/dev/null || :
126 %endif
127
128 %post   libs -p /sbin/ldconfig
129 %postun libs -p /sbin/ldconfig
130
131 %files
132 %defattr(644,root,root,755)
133 %doc TODO
134 %attr(755,root,root) %{_bindir}/fwupdate
135 %dir %{_libexecdir}/fwupdate
136 %attr(755,root,root) %{_libexecdir}/fwupdate/cleanup
137 %{_datadir}/fwupdate
138 %{systemdunitdir}/fwupdate-cleanup.service
139 %{_mandir}/man1/fwupdate.1*
140 %dir /boot/efi/EFI/%{efidir}
141 %ifarch %{ix86}
142 /boot/efi/EFI/%{efidir}/fwupia32.efi
143 %endif
144 %ifarch %{x8664} x32
145 /boot/efi/EFI/%{efidir}/fwupx64.efi
146 %endif
147 %ifarch arm
148 /boot/efi/EFI/%{efidir}/fwuparm.efi
149 %endif
150 %ifarch aarch64
151 /boot/efi/EFI/%{efidir}/fwupaa64.efi
152 %endif
153 %ifnarch %{ix86} %{x8664} x32 arm aarch64
154 /boot/efi/EFI/%{efidir}/fwupdate.efi
155 %endif
156 %dir /boot/efi/EFI/%{efidir}/fw
157
158 %files libs
159 %defattr(644,root,root,755)
160 %attr(755,root,root) %{_libdir}/libfwup.so.*.*
161 %attr(755,root,root) %ghost %{_libdir}/libfwup.so.1
162
163 %files devel
164 %defattr(644,root,root,755)
165 %attr(755,root,root) %{_libdir}/libfwup.so
166 %{_includedir}/fwup.h
167 %{_includedir}/fwup-version.h
168 %{_pkgconfigdir}/fwup.pc
169 %{_mandir}/man3/fwup_*.3*
170 %{_mandir}/man3/libfwup.3*
171 %{_mandir}/man3/libfwup.h.3*
172
173 %files -n bash-completion-fwupdate
174 %defattr(644,root,root,755)
175 %{_datadir}/bash-completion/completions/fwupdate
This page took 0.090071 seconds and 3 git commands to generate.