glib/glib.spec

Tue, 28 Aug 2012 18:29:30 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:29:30 +0200
changeset 534
d2d0020cfafa
parent 474
26ab32c5da43
child 665
af9f2bac68b2
permissions
-rw-r--r--

Update from Drupal 6.x to 7.x and introduce several new HTML5 themes. Because
many themes from Drupal 6.x have since been abandoned, left unmaintained, or
not ported to Drupal 7.x, this package has changed in size and utility.

     1 ##
     2 ##  glib.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2012 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 ##
    24 #   package version
    25 %define       V_major  2.32
    26 %define       V_minor  3
    28 #   package information
    29 Name:         glib
    30 Summary:      The Gtk Utility Library
    31 URL:          http://www.gtk.org/
    32 Vendor:       The Gtk Project
    33 Packager:     OpenPKG Foundation e.V.
    34 Distribution: OpenPKG Community
    35 Class:        BASE
    36 Group:        Algorithm
    37 License:      GPL
    38 Version:      %{V_major}.%{V_minor}
    39 Release:      20120800
    41 #   package options
    42 %option       with_threads  yes
    44 #   list of sources
    45 Source0:      http://ftp.gnome.org/pub/gnome/sources/glib/%{V_major}/glib-%{version}.tar.xz
    46 Patch0:       glib.patch
    48 #   build information
    49 BuildPreReq:  OpenPKG, openpkg >= 20120101, perl, make
    50 PreReq:       OpenPKG, openpkg >= 20120101, perl
    51 BuildPreReq:  gettext, libiconv, pcre, pcre::with_utf8 = yes, libffi
    52 PreReq:       gettext, libiconv, pcre, pcre::with_utf8 = yes, libffi
    54 %description
    55     GLib is the low-level core library that originally was split out
    56     from Gtk+. It provides data structure handling for C, portability
    57     wrappers, and interfaces for such runtime functionality as an event
    58     loop, threads, dynamic loading, and an object system.
    60 %track
    61     prog glib = {
    62         version   = %{version}
    63         url       = http://ftp.gnome.org/pub/gnome/sources/glib/%{V_major}/
    64         regex     = glib-(__VER__)\.tar\.(gz|bz2)
    65     }
    67 %prep
    68     %setup -q -n glib-%{version}
    69     %patch -p0
    71 %build
    72     #   configure package
    73     %{l_shtool} subst \
    74         -e 's;\$export_dynamic_flag_spec;;g' \
    75         -e 's;eval echo \\\\;eval echo ;' \
    76         configure
    77     %{l_shtool} subst \
    78         -e 's;/glib-2\.0\.pc;/glib-x.x.pc;g' \
    79         -e 's;/gobject-2\.0\.pc;/gobject-x.x.pc;g' \
    80         -e 's;/gthread-2\.0\.pc;/gthread-x.x.pc;g' \
    81         -e 's;/gmodule-2\.0\.pc;/gmodule-x.x.pc;g' \
    82         -e 's;/gio-unix-2\.0\.pc;/gio-unix-x.x.pc;g' \
    83         -e 's;/gio-2\.0\.pc;/gio-x.x.pc;g' \
    84         -e 's;/glib-2\.0;/glib;g' \
    85         -e 's;/gobject-2\.0;/gobject;g' \
    86         -e 's;/gthread-2\.0;/gthread;g' \
    87         -e 's;/gmodule-2\.0;/gmodule;g' \
    88         -e 's;/gio-unix-2\.0;/gio-unix;g' \
    89         -e 's;/gio-2\.0;/gio;g' \
    90         -e 's;/glib-x\.x\.pc;/glib-2.0.pc;g' \
    91         -e 's;/gobject-x\.x\.pc;/gobject-2.0.pc;g' \
    92         -e 's;/gthread-x\.x\.pc;/gthread-2.0.pc;g' \
    93         -e 's;/gmodule-x\.x\.pc;/gmodule-2.0.pc;g' \
    94         -e 's;/gio-unix-x\.x\.pc;/gio-unix-2.0.pc;g' \
    95         -e 's;/gio-x\.x\.pc;/gio-2.0.pc;g' \
    96         -e 's;lib\(g[a-z]*\)-2\.0;lib\1;g' \
    97         `find . -name Makefile.in -print` \
    98         m4macros/glib-2.0.m4
    99     %{l_shtool} subst \
   100         -e 's;/glib-2\.0;/glib;g' \
   101         -e 's;/gobject-2\.0;/gobject;g' \
   102         -e 's;/gthread-2\.0;/gthread;g' \
   103         -e 's;/gmodule-2\.0;/gmodule;g' \
   104         -e 's;/gio-unix-2\.0;/gio-unix;g' \
   105         -e 's;/gio-2\.0;/gio;g' \
   106         -e 's;-l\(g[a-z]*\)-2\.0;-l\1;g' \
   107         *-2.0.pc.in
   108     %{l_shtool} subst \
   109         -e 's;\(#define _XOPEN_SOURCE\) 600;\1 601;' \
   110         glib/tests/strfuncs.c
   111     case "%{l_platform -t}" in
   112         *-sunos* ) 
   113             %{l_shtool} subst \
   114                 -e 's;^\(LIBELF_LIBS =\);\1 -lelf;' \
   115                 gio/Makefile.in
   116             %{l_shtool} subst \
   117                 -e 's;\(Libs.private:.*\) *$;\1 -lsocket -lnsl;' \
   118                 glib-2.0.pc.in
   119             ;;
   120     esac
   121     case "%{l_platform -t}" in
   122         *sun4[uv]-*                  ) l_cflags="$l_cflags -march=v9" ;;
   123         *sun*-*                      ) l_cflags="$l_cflags -march=v8" ;;
   124         *i?86-* | *amd64-* | *ia64-* ) l_cflags="$l_cflags -march=native" ;;
   125     esac
   126     libs=""
   127 %if "%{with_threads}" == "yes"
   128     case "%{l_platform -t}" in
   129         *-netbsd*  ) libs="-lpthread" ;;
   130         *-sunos*   ) libs="-lnsl -lsocket" ;;
   131     esac
   132 %endif
   133     CC="%{l_cc}" \
   134     CFLAGS="%{l_cflags -O} $l_cflags" \
   135     CPPFLAGS="%{l_cppflags}" \
   136     LDFLAGS="%{l_ldflags}" \
   137     LIBS="$libs" \
   138     LIBFFI_CFLAGS="%{l_cppflags}" \
   139     LIBFFI_LIBS="%{l_ldflags} -lffi" \
   140     PCRE_CFLAGS="%{l_cppflags pcre .}" \
   141     PCRE_LIBS="%{l_ldflags} -lpcre" \
   142     PERL="%{l_prefix}/bin/perl" \
   143     PERL_PATH="%{l_prefix}/bin/perl" \
   144     GREP="grep" \
   145     ./configure \
   146         --prefix=%{l_prefix} \
   147         --mandir=%{l_prefix}/man \
   148         --with-libiconv=gnu \
   149         --with-pcre=system \
   150 %if "%{with_threads}" == "yes"
   151         --with-threads=posix \
   152 %endif
   153         --disable-gtk-doc \
   154         --disable-dtrace \
   155         --disable-fam \
   156         --disable-debug \
   157         --disable-shared
   159     #   build package
   160     %{l_make} %{l_mflags -O}
   162 %install
   163     #   install package
   164     %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT"
   166     #   strip down installation
   167     rm -f  $RPM_BUILD_ROOT%{l_prefix}/info/dir
   168     rm -f  $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
   169     rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
   170     rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/glib-2.0
   171     rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gtk-doc
   172     rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gdb
   173     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   174     rm $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
   176     #   determine installation files
   177     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   179 %files -f files
   181 %clean

mercurial