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