File mingw32-cross-nsis.spec of Package mingw32-cross-nsis

#
# spec file for package mingw32-cross-nsis
#
# Copyright (c) 2015 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 sconsopts VERSION=%{version} PREFIX=%{_prefix} PREFIX_CONF=%{_sysconfdir} SKIPUTILS='NSIS Menu' STRIP_CP=false
Name:           mingw32-cross-nsis
Version:        2.50
Release:        0
Summary:        Nullsoft Scriptable Install System
License:        Zlib
Group:          Development/Libraries
Url:            http://nsis.sourceforge.net/
Source0:        http://sourceforge.net/projects/nsis/files/NSIS%202/%{version}/nsis-%{version}-src.tar.bz2
Source1000:     %{name}-rpmlintrc
# This patch fixes NSIS to actually build 64-bit versions.
# Originally from Debian, updated by Kevin Kofler.
Patch0:         nsis-2.43-64bit-fixes.patch
# Use RPM_OPT_FLAGS for the natively-built parts
Patch1:         nsis-2.43-rpm-opt.patch
# Make plugins not depend on libgcc_s_sjlj-1.dll (#553971)
Patch2:         nsis-2.45-static-libgcc.patch
Patch3:         nsis-2.45-minmax.patch
Patch4:         nsis-2.45-mingw_w64.patch
Patch5:         nsis-2.45-destbufferoverflow.patch
Patch6:         nsis-2.46-gcc47.patch
BuildRequires:  gcc-c++
BuildRequires:  mingw32-cross-binutils
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  mingw32-filesystem >= 40
BuildRequires:  python
BuildRequires:  scons
Provides:       mingw64-cross-nsis = %{version}-%{release}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
NSIS, the Nullsoft Scriptable Install System, is a script-driven
Windows installation system.

This package includes native linux binaries of makensis (etc.) and
all plugins.

%prep
%setup -q -n nsis-%{version}-src

%patch0 -p1 -b .64bit
%patch1 -p1 -b .rpmopt
%patch2 -p1 -b .static-libgcc
%patch3  -b .minmax
%patch4 -p1 -b .mingw_w64
%patch5  -b .destbufferoverflow
%patch6 -p1 -b .gcc47

%build
scons %{sconsopts}

%install

mkdir -p %{buildroot}
scons %{sconsopts} PREFIX_DEST=%{buildroot} install

mv %{buildroot}%{_datadir}/doc/nsis %{buildroot}%{_datadir}/doc/%{name}-%{version}

find %{buildroot}%{_datadir}/doc/%{name}-%{version} -type f -exec chmod -x '{}' \;

%files
%defattr(-,root,root)
%doc %{_datadir}/doc/%{name}-%{version}
%config(noreplace) %{_sysconfdir}/nsisconf.nsh
%{_bindir}/*
%{_datadir}/nsis

%changelog
openSUSE Build Service is sponsored by