File mingw32-libunique.spec of Package mingw32-libunique

#
# spec file for package mingw32-libunique
#
# Copyright (c) 2018 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/
#


Name:           mingw32-libunique
Version:        1.1.6
Release:        0
Summary:        A library for writing single instance application
License:        LGPL-2.1-or-later
Group:          Development/Libraries/C and C++
Url:            http://live.gnome.org/LibUnique
Source:         http://download.gnome.org/sources/libunique/1.1/libunique-%{version}.tar.bz2
Patch0:         libunique-1.1.6-gcc46.patch
Patch1:         libunique-1.1.6-deprecated.patch
# Need native one for dbus-binding-tool
BuildRequires:  dbus-1-devel
# Need native one for  glib-genmarshal
BuildRequires:  glib2-devel
#!BuildIgnore: post-build-checks
BuildRequires:  mingw32-cross-binutils
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-pkg-config
BuildRequires:  mingw32-dbus-1-glib-devel
BuildRequires:  mingw32-filesystem
BuildRequires:  mingw32-glib2-devel
BuildRequires:  mingw32-gtk2-devel
BuildRequires:  python
%_mingw32_package_header_debug
BuildArch:      noarch

%description
Unique is a library for writing single instance application. If you
launch a single instance application twice, the second instance will
either just quit or will send a message to the running instance.

%package -n mingw32-libunique-1_0-0
Summary:        A library for writing single instance application
Group:          System/Libraries
Obsoletes:      %{name}
Provides:       %{name}

%description -n mingw32-libunique-1_0-0
Unique is a library for writing single instance application. If you
launch a single instance application twice, the second instance will
either just quit or will send a message to the running instance.

%package devel
Summary:        A library for writing single instance application (development files)
Group:          Development/Libraries/C and C++

%description devel
Unique is a library for writing single instance application. If you
launch a single instance application twice, the second instance will
either just quit or will send a message to the running instance.

%_mingw32_debug_package

%prep
%setup -q -n libunique-%{version}
%patch -P 0  -b .gcc46
%patch -P 1 -p1 -b .deprecated

%build
echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw32_cache}
%if 0%{?suse_version} <= 1100
export MINGW32_CFLAGS="-UG_DISABLE_SINGLE_INCLUDES %{_mingw32_cflags}";
%endif
export MINGW32_CFLAGS="-DG_CONST_RETURN=const $MINGW32_CFLAGS";
export PATH="%{_mingw32_bindir}:$PATH"
%{_mingw32_configure} --disable-static --enable-dbus --disable-maintainer-flags
make %{?_smp_mflags} || make

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}

%files -n mingw32-libunique-1_0-0
%defattr(-,root,root)
%{_mingw32_bindir}/libunique-1.0-0.dll

%files devel
%defattr(-,root,root)
%{_mingw32_includedir}/unique-1.0
%{_mingw32_libdir}/libunique-1.0.dll.a
%{_mingw32_libdir}/pkgconfig/unique-1.0.pc
%{_mingw32_datadir}/gtk-doc/html/unique/

%changelog
openSUSE Build Service is sponsored by