]>
Commit | Line | Data |
---|---|---|
2876ab7f | 1 | %define realname pcre |
2 | Summary: Perl-Compatible Regular Expression library - Mingw32 cross version | |
627f2614 | 3 | Summary(pl.UTF-8): Biblioteka perlowych wyrażeń regularnych - wersja skrośna dla Mingw32 |
2876ab7f | 4 | Name: crossmingw32-%{realname} |
e810adc9 | 5 | Version: 7.8 |
c09a8252 | 6 | Release: 1 |
b7e23f90 | 7 | License: BSD (see LICENCE) |
24089856 | 8 | Group: Development/Libraries |
2876ab7f | 9 | Source0: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{realname}-%{version}.tar.bz2 |
e810adc9 | 10 | # Source0-md5: 141132d6af14dccc7b08fa797e4fd441 |
a8625b8f | 11 | URL: http://www.pcre.org/ |
07565286 | 12 | BuildRequires: autoconf >= 2.57 |
2876ab7f | 13 | BuildRequires: automake |
c09a8252 | 14 | BuildRequires: crossmingw32-gcc-c++ |
2876ab7f | 15 | BuildRequires: crossmingw32-w32api |
16 | BuildRequires: libtool | |
c09a8252 | 17 | Requires: crossmingw32-runtime |
2876ab7f | 18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
19 | ||
20 | %define no_install_post_strip 1 | |
21 | ||
22 | %define target i386-mingw32 | |
23 | %define target_platform i386-pc-mingw32 | |
24089856 JB |
24 | |
25 | %define _prefix /usr/%{target} | |
2f7fb64a | 26 | %define _libdir %{_prefix}/lib |
24089856 JB |
27 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
28 | %define _dlldir /usr/share/wine/windows/system | |
2876ab7f | 29 | |
30 | %define __cc %{target}-gcc | |
31 | %define __cxx %{target}-g++ | |
32 | ||
e810adc9 JB |
33 | %ifnarch %{ix86} |
34 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
1bb0a7f6 | 35 | %define optflags -O2 |
36 | %endif | |
e810adc9 JB |
37 | # -z options are invalid for mingw linker |
38 | %define filterout_ld -Wl,-z,.* | |
1bb0a7f6 | 39 | |
2876ab7f | 40 | %description |
41 | PCRE stands for the Perl Compatible Regular Expression library. It | |
42 | contains routines to match text against regular expressions similar to | |
43 | Perl's. It also contains a POSIX compatibility library. | |
44 | ||
3dc1d236 JR |
45 | %description -l pl.UTF-8 |
46 | PCRE (Perl-Compatible Regular Expression) oznacza bibliotekę wyrażeń | |
47 | regularnych kompatybilnych z perlowymi. Zawiera funkcje dopasowujące | |
48 | tekst do wyrażeń regularnych podobnych do tych znanych z Perla. | |
49 | Zawiera także bibliotekę kompatybilną z POSIX. | |
2876ab7f | 50 | |
24089856 JB |
51 | %package static |
52 | Summary: Static PCRE libraries (cross mingw32 version) | |
53 | Summary(pl.UTF-8): Statyczne biblioteki PCRE (wersja skrośna mingw32) | |
54 | Group: Development/Libraries | |
55 | Requires: %{name} = %{version}-%{release} | |
56 | ||
57 | %description static | |
58 | Static PCRE libraries (cross mingw32 version). | |
59 | ||
60 | %description static -l pl.UTF-8 | |
61 | Statyczne biblioteki PCRE (wersja skrośna mingw32). | |
62 | ||
2876ab7f | 63 | %package dll |
481ebdca | 64 | Summary: %{realname} - DLL libraries for Windows |
627f2614 | 65 | Summary(pl.UTF-8): %{realname} - biblioteki DLL dla Windows |
2876ab7f | 66 | Group: Applications/Emulators |
24089856 | 67 | Requires: wine |
2876ab7f | 68 | |
69 | %description dll | |
481ebdca | 70 | %{realname} - DLL libraries for Windows. |
2876ab7f | 71 | |
3dc1d236 | 72 | %description dll -l pl.UTF-8 |
481ebdca | 73 | %{realname} - biblioteki DLL dla Windows. |
2876ab7f | 74 | |
75 | %prep | |
76 | %setup -q -n %{realname}-%{version} | |
2876ab7f | 77 | |
78 | %build | |
2876ab7f | 79 | %{__libtoolize} |
80 | %{__aclocal} | |
81 | %{__autoconf} | |
24089856 JB |
82 | %{__autoheader} |
83 | %{__automake} | |
2876ab7f | 84 | %configure \ |
24089856 | 85 | --host=%{target} \ |
1bb0a7f6 | 86 | --target=%{target} \ |
24089856 JB |
87 | --enable-unicode-properties \ |
88 | --enable-utf8 | |
89 | ||
90 | %{__make} | |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
2876ab7f | 94 | |
24089856 JB |
95 | %{__make} install \ |
96 | DESTDIR=$RPM_BUILD_ROOT | |
1bb0a7f6 | 97 | |
24089856 JB |
98 | install -d $RPM_BUILD_ROOT%{_dlldir} |
99 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
2876ab7f | 100 | |
101 | %if 0%{!?debug:1} | |
24089856 JB |
102 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll |
103 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
2876ab7f | 104 | %endif |
105 | ||
24089856 | 106 | rm -rf $RPM_BUILD_ROOT%{_datadir}/{doc,man} |
2876ab7f | 107 | |
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %files | |
112 | %defattr(644,root,root,755) | |
24089856 JB |
113 | %doc AUTHORS ChangeLog LICENCE NEWS NON-UNIX-USE README |
114 | %{_libdir}/libpcre.dll.a | |
115 | %{_libdir}/libpcrecpp.dll.a | |
116 | %{_libdir}/libpcreposix.dll.a | |
117 | %{_libdir}/libpcre.la | |
118 | %{_libdir}/libpcrecpp.la | |
119 | %{_libdir}/libpcreposix.la | |
120 | %{_includedir}/pcre*.h | |
121 | %{_pkgconfigdir}/libpcre.pc | |
122 | %{_pkgconfigdir}/libpcrecpp.pc | |
123 | ||
124 | %files static | |
125 | %defattr(644,root,root,755) | |
126 | %{_libdir}/libpcre.a | |
127 | %{_libdir}/libpcrecpp.a | |
128 | %{_libdir}/libpcreposix.a | |
2876ab7f | 129 | |
130 | %files dll | |
131 | %defattr(644,root,root,755) | |
24089856 JB |
132 | %{_dlldir}/libpcre-*.dll |
133 | %{_dlldir}/libpcrecpp-*.dll | |
134 | %{_dlldir}/libpcreposix-*.dll |