]> git.pld-linux.org Git - packages/crossmingw32-pcre.git/blob - crossmingw32-pcre.spec
- updated to 6.5
[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:        6.5
6 Release:        1
7 License:        BSD (see LICENCE)
8 Group:          Libraries
9 Source0:        ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/%{realname}-%{version}.tar.bz2
10 # Source0-md5:  1bd00f173438cbef8b957e3e1711f737
11 URL:            http://www.pcre.org/
12 BuildRequires:  autoconf
13 BuildRequires:  automake
14 BuildRequires:  crossmingw32-gcc-c++
15 BuildRequires:  crossmingw32-w32api
16 BuildRequires:  libtool
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 %define         arch            %{_prefix}/%{target}
25 %define         gccarch         %{_prefix}/lib/gcc-lib/%{target}
26 %define         gcclib          %{_prefix}/lib/gcc-lib/%{target}/%{version}
27
28 %define         __cc            %{target}-gcc
29 %define         __cxx           %{target}-g++
30
31 %ifarch alpha sparc sparc64 sparcv9
32 %define         optflags        -O2
33 %endif
34
35 %description
36 PCRE stands for the Perl Compatible Regular Expression library. It
37 contains routines to match text against regular expressions similar to
38 Perl's. It also contains a POSIX compatibility library.
39
40 %description -l pl
41 PCRE (Perl-Compatible Regular Expression) oznacza bibliotekê wyra¿eñ
42 regularnych kompatybilnych z perlowymi. Zawiera funkcje dopasowuj±ce
43 tekst do wyra¿eñ regularnych podobnych do tych znanych z Perla.
44 Zawiera tak¿e bibliotekê kompatybiln± z POSIX.
45
46 %package dll
47 Summary:        %{realname} - DLL library for Windows
48 Summary(pl):    %{realname} - biblioteka DLL dla Windows
49 Group:          Applications/Emulators
50
51 %description dll
52 %{realname} - DLL library for Windows.
53
54 %description dll -l pl
55 %{realname} - biblioteka DLL dla Windows.
56
57 %prep
58 %setup -q -n %{realname}-%{version}
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 %{rpmcflags} -I. dftables.c
83 cc %{rpmcflags} -I. -I. -o dftables dftables.o
84
85 # override EXEEXT to use host binaries
86 %{__make} winshared \
87         EXEEXT=
88
89 %if 0%{!?debug:1}
90 %{target}-strip .libs/*.dll
91 %{target}-strip -g -R.comment -R.note .libs/*.a
92 %endif
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96 install -d $RPM_BUILD_ROOT%{arch}/{include,lib}
97 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
98
99 install pcre.h pcreposix.h pcrecpp.h pcre_scanner.h pcre_stringpiece.h \
100         $RPM_BUILD_ROOT%{arch}/include
101 install .libs/libpcre{,posix,cpp}.a $RPM_BUILD_ROOT%{arch}/lib
102 install .libs/{libpcre,pcreposix,pcrecpp}.dll.a $RPM_BUILD_ROOT%{arch}/lib
103 install .libs/pcre{,posix,cpp}.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %files
109 %defattr(644,root,root,755)
110 %{arch}/include/*
111 %{arch}/lib/*
112
113 %files dll
114 %defattr(644,root,root,755)
115 %{_datadir}/wine/windows/system/*
This page took 0.094783 seconds and 3 git commands to generate.