File perl-RT-Extension-LDAPImport.spec of Package perl-RT-Extension-LDAPImport
#
# spec file for package perl-RT-Extension-LDAPImport
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cpan_name RT-Extension-LDAPImport
%define plug_dir /usr/share/request-tracker/local/plugins
Name: perl-RT-Extension-LDAPImport
Version: 0.36
Release: 0
Summary: Import Users from an LDAP store
License: GPL-1.0+ or Artistic-1.0
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/RT-Extension-LDAPImport/
Source0: %{cpan_name}-%{version}.tar.gz
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Class::Accessor)
BuildRequires: perl(Net::LDAP)
BuildRequires: perl(Net::LDAP::Server::Test)
BuildRequires: perl(RT)
Requires: perl(Class::Accessor)
Requires: perl(Net::LDAP)
Requires: perl(Net::LDAP::Server::Test)
Requires: perl(RT)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%{perl_requires}
%description
This RT module allows to import users from an LDAP store.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
## needs to switch to wwwrun for tests
%check
%{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%{__install} -m 0755 -d %{buildroot}/%{plug_dir}/%{cpan_name}
%{__install} -m 0755 -d %{buildroot}/%{_bindir}
%{__install} -m 0755 bin/rtldapimport %{buildroot}/%{_bindir}/rtldapimport
# remove special files
find %{buildroot} -name "perllocal.pod" | xargs -i rm -f {}
%clean
%{__rm} -rf %{buildroot}
%files -f %{name}.files
%defattr(-,root,root)
%doc Changes INSTALL.SKIP README
%dir %{plug_dir}/%{cpan_name}
%{_bindir}/rtldapimport
%changelog