File mingw64-mozilla-nspr.spec of Package mingw64-mozilla-nspr
#
# spec file for package mingw64-mozilla-nspr
#
# 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/
#
Name: mingw64-mozilla-nspr
Version: 4.35
Release: 0
Summary: MinGW Windows port of the Netscape Portable Runtime (NSPR)
License: MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later
Group: Development/Libraries
Url: http://www.mozilla.org/projects/nspr/
Source0: nspr-%{version}.tar.gz
Patch0: nspr-4.35-import-lib-fix.patch
Patch1: nspr-4.35-fix-pkgconfig-includedir.patch
#!BuildIgnore: post-build-checks
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: mingw64-cross-binutils
BuildRequires: mingw64-cross-gcc
BuildRequires: mingw64-cross-pkg-config
BuildRequires: mingw64-filesystem >= 33
%_mingw64_package_header_debug
BuildArch: noarch
%description
NSPR provides platform independence for non-GUI operating system
facilities. These facilities include threads, thread synchronization,
normal file and network I/O, interval timing and calendar time, basic
memory management (malloc and free) and shared library linking (runtime
libraries).
%package devel
Summary: MinGW Windows port of the Netscape Portable Runtime (NSPR) (development files)
Group: Development/Libraries
%description devel
NSPR provides platform independence for non-GUI operating system
facilities. These facilities include threads, thread synchronization,
normal file and network I/O, interval timing and calendar time, basic
memory management (malloc and free) and shared library linking (import
libraries and include files).
%_mingw64_debug_package
%prep
%autosetup -p1 -n nspr-%{version}
%build
pushd nspr
autoreconf -fi
%{_mingw64_configure} \
--includedir=%{_mingw64_includedir} \
--enable-optimize="%{_mingw64_cflags}" \
--enable-win32-target=WINNT \
--enable-shared --disable-static \
--enable-debug --disable-strip \
--enable-64bit=yes
# NSPR comes with its own "special" install program called nsinstall.
# This must be built as a native program.
make -C config CC=gcc CFLAGS="-DXP_UNIX=1" %{?_smp_mflags}
# Now build the rest using the "special" nsinstall.
make \
NSINSTALL=$(pwd)/config/nsinstall \
RANLIB=%{_mingw64_ranlib} \
RC=%{_mingw64_windres} \
%{?_smp_mflags}
%install
pushd nspr
# 'make install' doesn't appear to work, so do it by hand.
mkdir -p %{buildroot}%{_mingw64_bindir}
mkdir -p %{buildroot}%{_mingw64_libdir}/pkgconfig
mkdir -p %{buildroot}%{_mingw64_includedir}/nspr4
install dist/bin/*.dll %{buildroot}%{_mingw64_bindir}
install config/nspr-config %{buildroot}%{_mingw64_bindir}
install config/nspr.pc %{buildroot}/%{_mingw64_libdir}/pkgconfig
install dist/lib/*.dll.a %{buildroot}%{_mingw64_libdir}
cp -rL dist/include/nspr/* %{buildroot}%{_mingw64_includedir}/nspr4/
# #31667
chmod -x %{buildroot}%{_mingw64_includedir}/nspr4/prvrsion.h
popd
%files
%defattr(-,root,root)
%{_mingw64_bindir}/libnspr4.dll
%{_mingw64_bindir}/libplc4.dll
%{_mingw64_bindir}/libplds4.dll
%files devel
%defattr(-,root,root)
%{_mingw64_bindir}/nspr-config
%{_mingw64_libdir}/libnspr4.dll.a
%{_mingw64_libdir}/libplc4.dll.a
%{_mingw64_libdir}/libplds4.dll.a
%{_mingw64_libdir}/pkgconfig/nspr.pc
%{_mingw64_includedir}/nspr4
%changelog