1 2# RPM specfile for the trousers project on Fedora 3 4%define name @PACKAGE@ 5%define version @VERSION@ 6%define release 1 7 8Name: %{name} 9Summary: Implementation of the TCG's Software Stack v1.1 Specification 10Version: %{version} 11Release: %{release} 12License: BSD 13Group: Development/Libraries 14Source: %{name}-%{version}.tar.gz 15Url: http://www.sf.net/projects/trousers 16BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 17BuildRequires: libtool, gtk2-devel, openssl-devel 18Requires: gtk+ >= 2.0, openssl 19Requires(post): /sbin/ldconfig 20Requires(post): /sbin/chkconfig 21Requires(postun): /sbin/ldconfig 22Requires(postun): /sbin/service 23Requires(preun): /sbin/chkconfig 24Requires(preun): /sbin/service 25 26%description 27TrouSerS is an implementation of the Trusted Computing Group's Software Stack 28(TSS) specification. You can use TrouSerS to write applications that make use 29of your TPM hardware. TPM hardware can create, store and use RSA keys 30securely (without ever being exposed in memory), verify a platform's software 31state using cryptographic hashes and more. 32 33%package devel 34Summary: TrouSerS header files and documentation 35Group: Development/Libraries 36Requires: %{name} = %{version}-%{release} 37 38%description devel 39Header files and man pages for use in creating Trusted Computing enabled 40applications. 41 42%prep 43%setup -q 44 45%build 46autoreconf 47%configure --disable-static --prefix=/usr --libdir=%{_libdir} 48make %{?_smp_mflags} 49 50%clean 51[ "${RPM_BUILD_ROOT}" != "/" ] && [ -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT}; 52 53# 54# $1 is the number of entries in the RPM database for the package after the step is 55# executed. So in the post step, if $1 is 1, then this is the first time we've been 56# installed. If its 2, we're upgrading. 57# 58%post 59/sbin/ldconfig 60if [ $1 = 1 ]; then 61 /sbin/chkconfig --add tcsd 62 if [ $? == 0 ]; then 63 /sbin/chkconfig --level 35 tcsd on 64 fi 65fi 66 67%post devel -p /sbin/ldconfig 68 69%install 70# This line keeps build machines from being affected 71[ "${RPM_BUILD_ROOT}" != "/" ] && [ -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT}; 72mkdir -p ${RPM_BUILD_ROOT} 73mkdir -p ${RPM_BUILD_ROOT}/%{_initrddir} 74cp dist/fedora/fedora.initrd.tcsd ${RPM_BUILD_ROOT}/%{_initrddir}/tcsd 75make install DESTDIR=${RPM_BUILD_ROOT} 76rm -f ${RPM_BUILD_ROOT}/%{_libdir}/libtspi.la 77 78%preun 79if [ $1 = 0 ]; then 80 /sbin/service tcsd stop &> /dev/null 81 /sbin/chkconfig --del tcsd 82fi 83 84%postun 85/sbin/ldconfig 86if [ $1 -gt 1 ]; then 87 /sbin/service tcsd condrestart &>/dev/null 88fi 89 90%postun devel -p /sbin/ldconfig 91 92%files 93%doc README AUTHORS LICENSE 94%defattr(755, root, root) 95%attr(755, tss, tss) %{_sbindir}/tcsd 96%{_libdir}/libtspi.so.? 97%{_libdir}/libtspi.so.?.?.? 98%config(noreplace) %attr(600, tss, tss) %{_sysconfdir}/tcsd.conf 99%attr(644, root, root) %{_mandir}/man5/* 100%attr(644, root, root) %{_mandir}/man8/* 101%{_initrddir}/tcsd 102 103# The files to be used by developers, 'trousers-devel' 104%files devel 105%attr(755, root, root) %{_libdir}/libtspi.so 106%defattr(644, root, root) 107%{_libdir}/libtddl.a 108%{_includedir}/tss/*.h 109%{_includedir}/trousers/*.h 110%{_mandir}/man3/Tspi_* 111 112%changelog 113* Mon Nov 12 2007 Kent Yoder <kyoder@users.sf.net> - 0.3.1 114- Updated specfile for comments in RHBZ#323441 115 116* Wed Jun 07 2006 Kent Yoder <kyoder@users.sf.net> - 0.2.6-1 117- Updated build section to use smp_mflags 118- Removed .la file from installed dest and files section 119 120* Tue Jun 06 2006 Kent Yoder <kyoder@users.sf.net> - 0.2.6-1 121- Initial add of changelog tag for trousers CVS 122