gettext/gettext.spec

changeset 271
f45355418dfd
child 272
f96f4c1a2d1a
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gettext/gettext.spec	Fri Oct 22 13:22:33 2010 +0200
     1.3 @@ -0,0 +1,139 @@
     1.4 +##
     1.5 +##  gettext.spec -- OpenPKG RPM Package Specification
     1.6 +##  Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/>
     1.7 +##
     1.8 +##  Permission to use, copy, modify, and distribute this software for
     1.9 +##  any purpose with or without fee is hereby granted, provided that
    1.10 +##  the above copyright notice and this permission notice appear in all
    1.11 +##  copies.
    1.12 +##
    1.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    1.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    1.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    1.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    1.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.24 +##  SUCH DAMAGE.
    1.25 +##
    1.26 +
    1.27 +#   package information
    1.28 +Name:         gettext
    1.29 +Summary:      GNU National Language Support (NLS) Toolkit
    1.30 +URL:          http://www.gnu.org/software/gettext/
    1.31 +Vendor:       Free Software Foundation
    1.32 +Packager:     OpenPKG Foundation e.V.
    1.33 +Distribution: OpenPKG Community
    1.34 +Class:        BASE
    1.35 +Group:        Charset
    1.36 +License:      GPL
    1.37 +Version:      0.18.1.1
    1.38 +Release:      20100607
    1.39 +
    1.40 +#   list of sources
    1.41 +Source0:      ftp://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.gz
    1.42 +Patch0:       gettext.patch
    1.43 +
    1.44 +#   build information
    1.45 +BuildPreReq:  OpenPKG, openpkg >= 20100101, gcc, make, automake
    1.46 +PreReq:       OpenPKG, openpkg >= 20100101
    1.47 +BuildPreReq:  libiconv
    1.48 +PreReq:       libiconv
    1.49 +
    1.50 +%description
    1.51 +    Gettext is the GNU toolkit for National Language Support (NLS).
    1.52 +
    1.53 +%track
    1.54 +    prog gettext = {
    1.55 +        version   = %{version}
    1.56 +        url       = ftp://ftp.gnu.org/gnu/gettext/
    1.57 +        regex     = gettext-(__VER__)\.tar\.gz
    1.58 +    }
    1.59 +
    1.60 +%prep
    1.61 +    %setup -q
    1.62 +    %patch -p0
    1.63 +
    1.64 +%build
    1.65 +    #   strip Automake version numbers from binaries
    1.66 +    %{l_shtool} subst \
    1.67 +        -e 's;-${am__api_version};;g' \
    1.68 +        `find . -name configure -print`
    1.69 +
    1.70 +    #   remove part that conflicts with libiconv
    1.71 +    %{l_shtool} subst \
    1.72 +        -e '/localcharset.\$lo/d' \
    1.73 +        gettext-runtime/intl/Makefile.in
    1.74 +    %{l_shtool} subst \
    1.75 +        -e 's;\(SUBDIRS.*=.*\)intl-java ;\1;' \
    1.76 +        -e 's;\(SUBDIRS.*=.*\)intl-csharp ;\1;' \
    1.77 +         gettext-runtime/Makefile.in
    1.78 +    %{l_shtool} subst \
    1.79 +        -e 's;^.*intl-java/Makefile.*$;;' \
    1.80 +        -e 's;^.*intl-csharp/Makefile.*$;;' \
    1.81 +        gettext-runtime/configure
    1.82 +
    1.83 +    #   disable a few parts from building
    1.84 +    %{l_shtool} subst \
    1.85 +        -e 's;@BUILDJAVA@;no;g' \
    1.86 +        -e 's;@BUILDJAVAEXE@;no;g' \
    1.87 +        -e 's;@BUILDCSHARP@;no;g' \
    1.88 +        gettext-tools/src/Makefile.in
    1.89 +    %{l_shtool} subst \
    1.90 +        -e 's;^\(SUBDIRS =.*\)tests gnulib-tests examples;\1;' \
    1.91 +        gettext-tools/Makefile.in
    1.92 +    %{l_shtool} subst \
    1.93 +        -e 's;\#if USEJEXE;#ifdef USEJEXE;' \
    1.94 +        gettext-tools/src/read-java.c \
    1.95 +        gettext-tools/src/urlget.c
    1.96 +
    1.97 +    #   configure toolkit
    1.98 +    CC="%{l_cc}" \
    1.99 +    CFLAGS="%{l_cflags -O}" \
   1.100 +    CPPFLAGS="%{l_cppflags}" \
   1.101 +    LDFLAGS="%{l_ldflags}" \
   1.102 +    GREP="grep" \
   1.103 +    ./configure \
   1.104 +        --prefix=%{l_prefix} \
   1.105 +        --datarootdir=%{l_prefix}/share \
   1.106 +        --mandir=%{l_prefix}/man \
   1.107 +        --infodir=%{l_prefix}/info \
   1.108 +        --with-libiconv-prefix=%{l_prefix} \
   1.109 +        --with-included-gettext \
   1.110 +        --without-libexpat-prefix \
   1.111 +        --disable-libasprintf \
   1.112 +        --disable-csharp \
   1.113 +        --disable-java \
   1.114 +        --disable-shared
   1.115 +
   1.116 +    #   build toolkit
   1.117 +    %{l_make} %{l_mflags}
   1.118 +
   1.119 +%install
   1.120 +
   1.121 +    #   install toolkit
   1.122 +    %{l_make} %{l_mflags} install \
   1.123 +        AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" \
   1.124 +        DESTDIR=$RPM_BUILD_ROOT
   1.125 +
   1.126 +    #   strip down installation
   1.127 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
   1.128 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
   1.129 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gettext/projects
   1.130 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
   1.131 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
   1.132 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
   1.133 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libgettext*.la
   1.134 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
   1.135 +
   1.136 +    #   determine installation files
   1.137 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   1.138 +
   1.139 +%files -f files
   1.140 +
   1.141 +%clean
   1.142 +

mercurial