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