]> git.pld-linux.org Git - packages/libflashrom.git/blob - libflashrom.spec
- initial
[packages/libflashrom.git] / libflashrom.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs # API documentation
4 #
5 Summary:        Flash ROM programming library
6 Summary(pl.UTF-8):      Biblioteka do programowania pamięci Flash ROM
7 Name:           libflashrom
8 Version:        0
9 %define gitref  cdaebf16a766be01f8f3dfe17c05bc6626da2964
10 %define snap    20190207
11 %define rel     1
12 Release:        0.%{snap}.1
13 License:        GPL v2+
14 Group:          Libraries
15 # releases? (currently only a copy of flashrom releases) https://github.com/fwupd/flashrom/releases
16 # branch https://github.com/fwupd/flashrom/commits/wip/hughsie/fwupd
17 Source0:        https://github.com/fwupd/flashrom/archive/%{gitref}/flashrom-%{snap}.tar.gz
18 # Source0-md5:  f54475af56c26dd584f804aad4ed708f
19 URL:            https://github.com/fwupd/flashrom
20 %{?with_apidocs:BuildRequires:  doxygen}
21 BuildRequires:  gcc >= 5:3.2
22 BuildRequires:  libftdi1-devel >= 1.0
23 BuildRequires:  libusb-compat-devel >= 0.1
24 BuildRequires:  libusb-devel >= 1.0
25 BuildRequires:  meson >= 0.47.0
26 BuildRequires:  ninja >= 1.5
27 BuildRequires:  pciutils-devel
28 BuildRequires:  pkgconfig
29 BuildRequires:  rpmbuild(macros) >= 1.736
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Flash ROM programming library.
34
35 %description -l pl.UTF-8
36 Biblioteka do programowania pamięci Flash ROM.
37
38 %package devel
39 Summary:        Header files for libflashrom library
40 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libflashrom
41 Group:          Development/Libraries
42 Requires:       %{name} = %{version}-%{release}
43
44 %description devel
45 Header files for libflashrom library.
46
47 %description devel -l pl.UTF-8
48 Pliki nagłówkowe biblioteki libflashrom.
49
50 %package apidocs
51 Summary:        API documentation for libflashrom library
52 Summary(pl.UTF-8):      Dokumentacja API biblioteki libflashrom
53 Group:          Documentation
54 %if "%{_rpmversion}" >= "5"
55 BuildArch:      noarch
56 %endif
57
58 %description apidocs
59 API documentation for libflashrom library.
60
61 %description apidocs -l pl.UTF-8
62 Dokumentacja API biblioteki libflashrom.
63
64 %prep
65 %setup -q -n flashrom-%{gitref}
66
67 %build
68 %meson build
69
70 %ninja_build -C build
71
72 %if %{with apidocs}
73 doxygen
74 %endif
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 %ninja_install -C build
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %post   -p /sbin/ldconfig
85 %postun -p /sbin/ldconfig
86
87 %files
88 %defattr(644,root,root,755)
89 %doc README Documentation/*.txt
90 %attr(755,root,root) %{_libdir}/libflashrom.so.*.*.*
91 %attr(755,root,root) %ghost %{_libdir}/libflashrom.so.1
92
93 %files devel
94 %defattr(644,root,root,755)
95 %attr(755,root,root) %{_libdir}/libflashrom.so
96 %{_includedir}/libflashrom.h
97 %{_pkgconfigdir}/libflashrom.pc
98
99 %if 0
100 # is it stable enough to obsolete one from flashrom.spec?
101 %files tools
102 %defattr(644,root,root,755)
103 %attr(755,root,root) %{_sbindir}/flashrom
104 %endif
105
106 %if %{with apidocs}
107 %files apidocs
108 %defattr(644,root,root,755)
109 %doc libflashrom-doc/html/{search,*.css,*.html,*.js,*.png}
110 %endif
This page took 0.079373 seconds and 3 git commands to generate.