a2ab64817cc8cac6a5d963ca3b00da49ec73261f
[packages/trousers.git] / trousers.spec
1 # TODO: tcsd init script (see dist/fedora/fedora.initrd.tcsd)
2 #
3 # Conditional build:
4 %bcond_with     gtk     # use GTK+ popups instead of openssl
5 #
6 Summary:        TrouSerS - The open-source TCG Software Stack
7 Summary(pl.UTF-8):      TrouSerS - programowy stos TCG o otwartych źródłach
8 Name:           trousers
9 Version:        0.3.14
10 Release:        2
11 License:        BSD
12 Group:          Applications/System
13 Source0:        http://downloads.sourceforge.net/trousers/%{name}-%{version}.tar.gz
14 # Source0-md5:  4a476b4f036dd20a764fb54fc24edbec
15 Source1:        tcsd.service
16 Patch0:         no_inline.patch
17 URL:            http://trousers.sourceforge.net/
18 BuildRequires:  autoconf >= 2.50
19 BuildRequires:  automake >= 1.6
20 %{?with_gtk:BuildRequires:      gtk+2-devel >= 1:2.0.0}
21 BuildRequires:  libtool
22 BuildRequires:  openssl-devel
23 BuildRequires:  pkgconfig
24 BuildRequires:  rpmbuild(macros) >= 1.644
25 BuildRequires:  sed >= 4.0
26 Requires(pre):  /bin/id
27 Requires(pre):  /usr/bin/getgid
28 Requires(pre):  /usr/sbin/groupadd
29 Requires(pre):  /usr/sbin/useradd
30 Requires(postun):       /usr/sbin/groupdel
31 Requires(postun):       /usr/sbin/userdel
32 Requires:       %{name}-libs = %{version}-%{release}
33 Provides:       group(tss)
34 Provides:       user(tss)
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 TrouSerS is an open-source TCG Software Stack (TSS), released under
39 the Common Public License. TrouSerS aims to be compliant with the 1.1b
40 and 1.2 TSS specifications available from the Trusted Computing Group
41 website: <http://www.trustedcomputinggroup.org/>.
42
43 %description -l pl.UTF-8
44 TrouSerS to programowy stos TCG (TSS, czyli TCG Software Stack) o
45 otwartych źródłach wydany na licencji Common Public License. Celem
46 projektu jest zgodność ze specyfikacjami TSS 1.1b i 1.2 dostępnymi na
47 stronie Trusted Computing Group:
48 <http://www.trustedcomputinggroup.org/>.
49
50 %package libs
51 Summary:        TrouSerS shared library
52 Summary(pl.UTF-8):      Biblioteka współdzielona TrouSerS
53 Group:          Libraries
54
55 %description libs
56 TrouSerS shared library.
57
58 %description libs -l pl.UTF-8
59 Biblioteka współdzielona TrouSerS.
60
61 %package devel
62 Summary:        Header files for TrouSerS library
63 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki TrouSerS
64 Group:          Development/Libraries
65 Requires:       %{name}-libs = %{version}-%{release}
66 %{?with_gtk:Requires:   gtk+2-devel >= 1:2.0.0}
67 Requires:       openssl-devel
68
69 %description devel
70 Header files for TrouSerS library.
71
72 %description devel -l pl.UTF-8
73 Pliki nagłówkowe biblioteki TrouSerS.
74
75 %package static
76 Summary:        Static TrouSerS library
77 Summary(pl.UTF-8):      Statyczna biblioteka TrouSerS
78 Group:          Development/Libraries
79 Requires:       %{name}-devel = %{version}-%{release}
80
81 %description static
82 Static TrouSerS library.
83
84 %description static -l pl.UTF-8
85 Statyczna biblioteka TrouSerS.
86
87 %prep
88 %setup -q -c
89 %patch0 -p1
90
91 %build
92 %{__libtoolize}
93 %{__aclocal}
94 %{__autoconf}
95 %{__automake}
96 %configure \
97         --enable-static \
98         %{?with_gtk:--with-gui=gtk} \
99         --disable-usercheck
100 %{__make}
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104
105 %{__make} install \
106         DESTDIR=$RPM_BUILD_ROOT
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %pre
112 %groupadd -g 139 tss
113 %useradd -u 139 -d %{_localstatedir}/lib/tpm -s /bin/false -c "TrouSerS user" -g tss tss
114
115 %postun
116 if [ "$1" = "0" ]; then
117         %userremove tss
118         %groupremove tss
119 fi
120
121 %post   libs -p /sbin/ldconfig
122 %postun libs -p /sbin/ldconfig
123
124 %files
125 %defattr(644,root,root,755)
126 %doc AUTHORS ChangeLog LICENSE NICETOHAVES README README.selinux TODO
127 %attr(755,root,root) %{_sbindir}/tcsd
128 %attr(640,root,tss) %{_sysconfdir}/tcsd.conf
129 %attr(700,tss,tss) %{_localstatedir}/lib/tpm
130 %{_mandir}/man5/tcsd.conf.5*
131 %{_mandir}/man8/tcsd.8*
132
133 %files libs
134 %defattr(644,root,root,755)
135 %attr(755,root,root) %{_libdir}/libtspi.so.*.*.*
136 %attr(755,root,root) %ghost %{_libdir}/libtspi.so.1
137
138 %files devel
139 %defattr(644,root,root,755)
140 %doc doc/{LTC-TSS_LLD_08_r2.pdf,TSS_programming_SNAFUs.txt}
141 %attr(755,root,root) %{_libdir}/libtspi.so
142 %{_libdir}/libtspi.la
143 %{_libdir}/libtddl.a
144 %{_includedir}/trousers
145 %{_includedir}/tss
146 %{_mandir}/man3/Tspi_*.3*
147
148 %files static
149 %defattr(644,root,root,755)
150 %{_libdir}/libtspi.a