File mingw64-p11-kit.spec of Package mingw64-p11-kit
#
# spec file for package mingw64-p11-kit
#
# Copyright (c) 2014 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 http://bugs.opensuse.org/
#
%define pkidir_cfg %{_mingw64_sysconfdir}/pki
%define pkidir_static %{_mingw64_datadir}/pki
%define trustdir_cfg %{pkidir_cfg}/trust
%define trustdir_static %{pkidir_static}/trust
Name: mingw64-p11-kit
Version: 0.20.1
Release: 0
Summary: Library to work with PKCS#11 modules
License: BSD-3-Clause
Group: Development/Libraries/C and C++
Url: http://p11-glue.freedesktop.org/p11-kit.html
Source0: http://p11-glue.freedesktop.org/releases/p11-kit-%{version}.tar.gz
Patch0: p11-kit-0.20.1-getuid.patch
Patch1: p11-kit-0.20.1-shlext.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtasn1-devel >= 2.3
BuildRequires: libtool
BuildRequires: mingw64-cross-binutils
BuildRequires: mingw64-cross-gcc
BuildRequires: mingw64-cross-pkg-config
BuildRequires: mingw64-filesystem
BuildRequires: mingw64-libffi-devel >= 3.0.0
BuildRequires: mingw64-libtasn1-devel >= 2.3
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%{_mingw64_package_header_debug}
#!BuildIgnore: post-build-checks
%description
p11-kit provides a way to load and enumerate PKCS#11 modules, as well
as a standard configuration setup for installing PKCS#11 modules in
such a way that they're discoverable.
%package -n mingw64-libp11-kit0
Summary: Library to work with PKCS#11 modules
Group: System/Libraries
%description -n mingw64-libp11-kit0
p11-kit provides a way to load and enumerate PKCS#11 modules, as well
as a standard configuration setup for installing PKCS#11 modules in
such a way that they're discoverable.
%package tools
Summary: Library to work with PKCS#11 modules -- Tools
Group: Development/Libraries/C and C++
%description tools
p11-kit provides a way to load and enumerate PKCS#11 modules, as well
as a standard configuration setup for installing PKCS#11 modules in
such a way that they're discoverable.
%package devel
Summary: Library to work with PKCS#11 modules -- Development Files
Group: Development/Libraries/C and C++
%description devel
p11-kit provides a way to load and enumerate PKCS#11 modules, as well
as a standard configuration setup for installing PKCS#11 modules in
such a way that they're discoverable.
%_mingw64_debug_package
%prep
%setup -q -n p11-kit-%{version}
%patch0 -p1 -b .getuid
%patch1 -p1 -b .shlext
%build
libtoolize --force --copy --install
autoreconf -fi
echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw64_cache}
%{_mingw64_configure} \
--enable-shared --disable-static \
--with-trust-paths=%{trustdir_cfg}:%{trustdir_static}
make %{?_smp_mflags} -C trust asn || make -C trust asn
make %{?_smp_mflags} || make
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
#
install -d m 755 %{buildroot}%{trustdir_cfg}/{anchors,blacklist}
install -d m 755 %{buildroot}%{trustdir_static}/{anchors,blacklist}
# Create pkcs11 config directory
test ! -e %{buildroot}%{_mingw64_sysconfdir}/pkcs11/modules
install -d %{buildroot}%{_mingw64_sysconfdir}/pkcs11/modules
rm -f %{buildroot}%{_mingw64_libdir}/pkcs11/p11-kit-trust.dll.a
%files
%defattr(-,root,root)
%dir %{_mingw64_libdir}/pkcs11
%dir %{_mingw64_datadir}/p11-kit
%dir %{_mingw64_datadir}/p11-kit/modules
%dir %{pkidir_cfg}
%dir %{trustdir_cfg}
%dir %{trustdir_cfg}/anchors
%dir %{trustdir_cfg}/blacklist
%dir %{pkidir_static}
%dir %{trustdir_static}
%dir %{trustdir_static}/anchors
%dir %{trustdir_static}/blacklist
%{_mingw64_datadir}/p11-kit/modules/p11-kit-trust.module
%{_mingw64_libdir}/pkcs11/p11-kit-trust.dll
%dir %{_mingw64_libdir}/p11-kit
%{_mingw64_libdir}/p11-kit/trust-extract-compat
%files -n mingw64-libp11-kit0
%defattr(-,root,root)
%{_mingw64_sysconfdir}/pkcs11/pkcs11.conf.example
%dir %{_mingw64_sysconfdir}/pkcs11
%dir %{_mingw64_sysconfdir}/pkcs11/modules/
%{_mingw64_bindir}/libp11-kit-0.dll
%files tools
%defattr(-,root,root)
%{_mingw64_bindir}/p11-kit.exe
%{_mingw64_bindir}/trust.exe
%files devel
%defattr(-,root,root)
%{_mingw64_includedir}/p11-kit-1/
%{_mingw64_libdir}/libp11-kit.dll.a
%{_mingw64_libdir}/pkgconfig/p11-kit-1.pc
%doc %dir %{_mingw64_datadir}/gtk-doc
%doc %dir %{_mingw64_datadir}/gtk-doc/html
%doc %{_mingw64_datadir}/gtk-doc/html/p11-kit/
%changelog