gettext/gettext.spec

Tue, 28 Aug 2012 18:33:20 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:33:20 +0200
changeset 557
00e3ab20fe25
parent 271
f45355418dfd
permissions
-rw-r--r--

Use parallel make to avoid delay in this particularly parallel buildconf.

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

mercurial