]> git.pld-linux.org Git - packages/fwupdate.git/blob - fwupdate.spec
- updated to 0.4
[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:        0.4
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:  b016615c506aba60c5a2de3de7ce1bab
14 Patch0:         %{name}-open.patch
15 URL:            https://github.com/rhinstaller/fwupdate
16 BuildRequires:  efivar-devel >= 0.19
17 BuildRequires:  gnu-efi
18 %{?with_pesign:BuildRequires:   pesign}
19 BuildRequires:  popt-devel
20 BuildRequires:  sed >= 4.0
21 Requires:       %{name}-libs = %{version}-%{release}
22 #Requires(post):        efibootmgr >= 0.12
23 ExclusiveArch:  %{ix86} %{x8664} arm aarch64 ia64
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         efidir          pld
27
28 %description
29 fwupdate provides a simple command line interface to the UEFI firmware
30 updates.
31
32 %description -l pl.UTF-8
33 fwupdate zapewnia prosty interfejs linii poleceń do aktualizacji
34 firmware'u przez UEFI.
35
36 %package libs
37 Summary:        Library to manage UEFI firmware updates
38 Summary(pl.UTF-8):      Biblioteka do zarządzania aktualizacjami firmware'u przez UEFI
39 Group:          Libraries
40 Requires:       efivar-libs >= 0.19
41
42 %description libs
43 Library to manage UEFI firmware updates.
44
45 %description libs -l pl.UTF-8
46 Biblioteka do zarządzania aktualizacjami firmware'u przez UEFI.
47
48 %package devel
49 Summary:        Header files for libfwup library
50 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libfwup
51 Group:          Development/Libraries
52 Requires:       %{name}-libs = %{version}-%{release}
53 Requires:       efivar-devel >= 0.19
54
55 %description devel
56 Header files for libfwup library.
57
58 %description devel -l pl.UTF-8
59 Pliki nagłówkowe biblioteki libfwup.
60
61 %prep
62 %setup -q
63 %patch0 -p1
64
65 %if %{without pesign}
66 %{__sed} -i -e 's/pesign/cp $< $@ \&\& : &/' efi/Makefile
67 %endif
68
69 %build
70 %{__make} \
71 %ifarch x32
72         ARCH=x86_64 \
73 %endif
74         CC="%{__cc}" \
75         CFLAGS="%{rpmcflags}" \
76         EFIDIR=%{efidir} \
77         GNUEFIDIR=%{_libdir} \
78         libdir=%{_libdir}
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82
83 %{__make} install \
84 %ifarch x32
85         ARCH=x86_64 \
86 %endif
87         DESTDIR=$RPM_BUILD_ROOT \
88         EFIDIR=%{efidir} \
89         libdir=%{_libdir}
90
91 # empty
92 %{__rm} $RPM_BUILD_ROOT%{_localedir}/en/*.po
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %if 0
98 # Fedora script below - but we don't want to hardcode /dev/sda
99 %post
100 efibootmgr -b 1337 -B >/dev/null || :
101 efibootmgr -C -b 1337 -d /dev/sda -p 1 -l /EFI/%{efidir}/fwupdate.efi -L "Firmware Update" >/dev/null || :
102 %endif
103
104 %post   libs -p /sbin/ldconfig
105 %postun libs -p /sbin/ldconfig
106
107 %files
108 %defattr(644,root,root,755)
109 %doc TODO
110 %attr(755,root,root) %{_bindir}/fwupdate
111 %{_mandir}/man1/fwupdate.1*
112 %dir /boot/efi/EFI/%{efidir}
113 /boot/efi/EFI/%{efidir}/fwupdate.efi
114 %dir /boot/efi/EFI/%{efidir}/fw
115
116 %files libs
117 %defattr(644,root,root,755)
118 %attr(755,root,root) %{_libdir}/libfwup.so.0.4
119
120 %files devel
121 %defattr(644,root,root,755)
122 %attr(755,root,root) %{_libdir}/libfwup.so
123 %{_includedir}/fwup.h
124 %{_pkgconfigdir}/fwup.pc
125 %{_mandir}/man3/fwup_*.3*
126 %{_mandir}/man3/libfwup.3*
127 %{_mandir}/man3/libfwup.h.3*
This page took 0.071189 seconds and 3 git commands to generate.