File nsis-getversion.spec of Package nsis-getversion

# spec file for package nsis-getversion
# Copyright (c) 2012 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

Name:           nsis-getversion
Version:        1.1
Release:        1
License:        zlib/libpng
Summary:        GetVersion plugin for nsis
Group:          Development/Tools
Source1:        Makefile.GetVersion
Source2:        exdll.h
Patch0:         GetVersion.exdll.patch
Patch1:         GetVersion.errorstring.patch
Patch2:         GetVersion.windows8.10.patch
BuildRequires:  mingw32-cross-gcc mingw32-cross-gcc-c++ nsis unzip
BuildRoot:      %{_tmppath}/%{name}-%{version}-build


rm -fR GetVersion
mkdir GetVersion
cd GetVersion
unzip %{SOURCE0}
cp %{SOURCE1} Contrib/GetVersion/Makefile
%patch0 -p1
%patch1 -p1
%patch2 -p1
cp %{SOURCE2} Contrib/GetVersion/

cd GetVersion/Contrib/GetVersion
make all

mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/nsis/Plugins
install GetVersion/Contrib/GetVersion/GetVersion.dll ${RPM_BUILD_ROOT}%{_datadir}/nsis/Plugins/