]> git.pld-linux.org Git - packages/crossmingw32-pcre.git/blob - crossmingw32-pcre.spec
- fix alpha, sparc
[packages/crossmingw32-pcre.git] / crossmingw32-pcre.spec
1 %define         realname        pcre
2 Summary:        Perl-Compatible Regular Expression library - Mingw32 cross version
3 Summary(pl):    Biblioteka perlowych wyra¿eñ regularnych - wersja skro¶na dla Mingw32
4 Name:           crossmingw32-%{realname}
5 Version:        4.5
6 Release:        2
7 License:        Free to use (see LICENCE)
8 Group:          Libraries
9 Source0:        ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{realname}-%{version}.tar.bz2
10 # Source0-md5:  c51bd34197008b128046f0799d2242e4
11 Patch0:         %{name}-shared.patch
12 BuildRequires:  autoconf
13 BuildRequires:  automake
14 BuildRequires:  crossmingw32-gcc
15 BuildRequires:  crossmingw32-w32api
16 BuildRequires:  libtool
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         no_install_post_strip   1
20
21 %define         target          i386-mingw32
22 %define         target_platform i386-pc-mingw32
23 %define         arch            %{_prefix}/%{target}
24 %define         gccarch         %{_prefix}/lib/gcc-lib/%{target}
25 %define         gcclib          %{_prefix}/lib/gcc-lib/%{target}/%{version}
26
27 %define         __cc            %{target}-gcc
28 %define         __cxx           %{target}-g++
29
30 %ifarch alpha sparc sparc64 sparcv9
31 %define         optflags        -O2
32 %endif
33
34 %description
35 PCRE stands for the Perl Compatible Regular Expression library. It
36 contains routines to match text against regular expressions similar to
37 Perl's. It also contains a POSIX compatibility library.
38
39 %description -l pl
40 PCRE (Perl-Compatible Regular Expression) oznacza bibliotekê wyra¿eñ
41 regularnych kompatybilnych z perlowymi. Zawiera funkcje dopasowuj±ce
42 tekst do wyra¿eñ regularnych podobnych do tych znanych z Perla.
43 Zawiera tak¿e bibliotekê kompatybiln± z POSIX.
44
45 %package dll
46 Summary:        %{realname} - DLL library for Windows
47 Summary(pl):    %{realname} - biblioteka DLL dla Windows
48 Group:          Applications/Emulators
49
50 %description dll
51 %{realname} - DLL library for Windows.
52
53 %description dll -l pl
54 %{realname} - biblioteka DLL dla Windows.
55
56 %prep
57 %setup -q -n %{realname}-%{version}
58 %patch0 -p1
59
60 %build
61 CC=%{target}-gcc ; export CC
62 CXX=%{target}-g++ ; export CXX
63 LD=%{target}-ld ; export LD
64 AR=%{target}-ar ; export AR
65 AS=%{target}-as ; export AS
66 CROSS_COMPILE=1 ; export CROSS_COMPILE
67 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
68 RANLIB=%{target}-ranlib ; export RANLIB
69 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
70 TARGET="%{target}" ; export TARGET
71
72 %{__libtoolize}
73 %{__aclocal}
74 %{__autoconf}
75 %configure \
76         --host=%{_host} \
77         --target=%{target} \
78         --enable-utf8 \
79         --disable-shared
80
81 # we want host binary to generate some tables, not win32 binary
82 cc -c %{optflags} -I. dftables.c
83 cc %{optflags} -I. -I. -o dftables dftables.o
84
85 %{__make}
86 %{__make} pcre.dll
87
88 %if 0%{!?debug:1}
89 %{target}-strip .libs/*.dll
90 %{target}-strip -g -R.comment -R.note .libs/*.a
91 %endif
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT%{arch}/{include,lib}
96 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
97
98 install pcre.h $RPM_BUILD_ROOT%{arch}/include
99 install .libs/libpcre{,.dll}.a $RPM_BUILD_ROOT%{arch}/lib
100 install .libs/pcre.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %files
106 %defattr(644,root,root,755)
107 %{arch}/include/*
108 %{arch}/lib/*
109
110 %files dll
111 %defattr(644,root,root,755)
112 %{_datadir}/wine/windows/system/*
This page took 0.05429 seconds and 3 git commands to generate.