diff --git a/.gitignore b/.gitignore index 0e24453..5ecc8a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /libtpms-0.5.1.tgz +/libtpms-0.5.1.tar.gz diff --git a/libtpms.spec b/libtpms.spec index 621a794..35fcdec 100644 --- a/libtpms.spec +++ b/libtpms.spec @@ -2,7 +2,7 @@ %define name libtpms %define version 0.5.1 -%define release 8 +%define release 9 # Valid crypto subsystems are 'freebl' and 'openssl' %define crypto_subsystem freebl @@ -17,7 +17,7 @@ Release: %{release} License: BSD Group: Development/Libraries Url: http://sourceforge.net/projects/ibmswtpm -Source: http://bergerstefan.users.sourceforge.net/libtpms/%{name}-%{version}.tgz +Source: http://bergerstefan.users.sourceforge.net/libtpms/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %if %{crypto_subsystem} == openssl BuildRequires: openssl-devel @@ -26,7 +26,7 @@ BuildRequires: nss-devel >= 3.12.9-2 BuildRequires: nss-softokn-freebl-devel >= 3.12.9-2 BuildRequires: nss-softokn-freebl-static >= 3.12.9-2 BuildRequires: nss-softokn-devel >= 3.12.9-2, gmp-devel -BuildRequires: pkgconfig +BuildRequires: pkgconfig gawk Requires: nss-softokn-freebl >= 3.12.9-2, nss-softokn >= 3.12.9-2 %endif @@ -44,6 +44,7 @@ Libtpms header files and documentation. %files %defattr(-, root, root, -) +%{_libdir}/%{name}.la %{_libdir}/%{name}.so.%{version} %{_libdir}/%{name}.so.0 %doc LICENSE README CHANGES @@ -58,29 +59,43 @@ Libtpms header files and documentation. %attr(644, root, root) %{_mandir}/man3/* %prep -%setup -q -n libtpms +%setup -q %build -make %{?_smp_mflags} -f makefile-libtpms all RPM_OPT_FLAGS="$RPM_OPT_FLAGS" \ - CRYPTO_SUBSYSTEM=%{crypto_subsystem} \ - BUILD_TYPE=%{build_type} + +%if %{crypto_subsystem} == openssl +%define _with_openssl --with-openssl +%endif + +%if %{build_type} == debug +%define _enable_debug --enable-debug +%endif + +%configure \ + --disable-static \ + --prefix=/usr \ + --libdir=%{_libdir} \ + %{?_with_openssl} \ + %{?_enable_debug} + +make %{?_smp_mflags} +make check %install install -d -m 0755 $RPM_BUILD_ROOT%{_libdir} install -d -m 0755 $RPM_BUILD_ROOT%{_includedir}/libtpms install -d -m 0755 $RPM_BUILD_ROOT%{_mandir}/man3 -make %{?_smp_mflags} -f makefile-libtpms install \ - RPM_OPT_FLAGS="$RPM_OPT_FLAGS" \ - DESTDIR="$RPM_BUILD_ROOT" \ - CRYPTO_SUBSYSTEM=%{crypto_subsystem} \ - BUILD_TYPE=%{build_type} +make %{?_smp_mflags} install DESTDIR=${RPM_BUILD_ROOT} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %changelog +* Tue Aug 30 2011 Stefan Berger - 0.5.1-9 +- new directory structure and build process + * Tue Jul 12 2011 Stefan Berger - 0.5.1-8 - added pkgconfig as build dependency - enabling __powerpc__ build following Bz 728220 diff --git a/sources b/sources index d89b4b6..3600e8e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6158755776e91c9fdf8333bbb14ee26c libtpms-0.5.1.tgz +66c0d906b8d975afdb3b0a3fde217faf libtpms-0.5.1.tar.gz