gettext/gettext.spec

changeset 620
7a6617235946
parent 619
c1ab501b4751
child 621
3e3f0a094486
     1.1 --- a/gettext/gettext.spec	Tue Aug 28 18:54:50 2012 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,143 +0,0 @@
     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:      20101020
    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 -Prefix:       %{l_prefix}
    1.46 -BuildRoot:    %{l_buildroot}
    1.47 -BuildPreReq:  OpenPKG, openpkg >= 20100101, gcc, make, automake
    1.48 -PreReq:       OpenPKG, openpkg >= 20100101
    1.49 -BuildPreReq:  libiconv
    1.50 -PreReq:       libiconv
    1.51 -
    1.52 -%description
    1.53 -    Gettext is the GNU toolkit for National Language Support (NLS).
    1.54 -
    1.55 -%track
    1.56 -    prog gettext = {
    1.57 -        version   = %{version}
    1.58 -        url       = ftp://ftp.gnu.org/gnu/gettext/
    1.59 -        regex     = gettext-(__VER__)\.tar\.gz
    1.60 -    }
    1.61 -
    1.62 -%prep
    1.63 -    %setup -q
    1.64 -    %patch -p0
    1.65 -
    1.66 -%build
    1.67 -    #   strip Automake version numbers from binaries
    1.68 -    %{l_shtool} subst \
    1.69 -        -e 's;-${am__api_version};;g' \
    1.70 -        `find . -name configure -print`
    1.71 -
    1.72 -    #   remove part that conflicts with libiconv
    1.73 -    %{l_shtool} subst \
    1.74 -        -e '/localcharset.\$lo/d' \
    1.75 -        gettext-runtime/intl/Makefile.in
    1.76 -    %{l_shtool} subst \
    1.77 -        -e 's;\(SUBDIRS.*=.*\)intl-java ;\1;' \
    1.78 -        -e 's;\(SUBDIRS.*=.*\)intl-csharp ;\1;' \
    1.79 -         gettext-runtime/Makefile.in
    1.80 -    %{l_shtool} subst \
    1.81 -        -e 's;^.*intl-java/Makefile.*$;;' \
    1.82 -        -e 's;^.*intl-csharp/Makefile.*$;;' \
    1.83 -        gettext-runtime/configure
    1.84 -
    1.85 -    #   disable a few parts from building
    1.86 -    %{l_shtool} subst \
    1.87 -        -e 's;@BUILDJAVA@;no;g' \
    1.88 -        -e 's;@BUILDJAVAEXE@;no;g' \
    1.89 -        -e 's;@BUILDCSHARP@;no;g' \
    1.90 -        gettext-tools/src/Makefile.in
    1.91 -    %{l_shtool} subst \
    1.92 -        -e 's;^\(SUBDIRS =.*\)tests gnulib-tests examples;\1;' \
    1.93 -        gettext-tools/Makefile.in
    1.94 -    %{l_shtool} subst \
    1.95 -        -e 's;\#if USEJEXE;#ifdef USEJEXE;' \
    1.96 -        gettext-tools/src/read-java.c \
    1.97 -        gettext-tools/src/urlget.c
    1.98 -
    1.99 -    #   configure toolkit
   1.100 -    CC="%{l_cc}" \
   1.101 -    CFLAGS="%{l_cflags -O}" \
   1.102 -    CPPFLAGS="%{l_cppflags}" \
   1.103 -    LDFLAGS="%{l_ldflags}" \
   1.104 -    GREP="grep" \
   1.105 -    ./configure \
   1.106 -        --prefix=%{l_prefix} \
   1.107 -        --datarootdir=%{l_prefix}/share \
   1.108 -        --mandir=%{l_prefix}/man \
   1.109 -        --infodir=%{l_prefix}/info \
   1.110 -        --with-libiconv-prefix=%{l_prefix} \
   1.111 -        --with-included-gettext \
   1.112 -        --without-libexpat-prefix \
   1.113 -        --disable-libasprintf \
   1.114 -        --disable-csharp \
   1.115 -        --disable-java \
   1.116 -        --disable-shared
   1.117 -
   1.118 -    #   build toolkit
   1.119 -    %{l_make} %{l_mflags}
   1.120 -
   1.121 -%install
   1.122 -    rm -rf $RPM_BUILD_ROOT
   1.123 -
   1.124 -    #   install toolkit
   1.125 -    %{l_make} %{l_mflags} install \
   1.126 -        AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" \
   1.127 -        DESTDIR=$RPM_BUILD_ROOT
   1.128 -
   1.129 -    #   strip down installation
   1.130 -    rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
   1.131 -    rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
   1.132 -    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gettext/projects
   1.133 -    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
   1.134 -    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc
   1.135 -    rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
   1.136 -    rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libgettext*.la
   1.137 -    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
   1.138 -
   1.139 -    #   determine installation files
   1.140 -    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   1.141 -
   1.142 -%files -f files
   1.143 -
   1.144 -%clean
   1.145 -    rm -rf $RPM_BUILD_ROOT
   1.146 -

mercurial