]> git.pld-linux.org Git - packages/libtpms.git/blob - libtpms.spec
BR: perl-tools-pod
[packages/libtpms.git] / libtpms.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static libraries
4 #
5 Summary:        Library providing Trusted Platform Module (TPM) functionality
6 Summary(pl.UTF-8):      Biblioteka zapewniająca funkcjonalność modułu TPM (Trusted Platform Module)
7 Name:           libtpms
8 Version:        0.9.6
9 Release:        1
10 License:        BSD
11 Group:          Libraries
12 #Source0Download: https://github.com/stefanberger/libtpms/tags
13 Source0:        https://github.com/stefanberger/libtpms/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5:  c922a80cb1a098e6f9b2671c0044a388
15 Patch0:         %{name}-x32.patch
16 URL:            https://github.com/stefanberger/libtpms
17 BuildRequires:  autoconf >= 2.69
18 BuildRequires:  automake >= 1.6
19 BuildRequires:  libtool >= 2:2
20 BuildRequires:  openssl-devel
21 BuildRequires:  perl-tools-pod
22 BuildRequires:  pkgconfig
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 A library providing TPM functionality for VMs. Targeted for
27 integration into Qemu.
28
29 %description -l pl.UTF-8
30 Biblioteka zapewniająca funkcjonalność TPM dla maszyn wirtualnych.
31 Głównym przeznaczeniem jest integracja z Qemu.
32
33 %package devel
34 Summary:        Header files for libtpms library
35 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libtpms
36 Group:          Development/Libraries
37 Requires:       %{name} = %{version}-%{release}
38
39 %description devel
40 Header files for libtpms library.
41
42 %description devel -l pl.UTF-8
43 Pliki nagłówkowe biblioteki libtpms.
44
45 %package static
46 Summary:        Static libtpms library
47 Summary(pl.UTF-8):      Statyczna biblioteka libtpms
48 Group:          Development/Libraries
49 Requires:       %{name}-devel = %{version}-%{release}
50
51 %description static
52 Static libtpms library.
53
54 %description static -l pl.UTF-8
55 Statyczna biblioteka libtpms.
56
57 %prep
58 %setup -q
59 %patch0 -p1
60
61 %build
62 %{__libtoolize}
63 %{__aclocal} -I m4
64 %{__autoconf}
65 %{__autoheader}
66 %{__automake}
67 %configure \
68         --disable-silent-rules \
69         %{!?with_static_libs:--disable-static} \
70         --with-openssl
71 %{__make}
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75
76 %{__make} install \
77         DESTDIR=$RPM_BUILD_ROOT
78
79 # add private dependency on libcrypto if not already there
80 ! grep -Eq '^(Requires|Libs\.private)' $RPM_BUILD_ROOT%{_pkgconfigdir}/libtpms.pc || exit 1
81 echo 'Libs.private: -lcrypto' >> $RPM_BUILD_ROOT%{_pkgconfigdir}/libtpms.pc
82
83 # ...to make .la file completely obsolete
84 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtpms.la
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %post   -p /sbin/ldconfig
90 %postun -p /sbin/ldconfig
91
92 %files
93 %defattr(644,root,root,755)
94 %doc CHANGES CREDITS LICENSE README
95 %attr(755,root,root) %{_libdir}/libtpms.so.*.*.*
96 %attr(755,root,root) %ghost %{_libdir}/libtpms.so.0
97
98 %files devel
99 %defattr(644,root,root,755)
100 %attr(755,root,root) %{_libdir}/libtpms.so
101 %{_includedir}/libtpms
102 %{_pkgconfigdir}/libtpms.pc
103 %{_mandir}/man3/TPMLIB_*.3*
104 %{_mandir}/man3/TPM_*.3*
105
106 %if %{with static_libs}
107 %files static
108 %defattr(644,root,root,755)
109 %{_libdir}/libtpms.a
110 %endif
This page took 0.135029 seconds and 3 git commands to generate.