New patches from Fedora.
[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 # popt 1.13 doesn't work for cross-compilation, but the CVS version
8 # contains significant fixes which get some of the way there.  (We
9 # patch it further, and have sent those fixes upstream).  This is the
10 # date of the CVS version that we use as a base:
11 %define cvsdate 20081025
12
13 Name:           mingw32-popt
14 Version:        1.14
15 Release:        0.3.cvs%{cvsdate}%{?dist}
16 Summary:        MinGW Windows C library for parsing command line parameters
17
18 License:        MIT
19 Group:          Development/Libraries
20 URL:            http://www.rpm5.org/
21 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
22
23 BuildArch:      noarch
24
25 # Checked out from CVS on this date.
26 Source0:        popt-%{cvsdate}.tar.gz
27
28 # Not needed - no multilib on MinGW.
29 #Source1:        http://people.redhat.com/jantill/fedora/png-mtime.py
30
31 # These don't apply to CVS.
32 #Patch0:         popt-1.13-multilib.patch
33 #Patch1:         popt-1.13-popt_fprintf.patch
34
35 # MinGW patches.
36 Patch1000:      popt-win.patch
37 Patch1001:      popt-gnulib.patch
38 Patch1002:      popt-autogen.patch
39
40 BuildRequires:  mingw32-filesystem >= 30
41 BuildRequires:  mingw32-gcc
42 BuildRequires:  mingw32-binutils
43 BuildRequires:  mingw32-gettext
44 BuildRequires:  doxygen
45 BuildRequires:  graphviz
46 BuildRequires:  python
47 BuildRequires:  autoconf, automake, libtool, gettext, perl
48
49
50 %description
51 Popt is a C library for parsing command line parameters. Popt was
52 heavily influenced by the getopt() and getopt_long() functions, but
53 it improves on them by allowing more powerful argument expansion.
54 Popt can parse arbitrary argv[] style arrays and automatically set
55 variables based on command line arguments. Popt allows command line
56 arguments to be aliased via configuration files and includes utility
57 functions for parsing arbitrary strings into argv[] arrays using
58 shell-like rules.
59
60
61 %prep
62 %setup -q -n popt
63
64 #%patch0 -p1 -b .multilib
65 #%patch1 -p1 -b .popt_fprintf
66
67 %patch1000 -p1 -b .win
68 %patch1001 -p1 -b .gnulib
69 %patch1002 -p1 -b .autogen
70
71 chmod 0755 configure
72
73
74 %build
75 %{_mingw32_configure} --disable-static
76 make -C lib fnmatch.h
77 make %{?_smp_mflags}
78 doxygen
79
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 make DESTDIR=$RPM_BUILD_ROOT install
84
85 mkdir -p $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/popt.d
86
87 # Remove the man page since it duplicates content in the Fedora native pkg.
88 rm $RPM_BUILD_ROOT%{_mingw32_mandir}/man3/*
89
90 %find_lang popt
91
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96
97 %files -f popt.lang
98 %defattr(-,root,root)
99 %doc COPYING
100 %{_mingw32_bindir}/libpopt-0.dll
101 %{_mingw32_libdir}/libpopt.dll.a
102 %{_mingw32_libdir}/libpopt.la
103 %{_mingw32_includedir}/popt.h
104 %config(noreplace) %{_mingw32_sysconfdir}/popt.d
105
106
107 %changelog
108 * Fri Feb 20 2009 Richard W.M. Jones <rjones@redhat.com> - 1.14-0.3.cvs20081025
109 - Rebuild for mingw32-gcc 4.4
110
111 * Fri Feb  6 2009 Richard W.M. Jones <rjones@redhat.com> - 1.14-0.2.cvs20081025
112 - Include license file.
113
114 * Fri Jan 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.14-0.1.cvs20081025
115 - The version should be 1.14 because this is a pre-release (from CVS).
116 - Disable static libraries.
117 - Build using _smp_mflags.
118 - Use find_lang.
119
120 * Sat Oct 25 2008 Richard W.M. Jones <rjones@redhat.com> - 1.13-1
121 - Initial RPM release.