Use RPM macros to compile libgpg-error.
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 4 Sep 2008 18:35:19 +0000 (19:35 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 4 Sep 2008 18:35:19 +0000 (19:35 +0100)
libgpg-error/mingw-libgpg-error.spec

index 5eac3e7..03e163e 100644 (file)
@@ -1,8 +1,8 @@
-%define __os_install_post /usr/lib/rpm/brp-compress %{nil}
+%include /usr/lib/rpm/mingw-defs
 
 Name:           mingw-libgpg-error
 Version:        1.6
 
 Name:           mingw-libgpg-error
 Version:        1.6
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        MinGW Windows GnuPGP error library
 
 License:        LGPLv2+
 Summary:        MinGW Windows GnuPGP error library
 
 License:        LGPLv2+
@@ -10,11 +10,12 @@ Group:          Development/Libraries
 URL:            ftp://ftp.gnupg.org/GnuPG/libgpg-error
 Source0:        ftp://ftp.gnupg.org/GnuPG/libgpg-error/libgpg-error-%{version}.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 URL:            ftp://ftp.gnupg.org/GnuPG/libgpg-error
 Source0:        ftp://ftp.gnupg.org/GnuPG/libgpg-error/libgpg-error-%{version}.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
 
 
+BuildRequires:  mingw-filesystem >= 17
 BuildRequires:  mingw-gcc
 BuildRequires:  mingw-binutils
 
 BuildRequires:  mingw-gcc
 BuildRequires:  mingw-binutils
 
-Requires:       mingw-runtime
 
 %description
 MinGW Windows GnuPGP error library.
 
 %description
 MinGW Windows GnuPGP error library.
@@ -25,12 +26,7 @@ MinGW Windows GnuPGP error library.
 
 
 %build
 
 
 %build
-CFLAGS="-O2 -g -Wall -pipe" \
-./configure \
-  --build=%_build \
-  --host=i686-pc-mingw32 \
-  --prefix=%{_prefix}/i686-pc-mingw32/sys-root/mingw
-
+%{_mingw_configure}
 make
 
 
 make
 
 
@@ -46,17 +42,21 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
 
 %files
 %defattr(-,root,root)
-%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/gpg-error-config
-%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/gpg-error.exe
-%{_prefix}/i686-pc-mingw32/sys-root/mingw/bin/libgpg-error-0.dll
-%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libgpg-error.a
-%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libgpg-error.dll.a
-%{_prefix}/i686-pc-mingw32/sys-root/mingw/lib/libgpg-error.la
-%{_prefix}/i686-pc-mingw32/sys-root/mingw/include/gpg-error.h
-%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/aclocal/gpg-error.m4
-%{_prefix}/i686-pc-mingw32/sys-root/mingw/share/common-lisp/source/gpg-error/*
+%{_mingw_bindir}/gpg-error-config
+%{_mingw_bindir}/gpg-error.exe
+%{_mingw_bindir}/libgpg-error-0.dll
+%{_mingw_libdir}/libgpg-error.a
+%{_mingw_libdir}/libgpg-error.dll.a
+%{_mingw_libdir}/libgpg-error.la
+%{_mingw_includedir}/gpg-error.h
+%{_mingw_datadir}/aclocal/gpg-error.m4
+%{_mingw_datadir}/common-lisp/source/gpg-error/*
 
 %changelog
 
 %changelog
+* Thu Sep  4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.6-3
+- Use mingw-filesystem RPM macros.
+- BuildArch is noarch.
+
 * Tue Sep  2 2008 Daniel P. Berrange <berrange@redhat.com> - 1.6-2
 - List files explicitly and use custom CFLAGS
 
 * Tue Sep  2 2008 Daniel P. Berrange <berrange@redhat.com> - 1.6-2
 - List files explicitly and use custom CFLAGS