1 # TODO: handle selinux policy (--with-sepolicy)
4 %bcond_without static_libs # static library
5 %bcond_without tests # unit/emulated integration tests
7 Summary: TPM2 Access Broker and Resource Management Daemon
8 Summary(pl.UTF-8): Broker dostępu i demon zarządzający zasobami TPM2
14 #Source0Download: https://github.com/tpm2-software/tpm2-abrmd/releases
15 Source0: https://github.com/tpm2-software/tpm2-abrmd/releases/download/%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5: 4fd91ea71a48c8ee4d63ab77eb1f17ac
17 URL: https://github.com/tpm2-software/tpm2-abrmd
18 BuildRequires: glib2-devel >= 2.0
19 BuildRequires: pkgconfig
20 BuildRequires: sed >= 4.0
21 BuildRequires: tpm2-tss-devel >= 2.4.0
23 BuildRequires: cmocka-devel >= 1.0
24 # ss (real iproute2 package required, not the false one provided by vserver-packages)
25 BuildRequires: /sbin/ss
26 BuildRequires: iproute2
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 This is a system daemon implementing the TPM2 access broker (TAB) &
34 Resource Manager (RM) spec from the TCG. The daemon (tpm2-abrmd) is
35 implemented using GLib and the GObject system.
37 %description -l pl.UTF-8
38 Ten pakiet zawiera demona będącego implementacją spefycikacji
39 brokera dostępowego TPM2 (TAB) oraz zarządcy zasobów (RM) pochodzących
40 z TCG. Demon jest zaimplementowany przy użyciu bibliotek GLib i
44 Summary: Header files for tpm2-abrmd library
45 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki tpm2-abrmd
46 Group: Development/Libraries
47 Requires: %{name} = %{version}-%{release}
48 Requires: glib2-devel >= 2.0
49 Requires: tpm2-tss-devel
52 Header files for tpm2-abrmd library.
54 %description devel -l pl.UTF-8
55 Pliki nagłówkowe biblioteki tpm2-abrmd.
58 Summary: Static tpm2-abrmd library
59 Summary(pl.UTF-8): Statyczna biblioteka tpm2-abrmd
60 Group: Development/Libraries
61 Requires: %{name}-devel = %{version}-%{release}
64 Static tpm2-abrmd library.
66 %description static -l pl.UTF-8
67 Statyczna biblioteka tpm2-abrmd.
72 # set VERSION properly when there is no .git directory
73 %{__sed} -i -e 's/m4_esyscmd_s(\[git describe --tags --always --dirty\])/%{version}/' configure.ac
81 export PATH=${PATH:+$PATH:}/sbin
83 %{?with_tests:--enable-integration} \
84 --disable-silent-rules \
85 %{!?with_static_libs:--disable-static-libs} \
86 %{?with_tests:--enable-unit} \
87 --with-dbuspolicydir=%{_datadir}/dbus-1/system.d \
88 --with-systemdpresetdir=/lib/systemd/system-preset \
89 --with-systemdsystemunitdir=%{systemdunitdir}
98 rm -rf $RPM_BUILD_ROOT
101 DESTDIR=$RPM_BUILD_ROOT
103 # obsoleted by pkg-config
104 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtss2-tcti-tabrmd.la
107 rm -rf $RPM_BUILD_ROOT
110 %defattr(644,root,root,755)
111 %doc AUTHORS CHANGELOG.md LICENSE README.md
112 %attr(755,root,root) %{_sbindir}/tpm2-abrmd
113 %attr(755,root,root) %{_libdir}/libtss2-tcti-tabrmd.so.*.*.*
114 %attr(755,root,root) %ghost %{_libdir}/libtss2-tcti-tabrmd.so.0
115 %{_datadir}/dbus-1/system-services/com.intel.tss2.Tabrmd.service
116 %{_datadir}/dbus-1/system.d/tpm2-abrmd.conf
117 /lib/systemd/system-preset
118 %{systemdunitdir}/tpm2-abrmd.service
119 %{_mandir}/man8/tpm2-abrmd.8*
122 %defattr(644,root,root,755)
123 %attr(755,root,root) %{_libdir}/libtss2-tcti-tabrmd.so
124 %{_includedir}/tss2/tss2-tcti-tabrmd.h
125 %{_pkgconfigdir}/tss2-tcti-tabrmd.pc
126 %{_mandir}/man3/Tss2_Tcti_Tabrmd_Init.3*
127 %{_mandir}/man7/tss2-tcti-tabrmd.7*
129 %if %{with static_libs}
131 %defattr(644,root,root,755)
132 %{_libdir}/libtss2-tcti-tabrmd.a