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