gettext/gettext.spec

Fri, 22 Oct 2010 13:22:33 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 22 Oct 2010 13:22:33 +0200
changeset 271
f45355418dfd
child 272
f96f4c1a2d1a
permissions
-rw-r--r--

Import package vendor original specs for necessary manipulations.

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@271 35 Release: 20100607
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@271 42 BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, make, automake
michael@271 43 PreReq: OpenPKG, openpkg >= 20100101
michael@271 44 BuildPreReq: libiconv
michael@271 45 PreReq: libiconv
michael@271 46
michael@271 47 %description
michael@271 48 Gettext is the GNU toolkit for National Language Support (NLS).
michael@271 49
michael@271 50 %track
michael@271 51 prog gettext = {
michael@271 52 version = %{version}
michael@271 53 url = ftp://ftp.gnu.org/gnu/gettext/
michael@271 54 regex = gettext-(__VER__)\.tar\.gz
michael@271 55 }
michael@271 56
michael@271 57 %prep
michael@271 58 %setup -q
michael@271 59 %patch -p0
michael@271 60
michael@271 61 %build
michael@271 62 # strip Automake version numbers from binaries
michael@271 63 %{l_shtool} subst \
michael@271 64 -e 's;-${am__api_version};;g' \
michael@271 65 `find . -name configure -print`
michael@271 66
michael@271 67 # remove part that conflicts with libiconv
michael@271 68 %{l_shtool} subst \
michael@271 69 -e '/localcharset.\$lo/d' \
michael@271 70 gettext-runtime/intl/Makefile.in
michael@271 71 %{l_shtool} subst \
michael@271 72 -e 's;\(SUBDIRS.*=.*\)intl-java ;\1;' \
michael@271 73 -e 's;\(SUBDIRS.*=.*\)intl-csharp ;\1;' \
michael@271 74 gettext-runtime/Makefile.in
michael@271 75 %{l_shtool} subst \
michael@271 76 -e 's;^.*intl-java/Makefile.*$;;' \
michael@271 77 -e 's;^.*intl-csharp/Makefile.*$;;' \
michael@271 78 gettext-runtime/configure
michael@271 79
michael@271 80 # disable a few parts from building
michael@271 81 %{l_shtool} subst \
michael@271 82 -e 's;@BUILDJAVA@;no;g' \
michael@271 83 -e 's;@BUILDJAVAEXE@;no;g' \
michael@271 84 -e 's;@BUILDCSHARP@;no;g' \
michael@271 85 gettext-tools/src/Makefile.in
michael@271 86 %{l_shtool} subst \
michael@271 87 -e 's;^\(SUBDIRS =.*\)tests gnulib-tests examples;\1;' \
michael@271 88 gettext-tools/Makefile.in
michael@271 89 %{l_shtool} subst \
michael@271 90 -e 's;\#if USEJEXE;#ifdef USEJEXE;' \
michael@271 91 gettext-tools/src/read-java.c \
michael@271 92 gettext-tools/src/urlget.c
michael@271 93
michael@271 94 # configure toolkit
michael@271 95 CC="%{l_cc}" \
michael@271 96 CFLAGS="%{l_cflags -O}" \
michael@271 97 CPPFLAGS="%{l_cppflags}" \
michael@271 98 LDFLAGS="%{l_ldflags}" \
michael@271 99 GREP="grep" \
michael@271 100 ./configure \
michael@271 101 --prefix=%{l_prefix} \
michael@271 102 --datarootdir=%{l_prefix}/share \
michael@271 103 --mandir=%{l_prefix}/man \
michael@271 104 --infodir=%{l_prefix}/info \
michael@271 105 --with-libiconv-prefix=%{l_prefix} \
michael@271 106 --with-included-gettext \
michael@271 107 --without-libexpat-prefix \
michael@271 108 --disable-libasprintf \
michael@271 109 --disable-csharp \
michael@271 110 --disable-java \
michael@271 111 --disable-shared
michael@271 112
michael@271 113 # build toolkit
michael@271 114 %{l_make} %{l_mflags}
michael@271 115
michael@271 116 %install
michael@271 117
michael@271 118 # install toolkit
michael@271 119 %{l_make} %{l_mflags} install \
michael@271 120 AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" \
michael@271 121 DESTDIR=$RPM_BUILD_ROOT
michael@271 122
michael@271 123 # strip down installation
michael@271 124 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
michael@271 125 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
michael@271 126 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gettext/projects
michael@271 127 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
michael@271 128 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
michael@271 129 rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
michael@271 130 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libgettext*.la
michael@271 131 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
michael@271 132
michael@271 133 # determine installation files
michael@271 134 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@271 135
michael@271 136 %files -f files
michael@271 137
michael@271 138 %clean
michael@271 139

mercurial