Sat, 24 Mar 2012 21:40:49 +0100
Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.
1 ##
2 ## glib2.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2000-2010 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_glib2_major 2.25
26 %define V_glib2_minor 13
28 # package information
29 Name: glib2
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_glib2_major}.%{V_glib2_minor}
39 Release: 20101020
41 # package options
42 %option with_threads yes
44 # list of sources
45 Source0: ftp://ftp.gnome.org/pub/gnome/sources/glib/%{V_glib2_major}/glib-%{version}.tar.gz
46 Patch0: glib2.patch
48 # build information
49 Prefix: %{l_prefix}
50 BuildRoot: %{l_buildroot}
51 BuildPreReq: OpenPKG, openpkg >= 20100101, perl, make, pkgconfig
52 PreReq: OpenPKG, openpkg >= 20100101, perl
53 BuildPreReq: gettext, libiconv, pcre, pcre::with_utf8 = yes
54 PreReq: gettext, libiconv, pcre, pcre::with_utf8 = yes
56 %description
57 GLib is the low-level core library that originally was split out
58 from Gtk+. It provides data structure handling for C, portability
59 wrappers, and interfaces for such runtime functionality as an event
60 loop, threads, dynamic loading, and an object system.
62 %track
63 prog glib2 = {
64 version = %{version}
65 url = ftp://ftp.gnome.org/pub/gnome/sources/glib/%{V_glib2_major}/
66 regex = glib-(__VER__)\.tar\.(gz|bz2)
67 }
69 %prep
70 %setup -q -n glib-%{version}
71 %patch -p0
73 %build
74 # configure package
75 %{l_shtool} subst \
76 -e 's;\$export_dynamic_flag_spec;;g' \
77 -e 's;eval echo \\\\;eval echo ;' \
78 configure
79 %{l_shtool} subst \
80 -e 's;/glib-2\.0\.pc;/glib-x.x.pc;g' \
81 -e 's;/gobject-2\.0\.pc;/gobject-x.x.pc;g' \
82 -e 's;/gthread-2\.0\.pc;/gthread-x.x.pc;g' \
83 -e 's;/gmodule-2\.0\.pc;/gmodule-x.x.pc;g' \
84 -e 's;/gio-unix-2\.0\.pc;/gio-unix-x.x.pc;g' \
85 -e 's;/gio-2\.0\.pc;/gio-x.x.pc;g' \
86 -e 's;/glib-2\.0;/glib2;g' \
87 -e 's;/gobject-2\.0;/gobject2;g' \
88 -e 's;/gthread-2\.0;/gthread2;g' \
89 -e 's;/gmodule-2\.0;/gmodule2;g' \
90 -e 's;/gio-unix-2\.0;/gio-unix2;g' \
91 -e 's;/gio-2\.0;/gio2;g' \
92 -e 's;/glib-x\.x\.pc;/glib-2.0.pc;g' \
93 -e 's;/gobject-x\.x\.pc;/gobject-2.0.pc;g' \
94 -e 's;/gthread-x\.x\.pc;/gthread-2.0.pc;g' \
95 -e 's;/gmodule-x\.x\.pc;/gmodule-2.0.pc;g' \
96 -e 's;/gio-unix-x\.x\.pc;/gio-unix-2.0.pc;g' \
97 -e 's;/gio-x\.x\.pc;/gio-2.0.pc;g' \
98 -e 's;lib\(g[a-z]*\)-2\.0;lib\12;g' \
99 `find . -name Makefile.in -print` \
100 m4macros/glib-2.0.m4
101 %{l_shtool} subst \
102 -e 's;/glib-2\.0;/glib2;g' \
103 -e 's;/gobject-2\.0;/gobject2;g' \
104 -e 's;/gthread-2\.0;/gthread2;g' \
105 -e 's;/gmodule-2\.0;/gmodule2;g' \
106 -e 's;/gio-unix-2\.0;/gio-unix2;g' \
107 -e 's;/gio-2\.0;/gio2;g' \
108 -e 's;-l\(g[a-z]*\)-2\.0;-l\12;g' \
109 *-2.0.pc.in
110 libs=""
111 %if "%{with_threads}" == "yes"
112 case "%{l_platform -t}" in
113 *-netbsd* ) libs="-lpthread" ;;
114 esac
115 %endif
116 CC="%{l_cc}" \
117 CFLAGS="%{l_cflags -O}" \
118 CPPFLAGS="%{l_cppflags}" \
119 LDFLAGS="%{l_ldflags}" \
120 LIBS="$libs" \
121 PERL="%{l_prefix}/bin/perl" \
122 PERL_PATH="%{l_prefix}/bin/perl" \
123 GREP="grep" \
124 ./configure \
125 --prefix=%{l_prefix} \
126 --mandir=%{l_prefix}/man \
127 --with-libiconv=gnu \
128 --disable-debug \
129 --disable-shared \
130 --with-pcre=system \
131 %if "%{with_threads}" == "yes"
132 --enable-threads \
133 %else
134 --disable-threads \
135 %endif
136 --disable-gtk-doc \
137 --disable-dtrace
139 # build package
140 %{l_make} %{l_mflags}
142 %install
143 rm -rf $RPM_BUILD_ROOT
145 # install package
146 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
148 # strip down installation
149 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
150 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias
151 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
152 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/glib-2.0
153 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gtk-doc
154 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gdb
155 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
156 rm $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
158 # determine installation files
159 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
161 %files -f files
163 %clean
164 rm -rf $RPM_BUILD_ROOT