[perl-OpenOffice-UNO/f16] Import perl-OpenOffice-UNO-0.07-3.el6.src.rpm

Lubomir Rintel lkundrak at fedoraproject.org
Wed Aug 8 18:11:14 UTC 2012


commit d9504edcc6d763d0697b611e01256a2e68f94de3
Author: Lubomir Rintel <lubo.rintel at gooddata.com>
Date:   Wed Aug 8 20:10:24 2012 +0200

    Import perl-OpenOffice-UNO-0.07-3.el6.src.rpm

 .gitignore                               |    1 +
 0001-Hardcode-rpath-to-uno-library.patch |   21 +++++++
 0001-Preserve-cflags.patch               |   34 +++++++++++
 perl-OpenOffice-UNO.spec                 |   94 ++++++++++++++++++++++++++++++
 sources                                  |    1 +
 5 files changed, 151 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..6120475 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/OpenOffice-UNO-0.07.tar.gz
diff --git a/0001-Hardcode-rpath-to-uno-library.patch b/0001-Hardcode-rpath-to-uno-library.patch
new file mode 100644
index 0000000..98ae46e
--- /dev/null
+++ b/0001-Hardcode-rpath-to-uno-library.patch
@@ -0,0 +1,21 @@
+From c6d3606893c90f3105f432cee0d37c322f579c13 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lubo.rintel at gooddata.com>
+Date: Thu, 9 Feb 2012 14:38:07 +0100
+Subject: [PATCH] Hardcode rpath to uno library
+
+diff --git a/Makefile.PL b/Makefile.PL
+index 9ac1884..a1177cb 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -165,6 +165,8 @@ WriteMakefile (
+     'LDDLFLAGS'	=> $uno_libpath . ' ' . $Config{'lddlflags'}  . ' ',
+     'LIBS'	=> [ $uno_libpath . ' ' . $LinkLibs ],
+     'INC'	=> " -Iblib/uno -I$sdk_dir/include ",
++    'dynamic_lib' => { 'OTHERLDFLAGS' => "-Wl,-rpath=$uno_lib"
++                     },
+     'depend'	=> { '$(OBJECT)' => 'blib/uno/headers perluno',
+ 		     },
+     'clean'	=> { 'FILES'     => 'test2_export.pdf test2_save.sxw perluno',
+-- 
+1.7.1
+
diff --git a/0001-Preserve-cflags.patch b/0001-Preserve-cflags.patch
new file mode 100644
index 0000000..d7b6bf1
--- /dev/null
+++ b/0001-Preserve-cflags.patch
@@ -0,0 +1,34 @@
+From 082b95a3d12f718e76ea4f1beba7843e9884d95e Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lubo.rintel at gooddata.com>
+Date: Thu, 9 Feb 2012 14:16:54 +0100
+Subject: [PATCH] Preserve cflags
+
+---
+ Makefile.PL |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index a5d6978..d7071eb 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -88,7 +88,7 @@ $cwd = cwd();
+ $sdk_dir = $ENV{'OO_SDK_HOME'};
+ $cc = $ENV{'CXX'} || $Config{'cc'};
+ $ld = $ENV{'CXX'} || $Config{'ld'};
+-$cc_flags = '';
++$cc_flags = $Config{'ccflags'};
+ $uno_lib = $ENV{'OO_SDK_URE_LIB_DIR'};
+ $uno_libpath = "-L$uno_lib";
+ if( $^O eq 'MSWin32' ) {
+@@ -98,7 +98,7 @@ if( $^O eq 'MSWin32' ) {
+     $uno_lib   = $sdk_dir . "\\windows\\lib";
+     $uno_libpath = "-libpath:$uno_lib";
+     $ld = 'link';
+-    $cc_flags = ' /TP /EHsc ';
++    $cc_flags .= ' /TP /EHsc ';
+ } else {
+     $psep = '/';
+     @config = split '-', qx[$sdk_dir/config.guess];
+-- 
+1.7.1
+
diff --git a/perl-OpenOffice-UNO.spec b/perl-OpenOffice-UNO.spec
new file mode 100644
index 0000000..297db82
--- /dev/null
+++ b/perl-OpenOffice-UNO.spec
@@ -0,0 +1,94 @@
+%if 0%{?rhel} < 7 && 0%{?fedora} < 16
+%global soffice openoffice.org
+%else
+%global soffice libreoffice
+%endif
+
+Name:           perl-OpenOffice-UNO
+Version:        0.07
+Release:        3%{?dist}
+Summary:        Interface to OpenOffice's UNO run-time
+License:        LGPLv2+ and SISSL
+Group:          Development/Libraries
+URL:            http://search.cpan.org/dist/OpenOffice-UNO/
+Source0:        http://www.cpan.org/authors/id/M/MB/MBARBON/OpenOffice-UNO-%{version}.tar.gz
+Patch0:         0001-Preserve-cflags.patch
+Patch1:         0001-Hardcode-rpath-to-uno-library.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires:  perl(ExtUtils::MakeMaker)
+BuildRequires:  perl(Test::More)
+BuildRequires:  perl(Cwd)
+BuildRequires:  perl(Exporter)
+BuildRequires:  perl(File::Path)
+BuildRequires:  /usr/bin/ooffice
+BuildRequires:  %{soffice}-sdk >= 1:3
+BuildRequires:  %{soffice}-sdk < 1:4
+BuildRequires:  %{soffice}-writer
+BuildRequires:  %{soffice}-calc
+BuildRequires:  %{soffice}-headless
+Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+
+%description
+A bridge to the OpenOffice.org API.
+
+
+%prep
+%setup -q -n OpenOffice-UNO-%{version}
+%patch0 -p1
+%patch1 -p1
+
+
+%build
+. $(find %{_libdir}/%{soffice} -name setsdkenv_unix.sh -print -quit)
+
+# Auto-set bootstrap. Weird, but similar to what is done for python bindings.
+awk '/bootstrap OpenOffice::UNO/ \
+        {print "$ENV{URE_BOOTSTRAP} ||= \"vnd.sun.star.pathname:'$(echo %{_libdir}/%{soffice}*/program/fundamentalrc)'\";"}
+        {print}' UNO.pm >UNO-bootstrap.pm
+mv UNO-bootstrap.pm UNO.pm
+
+%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
+make %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
+
+find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
+find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
+find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
+
+%{_fixperms} $RPM_BUILD_ROOT/*
+
+
+%check
+setsid ooffice -headless -accept='socket,host=localhost,port=8100;urp;StarOffice.ServiceManager' &
+trap "kill -- -$! ||:" EXIT
+sleep 10 # In fact, OpenOffice is known to start almost instanteously
+make test
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root,-)
+%doc Changes README
+%{perl_vendorarch}/auto/*
+%{perl_vendorarch}/OpenOffice*
+%{_mandir}/man3/*
+
+
+%changelog
+* Sat Feb 11 2012 Lubomir Rintel (GoodData) <lubo.rintel at gooddata.com> 0.07-3
+- Add missing BRs, fix up the rpath patch (Petr Šabata, #788990)
+
+* Sat Feb 11 2012 Lubomir Rintel (GoodData) <lubo.rintel at gooddata.com> 0.07-2
+- Correctly load SDK environment in fc18 (Petr Šabata, #788990)
+
+* Wed Feb 08 2012 Lubomir Rintel (GoodData) <lubo.rintel at gooddata.com> 0.07-1
+- Specfile autogenerated by cpanspec 1.78.
+- Transmogrified
diff --git a/sources b/sources
index e69de29..d449d76 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+ed90c11e68387e8e9a97c68f329b5656  OpenOffice-UNO-0.07.tar.gz


More information about the scm-commits mailing list