[libtnc] lots of cleanups, add perl subpackage
Tom Callaway
spot at fedoraproject.org
Mon Feb 10 21:35:40 UTC 2014
commit 134d728c029666b37bdc17a5ad6141a1024f4ac1
Author: Tom Callaway <spot at fedoraproject.org>
Date: Mon Feb 10 16:36:17 2014 -0500
lots of cleanups, add perl subpackage
libtnc.spec | 51 ++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 42 insertions(+), 9 deletions(-)
---
diff --git a/libtnc.spec b/libtnc.spec
index 61faf15..43ac964 100644
--- a/libtnc.spec
+++ b/libtnc.spec
@@ -1,13 +1,15 @@
+%global _hardened_build 1
+
Name: libtnc
Version: 1.25
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Library implementation of the Trusted Network Connect (TNC) specification
License: GPLv2
Group: System Environment/Libraries
Source0: http://dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
URL: http://libtnc.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: libxml2-devel, zlib-devel
+BuildRequires: libxml2-devel, zlib-devel, perl(ExtUtils::MakeMaker)
%description
This library provides functions for loading and interfacing with loadable IMC
@@ -18,14 +20,26 @@ interfaces as described in: https://www.trustedcomputinggroup.org/specs/TNC
%package devel
Summary: Development headers and libraries for libtnc
Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Header and library files used for developing with (or linking to) libtnc.
+%package -n perl-Interface-TNC
+Version: 1.0
+Summary: Perl module for TNC interfaces
+License: GPL+ or Artistic
+
+%description -n perl-Interface-TNC
+Perl module for TNC interfaces
+
%prep
%setup -q
+pushd Interface-TNC
+tar xf Interface-TNC-1.0.tar.gz
+popd
+
%build
CFLAGS="%{optflags} -fPIC -DPIC"
%configure --with-pic
@@ -33,30 +47,37 @@ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
+pushd Interface-TNC/Interface-TNC-1.0
+%{__perl} Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
+popd
+
%install
-rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
rm -rf %{buildroot}/%{_libdir}/*.la
# It is easier to delete the static libs here than to disable them in configure
# Autoconf makes my brain bleed.
rm -rf %{buildroot}/%{_libdir}/*.a
-%clean
-rm -rf %{buildroot}
+pushd Interface-TNC/Interface-TNC-1.0
+make pure_install PERL_INSTALL_ROOT=%{buildroot}
+find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
+find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
+popd
-%post -p /sbin/ldconfig
+%check
+make check
+%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
-%defattr(-,root,root,-)
%doc COPYING README
%{_libdir}/libosc_im*.so.*
%{_libdir}/libsample_im*.so.*
%{_libdir}/libtnc.so.*
%files devel
-%defattr(-,root,root,-)
%doc doc/libtnc.pdf
%{_includedir}/libtnc*.h
%{_includedir}/tnc*.h
@@ -64,7 +85,19 @@ rm -rf %{buildroot}
%{_libdir}/libsample_im*.so
%{_libdir}/libtnc.so
+%files -n perl-Interface-TNC
+%doc Interface-TNC/Interface-TNC-1.0/README
+%{perl_vendorarch}/auto/Interface/
+%{perl_vendorarch}/Interface/
+%{_mandir}/man3/Interface::TNC*
+
%changelog
+* Mon Feb 10 2014 Tom Callaway <spot at fedoraproject.org> - 1.25-6
+- harden-build
+- cleanup spec
+- package perl bits
+- run make check
+
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.25-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
More information about the scm-commits
mailing list