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