gettext/gettext.spec

changeset 271
f45355418dfd
child 272
f96f4c1a2d1a
equal deleted inserted replaced
-1:000000000000 0:4caf765794dd
1 ##
2 ## gettext.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/>
4 ##
5 ## Permission to use, copy, modify, and distribute this software for
6 ## any purpose with or without fee is hereby granted, provided that
7 ## the above copyright notice and this permission notice appear in all
8 ## copies.
9 ##
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
23
24 # package information
25 Name: gettext
26 Summary: GNU National Language Support (NLS) Toolkit
27 URL: http://www.gnu.org/software/gettext/
28 Vendor: Free Software Foundation
29 Packager: OpenPKG Foundation e.V.
30 Distribution: OpenPKG Community
31 Class: BASE
32 Group: Charset
33 License: GPL
34 Version: 0.18.1.1
35 Release: 20100607
36
37 # list of sources
38 Source0: ftp://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.gz
39 Patch0: gettext.patch
40
41 # build information
42 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, make, automake
43 PreReq: OpenPKG, openpkg >= 20100101
44 BuildPreReq: libiconv
45 PreReq: libiconv
46
47 %description
48 Gettext is the GNU toolkit for National Language Support (NLS).
49
50 %track
51 prog gettext = {
52 version = %{version}
53 url = ftp://ftp.gnu.org/gnu/gettext/
54 regex = gettext-(__VER__)\.tar\.gz
55 }
56
57 %prep
58 %setup -q
59 %patch -p0
60
61 %build
62 # strip Automake version numbers from binaries
63 %{l_shtool} subst \
64 -e 's;-${am__api_version};;g' \
65 `find . -name configure -print`
66
67 # remove part that conflicts with libiconv
68 %{l_shtool} subst \
69 -e '/localcharset.\$lo/d' \
70 gettext-runtime/intl/Makefile.in
71 %{l_shtool} subst \
72 -e 's;\(SUBDIRS.*=.*\)intl-java ;\1;' \
73 -e 's;\(SUBDIRS.*=.*\)intl-csharp ;\1;' \
74 gettext-runtime/Makefile.in
75 %{l_shtool} subst \
76 -e 's;^.*intl-java/Makefile.*$;;' \
77 -e 's;^.*intl-csharp/Makefile.*$;;' \
78 gettext-runtime/configure
79
80 # disable a few parts from building
81 %{l_shtool} subst \
82 -e 's;@BUILDJAVA@;no;g' \
83 -e 's;@BUILDJAVAEXE@;no;g' \
84 -e 's;@BUILDCSHARP@;no;g' \
85 gettext-tools/src/Makefile.in
86 %{l_shtool} subst \
87 -e 's;^\(SUBDIRS =.*\)tests gnulib-tests examples;\1;' \
88 gettext-tools/Makefile.in
89 %{l_shtool} subst \
90 -e 's;\#if USEJEXE;#ifdef USEJEXE;' \
91 gettext-tools/src/read-java.c \
92 gettext-tools/src/urlget.c
93
94 # configure toolkit
95 CC="%{l_cc}" \
96 CFLAGS="%{l_cflags -O}" \
97 CPPFLAGS="%{l_cppflags}" \
98 LDFLAGS="%{l_ldflags}" \
99 GREP="grep" \
100 ./configure \
101 --prefix=%{l_prefix} \
102 --datarootdir=%{l_prefix}/share \
103 --mandir=%{l_prefix}/man \
104 --infodir=%{l_prefix}/info \
105 --with-libiconv-prefix=%{l_prefix} \
106 --with-included-gettext \
107 --without-libexpat-prefix \
108 --disable-libasprintf \
109 --disable-csharp \
110 --disable-java \
111 --disable-shared
112
113 # build toolkit
114 %{l_make} %{l_mflags}
115
116 %install
117
118 # install toolkit
119 %{l_make} %{l_mflags} install \
120 AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" \
121 DESTDIR=$RPM_BUILD_ROOT
122
123 # strip down installation
124 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
125 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
126 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gettext/projects
127 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
128 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
129 rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
130 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libgettext*.la
131 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
132
133 # determine installation files
134 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
135
136 %files -f files
137
138 %clean
139

mercurial