OSDN Git Service

Fixed and cleanup condition(LT/LE/GT/GE) check in FSM
[openpts/openpts.git] / dist / openpts.spec.in
1
2 %define name            @PACKAGE@
3 %define version         @VERSION@
4 %define release         1
5
6 Name:           %{name}
7 Version:        %{version}
8 Release:        %{release}
9 Summary:        TCG Platform Trust Service (PTS)
10
11 Group:          Applications/System
12 License:        CPL
13 URL:            http://sourceforge.jp/projects/openpts/
14 Source0:        %{name}-%{version}.tar.gz
15 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
16
17 BuildRequires:  autoconf automake libtool trousers-devel openssl-devel libxml2-devel libuuid-devel
18 Requires:       trousers >= 0.3.6, openssl >= 1.0.0, libxml2, libuuid
19
20 # libtnc only supported by Fedora 10-12, RHEL does not support libtnc
21 %define with_tboot 0
22 #%define with_libtnc 0
23
24 %if 0%{?fedora} >= 14
25 #BuildRequires: libtnc-devel
26 Requires:      tboot libtnc
27 %define with_tboot 1
28 #%define with_libtnc 1
29 %endif
30
31 %description
32 OpenPTS is an open-source package of Platform Trust Service (PTS)
33 defined by Trusted Computing Group (TCG). Trusted Computing is a set of
34 specifications set forth by the Trusted Computing Group (TCG).
35
36 %prep
37 %setup -q
38
39
40 %build
41
42 # %configure --disable-static --prefix=/usr --libdir=%{_libdir} --with-tss --with-aru --enable-tnc \
43 # %configure --prefix=/usr --libdir=%{_libdir} --with-tss --with-aru --enable-tnc \
44
45 %configure --disable-static --prefix=/usr --libdir=%{_libdir} --with-tss --with-aru --enable-tnc \
46 %if %{with_tboot}
47   --with-tboot \
48 %endif
49
50 # DISABLE -j4 to build with libopenpts.so
51 #make %{?_smp_mflags}
52 make
53
54
55 %install
56 # This line keeps build machines from being affected
57 [ "${RPM_BUILD_ROOT}" != "/" ] && [ -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT};
58
59 #mkdir -p ${RPM_BUILD_ROOT}
60 mkdir -p ${RPM_BUILD_ROOT}/%{_initrddir}
61 cp dist/fedora.initrd.ptsc ${RPM_BUILD_ROOT}/%{_initrddir}/ptsc
62 cp dist/ptsc.conf ${RPM_BUILD_ROOT}/%{_sysconfdir}/ptsc.conf
63 #%if %{with_libtnc}
64 cp dist/ptsv.conf ${RPM_BUILD_ROOT}/%{_sysconfdir}/ptsv.conf
65 #%endif
66 mkdir -p ${RPM_BUILD_ROOT}/%{_prefix}/share/openpts/models
67 cp models/*.uml ${RPM_BUILD_ROOT}/%{_prefix}/share/openpts/models/
68
69 mkdir -p ${RPM_BUILD_ROOT}/%{_prefix}/share/openpts/tpm_emulator
70 cp dist/tpm_emulator/README.rhel ${RPM_BUILD_ROOT}/%{_prefix}/share/openpts/tpm_emulator/README
71 cp dist/tpm_emulator/binary_bios_measurements ${RPM_BUILD_ROOT}/%{_prefix}/share/openpts/tpm_emulator/
72 cp dist/tpm_emulator/tcsd ${RPM_BUILD_ROOT}/%{_prefix}/share/openpts/tpm_emulator/
73
74 %if %{with_tboot}
75 mkdir -p ${RPM_BUILD_ROOT}/%{_prefix}/share/openpts/tboot
76 cp dist/tboot/README.fedora15 ${RPM_BUILD_ROOT}/%{_prefix}/share/openpts/tboot/README
77 cp dist/tboot/ptsc.conf.fedora15 ${RPM_BUILD_ROOT}/%{_prefix}/share/openpts/tboot/ptsc.conf
78 cp dist/tboot/tcsd.conf.fedora15 ${RPM_BUILD_ROOT}/%{_prefix}/share/openpts/tboot/tcsd.conf
79 cp dist/tboot/tcsd.fedora15 ${RPM_BUILD_ROOT}/%{_prefix}/share/openpts/tboot/tcsd
80 %endif
81
82 make install DESTDIR=${RPM_BUILD_ROOT}
83
84
85 %clean
86 rm -rf ${RPM_BUILD_ROOT}
87
88 %pre
89 getent group ptsc >/dev/null || groupadd -r ptsc
90
91
92 %files
93 %defattr(-,root,root,-)
94 %doc LICENSE README
95 %attr(755, root, root) %{_sbindir}/ptsc
96 %attr(755, root, root) %{_bindir}/openpts
97 %attr(755, root, root) %{_bindir}/uml2dot
98 #%attr(755, root, root) %{_bindir}/iml2aide
99 %attr(755, root, root) %{_bindir}/tpm_createkey
100 %attr(755, root, root) %{_bindir}/tpm_readpcr
101 %attr(755, root, root) %{_bindir}/tpm_extendpcr
102 %attr(755, root, root) %{_bindir}/iml2text
103 %attr(755, root, root) %{_bindir}/ir2text
104 %attr(755, root, root) %{_bindir}/rm2dot
105 %if %{with_tboot}
106 %attr(755, root, root) %{_bindir}/tboot2iml
107 %{_prefix}/share/openpts/tboot/*
108 %endif
109 %{_libdir}/libopenpts.la
110 %{_libdir}/libopenpts*.so
111 #%if %{with_libtnc}
112 %{_libdir}/libopenpts_imc.la
113 %{_libdir}/libopenpts_imc.so*
114 %{_libdir}/libopenpts_imv.la
115 %{_libdir}/libopenpts_imv.so*
116 %config(noreplace) %attr(640, root, ptsc) %{_sysconfdir}/ptsv.conf
117 #%endif
118 %{_prefix}/share/openpts/models/*uml
119 %{_prefix}/share/openpts/tpm_emulator/*
120 %{_prefix}/share/locale/ja/LC_MESSAGES/openpts.mo
121 %config(noreplace) %attr(640, root, ptsc) %{_sysconfdir}/ptsc.conf
122 #%{_mandir}/man1/openpts*
123 #%{_mandir}/man8/openpts*
124 # Fedora/RHEL
125 %{_initrddir}/ptsc
126
127
128 %post -p /sbin/ldconfig
129
130 %postun -p /sbin/ldconfig
131
132 %changelog
133 * Fri Dec 16 2011 Seiji Munetoh <munetoh@users.sourceforge.jp> - 0.2.6
134 - remove aide support
135 - add ARU support
136 * Fri Jun 24 2011 Seiji Munetoh <munetoh@users.sourceforge.jp> - 0.2.5
137 - added TNC IMV/IMC, configure --enable-tnc
138 - added libopenpts.so
139
140 * Fri May  6 2011 Seiji Munetoh <munetoh@users.sourceforge.jp> - 0.2.4
141 * Thu Mar 10 2011 Seiji Munetoh <munetoh@users.sourceforge.jp> - 0.2.3
142 * Sun Jul 25 2010 Seiji Munetoh <munetoh@users.sourceforge.jp> - 0.2.0
143 * Fri Mar 12 2010 Seiji Munetoh <munetoh@users.sourceforge.jp> - 0.0.1
144
145