]> git.pld-linux.org Git - packages/tpm_emulator.git/blame - tpm_emulator.spec
- rel 2, rebuild with kernel 3.10.10
[packages/tpm_emulator.git] / tpm_emulator.spec
CommitLineData
bc65ae11
JB
1#
2# Conditional build:
3%bcond_without dist_kernel # without distribution kernel
4%bcond_without kernel # don't build kernel modules
5%bcond_without userspace # don't build userspace packages
6%bcond_with verbose # verbose kernel module build
7#
8%if "%{_alt_kernel}" != "%{nil}"
9%undefine with_userspace
10%endif
11%if %{without kernel}
12%undefine with_dist_kernel
13%endif
87c325d0
JR
14
15%define pname tpm_emulator
16%define rel 2
bc65ae11
JB
17Summary: Software-based TPM and MTM Emulator
18Summary(pl.UTF-8): Programowy emulator TPM i MTM
bc65ae11
JB
19Name: %{pname}%{_alt_kernel}
20Version: 0.7.4
bc65ae11
JB
21Release: %{rel}
22License: GPL v2+
23Group: Applications/System
24Source0: http://downloads.sourceforge.net/tpm-emulator.berlios/%{pname}-%{version}.tar.gz
25# Source0-md5: e26becb8a6a2b6695f6b3e8097593db8
f47ff032 26Patch0: %{pname}-libdir.patch
bc65ae11
JB
27URL: http://tpm-emulator.berlios.de/
28BuildRequires: cmake >= 2.4
29BuildRequires: gmp-devel
30%if %{with dist_kernel}
31BuildRequires: kernel%{_alt_kernel}-module-build
32%endif
33Requires: %{name}-libs = %{version}-%{rel}
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37Software-based TPM and MTM Emulator.
38
39%description -l pl.UTF-8
40Programowy emulator TPM i MTM.
41
42%package libs
43Summary: TSS-conformant device driver library for the emulator
44Summary(pl.UTF-8): Biblioteka sterownika urządzenia zgodnego z TSS dla emulatora
45Group: Libraries
46
47%description libs
48TSS-conformant device driver library for the emulator.
49
50%description libs -l pl.UTF-8
51Biblioteka sterownika urządzenia zgodnego z TSS dla emulatora.
52
53%package devel
54Summary: Header file for TDDL library
55Summary(pl.UTF-8): Plik nagłówkowy biblioteki TDDL
56Group: Development/Libraries
57Requires: %{name}-libs = %{version}-%{rel}
58
59%description devel
60Header file for TDDL library.
61
62%description devel -l pl.UTF-8
63Plik nagłówkowy biblioteki TDDL.
64
65%package static
66Summary: Static TDDL library
67Summary(pl.UTF-8): Statyczna biblioteka TDDL
68Group: Development/Libraries
69Requires: %{name}-devel = %{version}-%{rel}
70
71%description static
72Static TDDL library.
73
74%description static -l pl.UTF-8
75Statyczna biblioteka TDDL.
76
77%package -n kernel%{_alt_kernel}-char-tpmd
78Summary: Kernel module that provides /dev/tpm device
79Summary(pl.UTF-8): Moduł jądra udostępniający urządzenie /dev/tpm
80Group: Base/Kernel
81%if %{with dist_kernel}
82%requires_releq_kernel
83Requires(postun): %releq_kernel
84%endif
85
86%description -n kernel%{_alt_kernel}-char-tpmd
87Kernel module that provides /dev/tpm device for backward compatibility
88and forwards the received commands to tpmd.
89
90%description -n kernel%{_alt_kernel}-char-tpmd -l pl.UTF-8
91Moduł jądra udostępniający dla kompatybilności urządzenie /dev/tpm i
92przekazujący odebrane polecenia do tpmd.
93
94%prep
95%setup -q -n %{pname}-%{version}
f47ff032 96%patch0 -p1
bc65ae11
JB
97
98# separate kernel module from userspace build
99echo > tpmd_dev/CMakeLists.txt
100
101%build
102mkdir build
103cd build
104%cmake ..
105%if %{with userspace}
106%{__make}
107%endif
108cd ..
109%if %{with kernel}
110ln -sf ../../build/config.h tpmd_dev/linux/config.h
111%build_kernel_modules -m tpmd_dev -C tpmd_dev/linux
112%{__make} -C tpmd_dev/linux tpmd_dev.rules
113%endif
114
115%install
116rm -rf $RPM_BUILD_ROOT
117
118%if %{with userspace}
119%{__make} -C build install \
120 DESTDIR=$RPM_BUILD_ROOT
121%endif
122
123%if %{with kernel}
124install -d $RPM_BUILD_ROOT/lib/udev/rules.d
125cd tpmd_dev/linux
126cp -p tpmd_dev.rules $RPM_BUILD_ROOT/lib/udev/rules.d/80-tpmd_dev.rules
127%install_kernel_modules -m tpmd_dev -d misc
128%endif
129
130%clean
131rm -rf $RPM_BUILD_ROOT
132
133%post libs -p /sbin/ldconfig
134%postun libs -p /sbin/ldconfig
135
136%if %{with userspace}
137%files
138%defattr(644,root,root,755)
139%doc AUTHORS ChangeLog README
140%attr(755,root,root) %{_bindir}/tpmd
141
142%files libs
143%defattr(644,root,root,755)
144%attr(755,root,root) %{_libdir}/libtddl.so.*.*.*.*
145%attr(755,root,root) %ghost %{_libdir}/libtddl.so.1.2
146
147%files devel
148%defattr(644,root,root,755)
149%attr(755,root,root) %{_libdir}/libtddl.so
150%{_includedir}/tddl.h
151
152%files static
153%defattr(644,root,root,755)
154%{_libdir}/libtddl.a
155%endif
156
157%if %{with kernel}
158%files -n kernel%{_alt_kernel}-char-tpmd
159%defattr(644,root,root,755)
160/lib/modules/%{_kernel_ver}/misc/tpmd_dev.ko*
161/lib/udev/rules.d/80-tpmd_dev.rules
162%endif
This page took 0.077624 seconds and 4 git commands to generate.