[perl-Filesys-SmbClient] Initial import (#912477).
Normunds Neimanis
normunds at fedoraproject.org
Thu Feb 21 18:29:44 UTC 2013
commit 6064401b6c5036edc39f8c8c20da5186993a7135
Author: Normunds Neimanis <long at rule.lv>
Date: Thu Feb 21 20:29:27 2013 +0200
Initial import (#912477).
.gitignore | 1 +
Filesys-SmbClient-3.2_Makefile.patch | 19 ++++++++++
perl-Filesys-SmbClient.spec | 65 ++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 86 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..093baf5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Filesys-SmbClient-3.2.tar.gz
diff --git a/Filesys-SmbClient-3.2_Makefile.patch b/Filesys-SmbClient-3.2_Makefile.patch
new file mode 100644
index 0000000..2a5a991
--- /dev/null
+++ b/Filesys-SmbClient-3.2_Makefile.patch
@@ -0,0 +1,19 @@
+--- Makefile.PL.orig 2013-02-18 10:30:44.565650068 +0200
++++ Makefile.PL 2013-02-18 13:42:50.608115000 +0200
+@@ -19,7 +19,7 @@
+ my $ans =
+ prompt("Do you want make tests ?(you will be prompted for server / \n".
+ "worgroup / share / user / password to make read write access.",
+- "yes");
++ "no");
+ if ($ans =~ /^y(es)?$/i)
+ {
+ my $server = prompt("Server ?","localhost");
+@@ -110,6 +110,7 @@
+ push(@path, $_."/$ext") if !$defaultsDir->{$_};
+ }
+ foreach (keys %$defaultsDir) { push(@path, $_."/$ext"); }
++ push(@path, "/usr/include/samba-4.0");
+ print "I search in: ",(join "\n", @path),"\n";
+ return @path;
+ }
diff --git a/perl-Filesys-SmbClient.spec b/perl-Filesys-SmbClient.spec
new file mode 100644
index 0000000..d97e5c7
--- /dev/null
+++ b/perl-Filesys-SmbClient.spec
@@ -0,0 +1,65 @@
+Name: perl-Filesys-SmbClient
+Version: 3.2
+Release: 1%{?dist}
+Summary: Samba client Perl module
+
+Group: Development/Libraries
+License: GPL+ or Artistic
+URL: http://search.cpan.org/dist/Filesys-SmbClient
+Source0: http://search.cpan.org/CPAN/authors/id/A/AL/ALIAN/Filesys-SmbClient-%{version}.tar.gz
+# Patch Makefile.PL to
+# * Disable tests (requires Samba server access)
+# * Know where to search includes (/usr/include/samba-4.0)
+Patch0: Filesys-SmbClient-3.2_Makefile.patch
+
+
+BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: libsmbclient-devel
+
+
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+
+%{?perl_default_filter}
+
+%description
+Perl module that provides interface to Samba smbclient routines. It gives Perl
+programmers a way to access Samb/CIFS servers natively.
+
+
+%prep
+%setup -q -n Filesys-SmbClient-%{version}
+%patch0 -p0
+chmod -x Changes
+find . -name "*.pm" -exec chmod -c a-x {} +
+find . -name "libauthSamba*" -exec chmod -c a-x {} +
+find . -name "SmbClient.xs" -exec chmod -c a-x {} +
+
+
+%build
+# Force Makefile to use defaults
+export PERL_MM_USE_DEFAULT=1
+# HOSTTYPE is not exported by default, hence not readable by Perl
+# Needed to be able to find libsmbclient.so in /usr/lib64
+export HOSTTYPE
+# CCFLAGS: Tell samba to use close_fn not close (caused compilation error)
+perl Makefile.PL INSTALLDIRS=vendor CCFLAGS='-DHAVE_CLOSEFN' OPTIMIZE="%{optflags}"
+make %{?_smp_mflags}
+
+
+%install
+make pure_install DESTDIR=%{buildroot}
+find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
+find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
+%{_fixperms} %{buildroot}/*
+
+
+%files
+%doc Changes README COPYING
+%{perl_vendorarch}/auto/*
+%{perl_vendorarch}/Filesys*
+%{_mandir}/man3/*
+
+
+%changelog
+* Fri Feb 15 2013 Normunds Neimanis <fedorapkg at rule.lv> 3.2-1
+- Package for current Fedora
diff --git a/sources b/sources
index e69de29..800e3a5 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+8a4205fe748aac7f43fb2a0e8ef502b2 Filesys-SmbClient-3.2.tar.gz
More information about the scm-commits
mailing list