File mingw64-jigit.spec of Package mingw64-jigit

#
# spec file for package mingw64-jigit
#
# Copyright (c) 2025, Martin Hauke <mardnh@gmx.de>
#
# 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 realname jigit
%define sover 2
%define libname mingw64-lib%{realname}%{sover}
Name:           mingw64-%{realname}
Version:        1.22
Release:        0
Summary:        Tools for Working With jigdo Files
License:        GPL-2.0-only
Group:          Productivity/File utilities
URL:            https://www.einval.com/~steve/software/JTE/
#Git-Clone:     https://git.einval.com/git/jigit.git
Source0:        http://www.einval.com/~steve/software/JTE/download/%{realname}-%{version}.tar.xz
Patch0:         mingw64-jigit-no-malloc.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-zlib-devel
BuildRequires:  mingw64-libgnurx-devel
%_mingw64_package_header_debug
BuildArch:      noarch

%description
Jigit is an interactive wrapper around mkimage to ease the download or upgrade
of existing CDs and CD images.

%package -n %{libname}
Summary:        Jigdo Template Export Library
License:        LGPL-2.1-or-later
Group:          System/Libraries

%description -n %{libname}
libjte is a library providing support for creating jigdo files, to be used by
ISO image creation tools.

%package -n mingw64-libjte-devel
Summary:        Development Files for libjte
License:        LGPL-2.1-or-later
Group:          Development/Languages/C and C++
Requires:       %{libname} = %{version}

%description -n mingw64-libjte-devel
libjte is a library providing support for creating jigdo files, to be used by
ISO image creation tools.

This package contains the development files for %{name}.

%_mingw64_debug_package

%prep
%autosetup -p1 -n %{realname}-%{version}

%build
# skip build of jigit tools for now
#%%{_mingw64_make}

# build libjte
cd libjte
./bootstrap
export LIBS="-lgnurx.dll"
%{_mingw64_configure} --disable-static
sed -i.bak -e "s/\(allow_undefined=\)yes/\1no/" libtool
%{_mingw64_make}

%install
%{make_install} -C libjte

%files -n %{libname}
%{_mingw64_bindir}/libjte-%{sover}.dll

%files -n mingw64-libjte-devel
%license libjte/{COPYING,COPYRIGHT}
%doc libjte/ChangeLog
%doc libjte/doc/{API,NOTES,TODO}
%{_mingw64_includedir}/libjte
%{_mingw64_libdir}/libjte.dll.a
%{_mingw64_libdir}/pkgconfig/libjte-2.pc

%changelog
openSUSE Build Service is sponsored by