]> git.pld-linux.org Git - packages/trousers.git/blob - trousers.spec
add systemd unit for tcsd
[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.13
10 Release:        2
11 License:        BSD
12 Group:          Applications/System
13 Source0:        http://downloads.sourceforge.net/trousers/%{name}-%{version}.tar.gz
14 # Source0-md5:  ad508f97b406f6e48cd90e85d78e7ca8
15 Source1:        tcsd.service
16 Patch0:         no_inline.patch
17 URL:            http://trousers.sourceforge.net/
18 BuildRequires:  autoconf
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 Requires:       systemd-units >= 38
34 Provides:       group(tss)
35 Provides:       user(tss)
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 TrouSerS is an open-source TCG Software Stack (TSS), released under
40 the Common Public License. TrouSerS aims to be compliant with the 1.1b
41 and 1.2 TSS specifications available from the Trusted Computing Group
42 website: <http://www.trustedcomputinggroup.org/>.
43
44 %description -l pl.UTF-8
45 TrouSerS to programowy stos TCG (TSS, czyli TCG Software Stack) o
46 otwartych źródłach wydany na licencji Common Public License. Celem
47 projektu jest zgodność ze specyfikacjami TSS 1.1b i 1.2 dostępnymi na
48 stronie Trusted Computing Group:
49 <http://www.trustedcomputinggroup.org/>.
50
51 %package libs
52 Summary:        TrouSerS shared library
53 Summary(pl.UTF-8):      Biblioteka współdzielona TrouSerS
54 Group:          Libraries
55
56 %description libs
57 TrouSerS shared library.
58
59 %description libs -l pl.UTF-8
60 Biblioteka współdzielona TrouSerS.
61
62 %package devel
63 Summary:        Header files for TrouSerS library
64 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki TrouSerS
65 Group:          Development/Libraries
66 Requires:       %{name}-libs = %{version}-%{release}
67 %{?with_gtk:Requires:   gtk+2-devel >= 1:2.0.0}
68 Requires:       openssl-devel
69
70 %description devel
71 Header files for TrouSerS library.
72
73 %description devel -l pl.UTF-8
74 Pliki nagłówkowe biblioteki TrouSerS.
75
76 %package static
77 Summary:        Static TrouSerS library
78 Summary(pl.UTF-8):      Statyczna biblioteka TrouSerS
79 Group:          Development/Libraries
80 Requires:       %{name}-devel = %{version}-%{release}
81
82 %description static
83 Static TrouSerS library.
84
85 %description static -l pl.UTF-8
86 Statyczna biblioteka TrouSerS.
87
88 %prep
89 %setup -q
90
91 %patch0 -p1
92
93 # there is some unused variable causing warning
94 sed -i -e 's/-Werror //' configure.in
95
96 %build
97 %{__libtoolize}
98 %{__aclocal}
99 %{__autoconf}
100 %{__automake}
101 %configure \
102         --enable-static \
103         %{?with_gtk:--with-gui=gtk} \
104         --disable-usercheck
105 %{__make}
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109
110 %{__make} install \
111         DESTDIR=$RPM_BUILD_ROOT
112
113 install %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/tcsd.service
114
115 %clean
116 rm -rf $RPM_BUILD_ROOT
117
118 %pre
119 %groupadd -g 139 tss
120 %useradd -u 139 -d %{_localstatedir}/lib/tpm -s /bin/false -c "TrouSerS user" -g tss tss
121
122 %post
123 %systemd_post tcsd.service
124
125 %preun
126 %systemd_preun tcsd.service
127
128 %postun
129 if [ "$1" = "0" ]; then
130         %userremove tss
131         %groupremove tss
132 fi
133 %systemd_reload
134
135 %post   libs -p /sbin/ldconfig
136 %postun libs -p /sbin/ldconfig
137
138 %files
139 %defattr(644,root,root,755)
140 %doc AUTHORS ChangeLog LICENSE NICETOHAVES README README.selinux TODO
141 %attr(755,root,root) %{_sbindir}/tcsd
142 %attr(640,root,tss) %{_sysconfdir}/tcsd.conf
143 %attr(700,tss,tss) %{_localstatedir}/lib/tpm
144 %{_mandir}/man5/tcsd.conf.5*
145 %{_mandir}/man8/tcsd.8*
146 %{systemdunitdir}/tcsd.service
147
148 %files libs
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_libdir}/libtspi.so.*.*.*
151 %attr(755,root,root) %ghost %{_libdir}/libtspi.so.1
152
153 %files devel
154 %defattr(644,root,root,755)
155 %doc doc/{LTC-TSS_LLD_08_r2.pdf,TSS_programming_SNAFUs.txt}
156 %attr(755,root,root) %{_libdir}/libtspi.so
157 %{_libdir}/libtspi.la
158 %{_libdir}/libtddl.a
159 %{_includedir}/trousers
160 %{_includedir}/tss
161 %{_mandir}/man3/Tspi_*.3*
162
163 %files static
164 %defattr(644,root,root,755)
165 %{_libdir}/libtspi.a
This page took 0.18235 seconds and 3 git commands to generate.