LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File ploader.spec of Package ploader (Project home:psmt)

#
# spec file for package ploader (Version 1.6)
#
# Copyright (c) 2010 SUSE LINUX Products 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/
#

# norootforbuild

%define pkg_name pLoader

Name:           ploader
Summary:        Prepare your photos and transfer them to your Piwigo installation
Version:        1.6
Release:        1
License:        GPL+
Group:          Development/Libraries/Perl
Url:            http://piwigo.org/ext/extension_view.php?eid=269
Source:         %{pkg_name}-%{version}.tar.lzma
Source1:        Makefile.PL
Patch0:         ploader-rename_modules.patch 
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl lzma
%if 0%{?suse_version} < 1120
BuildRequires:  perl-macros
%endif
BuildRequires:  perl(Carp)
BuildRequires:  perl(Data::Dumper)
BuildRequires:  perl(Digest::MD5::File)
BuildRequires:  perl(MIME::Base64)
BuildRequires:  perl(File::HomeDir)
BuildRequires:  perl(File::Slurp)
BuildRequires:  perl(File::Spec)
BuildRequires:  perl(Image::ExifTool)
BuildRequires:  perl(Image::Magick)
BuildRequires:  perl(JSON)
BuildRequires:  perl(LWP::UserAgent)
BuildRequires:  perl(POSIX)
BuildRequires:  perl(Wx)
BuildRequires:  perl(Wx::Locale)
%define _wx_ver 2.8.10
BuildRequires:  wxGTK-devel >= %{_wx_ver}, wxGTK-gl >= %{_wx_ver}
BuildRequires:  fdupes
BuildRequires:  atk-lang >= 1.0
Requires:  perl = %{perl_version}
Requires:  perl(Carp)
Requires:  perl(Data::Dumper)
Requires:  perl(Digest::MD5::File)
Requires:  perl(MIME::Base64)
Requires:  perl(File::HomeDir)
Requires:  perl(File::Slurp)
Requires:  perl(File::Spec)
Requires:  perl(Image::ExifTool)
Requires:  perl(Image::Magick)
Requires:  perl(JSON)
Requires:  perl(LWP::UserAgent)
Requires:  perl(POSIX)
Requires:  perl(Wx)
Requires:  perl(Wx::Locale)
Requires:  atk-lang >= 1.0

%description
pLoader is a software dedicated to prepare your photos and transfer them to
your Piwigo installation:

* select photos from your file browser
* automatic preparation includes resizing for web display, thumbnail creation,
  automatic rotation
* complete informations such as name, author or description
* create a category
* transfer the selected photos to your remote Piwigo photo gallery

Your photos are visible on your gallery as soon as the transfer is done.
Could it be easier?

%prep
%setup -q -n %{pkg_name}-%{version}
%patch0
mv src lib
mkdir lib/Ploader && mv lib/Uploader lib/Ploader/
install -m 644 %{SOURCE1} .
%{__rm} -f lib/pLoader.exe.manifest
%{__mv} lib/pLoader.ini lib/properties.ini lib/Ploader/
%{__sed} -i lib/ploader.pl -e '
1i\
#!%{__perl} -w
s/Uploader::/Ploader::Uploader::/g;
/root_dir/{
s@root_dir.*@root_dir      => $ENV{PLOADER_ROOT}||"%{perl_vendorlib}/Ploader",@
};
'

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
%{__make}

%install
%perl_make_install
%{__rm} -f %{buildroot}%{perl_vendorlib}/ploader.pl
%{__install} -d -m 755 %{buildroot}%{perl_vendorlib}/Ploader/res
%{__install} -m 644 res/* %{buildroot}%{perl_vendorlib}/Ploader/res/
%{__install} -d -m 755 %{buildroot}%{perl_vendorlib}/Ploader/locale
%{__cp} -a locale/* %{buildroot}%{perl_vendorlib}/Ploader/locale/
%{__rm} -f %{buildroot}%{perl_vendorlib}/Ploader/locale/*/*.po
%perl_process_packlist
set +x
%perl_gen_filelist
set -x
%{__sed} -i '/%(echo "%{_mandir}" | sed "s@/@\\\/@g")/d;
    /.mo$/s@^\(.*/locale/\)\([^_]\+\)\(_.*\)$@%lang(\2) \1\2\3@;' ploader.files

%fdupes %{buildroot}%{perl_vendorlib}/Ploader/locale

install -d -m 755 %{buildroot}%{_datadir}/locale/en_US/LC_MESSAGES/
ln -s ../../en_CA/LC_MESSAGES/atk10.mo \
    %{buildroot}%{_datadir}/locale/en_US/LC_MESSAGES/atk10.mo

%clean
%{__rm} -rf %{buildroot}

%files -f %{name}.files
%defattr(-,root,root,-)
%lang(en) %{_datadir}/locale/en_US/LC_MESSAGES/atk10.mo

%changelog