ec05e6fcd866bdbae382e5449eb6059e53ac5443
[fedora-mingw.git] / popt / mingw32-popt.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 Name:           mingw32-popt
8 Version:        1.13_cvs20081025
9 Release:        1%{?dist}
10 Summary:        MinGW Windows C library for parsing command line parameters
11
12 License:        MIT
13 Group:          Development/Libraries
14 URL:            http://www.rpm5.org/
15 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
16
17 BuildArch:      noarch
18
19 # Checked out from CVS on this date.
20 Source0:        popt-20081025.tar.gz
21
22 # Not needed - no multilib on MinGW.
23 #Source1:        http://people.redhat.com/jantill/fedora/png-mtime.py
24
25 # These don't apply to CVS.
26 #Patch0:         popt-1.13-multilib.patch
27 #Patch1:         popt-1.13-popt_fprintf.patch
28
29 # MinGW patches.
30 Patch1000:      popt-win.patch
31 Patch1001:      popt-gnulib.patch
32 Patch1002:      popt-autogen.patch
33
34 BuildRequires:  mingw32-filesystem >= 30
35 BuildRequires:  mingw32-gcc
36 BuildRequires:  mingw32-binutils
37 BuildRequires:  mingw32-gettext
38 BuildRequires:  doxygen
39 BuildRequires:  graphviz
40 BuildRequires:  python
41 BuildRequires:  autoconf, automake, libtool, gettext, perl
42
43
44 %description
45 Popt is a C library for parsing command line parameters. Popt was
46 heavily influenced by the getopt() and getopt_long() functions, but
47 it improves on them by allowing more powerful argument expansion.
48 Popt can parse arbitrary argv[] style arrays and automatically set
49 variables based on command line arguments. Popt allows command line
50 arguments to be aliased via configuration files and includes utility
51 functions for parsing arbitrary strings into argv[] arrays using
52 shell-like rules.
53
54
55 %prep
56 %setup -q -n popt
57
58 #%patch0 -p1 -b .multilib
59 #%patch1 -p1 -b .popt_fprintf
60
61 %patch1000 -p1 -b .win
62 %patch1001 -p1 -b .gnulib
63 %patch1002 -p1 -b .autogen
64
65 chmod 0755 configure
66
67
68 %build
69 %{_mingw32_configure}
70 make -C lib fnmatch.h
71 make
72 doxygen
73
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77 make DESTDIR=$RPM_BUILD_ROOT install
78
79 mkdir -p $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/popt.d
80
81 # Remove the static library.
82 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libpopt.a
83
84 # Remove the man page since it duplicates content in the Fedora native pkg.
85 rm $RPM_BUILD_ROOT%{_mingw32_mandir}/man3/*
86
87 # This is broken under MinGW - we should have our own variant.
88 #%find_lang %{name}
89
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94
95 %files
96 %defattr(-,root,root)
97 %{_mingw32_bindir}/libpopt-0.dll
98 %{_mingw32_libdir}/libpopt.dll.a
99 %{_mingw32_libdir}/libpopt.la
100 %{_mingw32_includedir}/popt.h
101 %{_mingw32_datadir}/locale/*/LC_MESSAGES/*.mo
102 %config(noreplace) %{_mingw32_sysconfdir}/popt.d
103
104
105 %changelog
106 * Sat Oct 25 2008 Richard W.M. Jones <rjones@redhat.com> - 1.13-1
107 - Initial RPM release.