LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File mingw-popt.spec of Package mingw-popt (Project home:greg_hellings:fedora-mingw)

%?mingw_package_header

%global mingw_build_win32 1
%global mingw_build_win64 1

Summary:        MinGW Windows C library for parsing command line parameters
Name:           mingw-popt
Version:        1.10.7
Release:        1%{?dist}
License:        MIT
Group:          System Environment/Libraries
URL:            http://www.rpm5.org/
Source:         http://rpm5.org/files/popt/popt-%{version}.tar.gz
Source100:      config32.cache
Source101:      config64.cache

BuildArch:      noarch

BuildRequires:  mingw32-gettext
BuildRequires:  mingw32-filesystem >= 95
BuildRequires:  mingw32-gcc
BuildRequires:  mingw32-gcc-c++
BuildRequires:  mingw32-binutils

BuildRequires:  mingw64-gettext
BuildRequires:  mingw64-filesystem >= 95
BuildRequires:  mingw64-gcc
BuildRequires:  mingw64-gcc-c++
BuildRequires:  mingw64-binutils

BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool


%description
Popt is a C library for parsing command line parameters. Popt was
heavily influenced by the getopt() and getopt_long() functions, but
it improves on them by allowing more powerful argument expansion.
Popt can parse arbitrary argv[] style arrays and automatically set
variables based on command line arguments. Popt allows command line
arguments to be aliased via configuration files and includes utility
functions for parsing arbitrary strings into argv[] arrays using
shell-like rules.


# Win32
%package -n mingw32-popt
Summary:        MinGW Windows C library for parsing command line parameters

%description -n mingw32-popt
Popt is a C library for parsing command line parameters. Popt was
heavily influenced by the getopt() and getopt_long() functions, but
it improves on them by allowing more powerful argument expansion.
Popt can parse arbitrary argv[] style arrays and automatically set
variables based on command line arguments. Popt allows command line
arguments to be aliased via configuration files and includes utility
functions for parsing arbitrary strings into argv[] arrays using
shell-like rules.

%package -n mingw32-popt-static
Summary:        Static version of the MinGW Windows C library for parsing command line parameters
Requires:       mingw32-popt = %{version}-%{release}
Group:          Development/Libraries

%description -n mingw32-popt-static
Static version of the MinGW Windows C library for parsing command line parameters

# Win64
%package -n mingw64-popt
Summary:        MinGW Windows C library for parsing command line parameters

%description -n mingw64-popt
Popt is a C library for parsing command line parameters. Popt was
heavily influenced by the getopt() and getopt_long() functions, but
it improves on them by allowing more powerful argument expansion.
Popt can parse arbitrary argv[] style arrays and automatically set
variables based on command line arguments. Popt allows command line
arguments to be aliased via configuration files and includes utility
functions for parsing arbitrary strings into argv[] arrays using
shell-like rules.

%package -n mingw64-popt-static
Summary:        Static version of the MinGW Windows C library for parsing command line parameters
Requires:       mingw64-popt = %{version}-%{release}
Group:          Development/Libraries

%description -n mingw64-popt-static
Static version of the MinGW Windows C library for parsing command line parameters


%?mingw_debug_package


%prep
%setup -q -n popt-%{version}

cp %{SOURCE100} %{SOURCE101} .

%build
MINGW32_CONFIGURE_ARGS="--cache=`pwd`/config32.cache"
MINGW64_CONFIGURE_ARGS="--cache=`pwd`/config64.cache"

%mingw_configure --enable-static --enable-shared
cp mkinstalldirs build_win32
cp mkinstalldirs build_win64
%mingw_make %{?_smp_mflags}


%install
%mingw_make_install DESTDIR=$RPM_BUILD_ROOT

# Drop all .la files
find $RPM_BUILD_ROOT -name "*.la" -delete

mkdir $RPM_BUILD_ROOT%{mingw64_libdir}
mv $RPM_BUILD_ROOT%{mingw64_prefix}/lib64/* $RPM_BUILD_ROOT%{mingw64_libdir}


# Win32
%files -n mingw32-popt
%doc COPYING README CHANGES
%{mingw32_bindir}/libpopt-0.dll
%{mingw32_libdir}/libpopt.dll.a
%{mingw32_includedir}/popt.h
%{mingw32_datadir}/locale
%{mingw32_mandir}/man3

%files -n mingw32-popt-static
%{mingw32_libdir}/libpopt.a

# Win64
%files -n mingw64-popt
%doc COPYING README CHANGES
%{mingw64_bindir}/libpopt-0.dll
%{mingw64_libdir}/libpopt.dll.a
%{mingw64_includedir}/popt.h
%{mingw64_datadir}/locale
%{mingw64_mandir}/man3

%files -n mingw64-popt-static
%{mingw64_libdir}/libpopt.a

%changelog
* Thu Aug 23 2012 Greg Hellings <greg.hellings@gmail.com> - 1.10.7-1
- Initial import