1 ## |
1 ## |
2 ## glib2.spec -- OpenPKG RPM Package Specification |
2 ## glib.spec -- OpenPKG RPM Package Specification |
3 ## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/> |
3 ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> |
4 ## |
4 ## |
5 ## Permission to use, copy, modify, and distribute this software for |
5 ## Permission to use, copy, modify, and distribute this software for |
6 ## any purpose with or without fee is hereby granted, provided that |
6 ## any purpose with or without fee is hereby granted, provided that |
7 ## the above copyright notice and this permission notice appear in all |
7 ## the above copyright notice and this permission notice appear in all |
8 ## copies. |
8 ## copies. |
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
21 ## SUCH DAMAGE. |
21 ## SUCH DAMAGE. |
22 ## |
22 ## |
23 |
23 |
24 # package version |
24 # package version |
25 %define V_glib2_major 2.25 |
25 %define V_major 2.32 |
26 %define V_glib2_minor 13 |
26 %define V_minor 3 |
27 |
27 |
28 # package information |
28 # package information |
29 Name: glib2 |
29 Name: glib |
30 Summary: The Gtk Utility Library |
30 Summary: The Gtk Utility Library |
31 URL: http://www.gtk.org/ |
31 URL: http://www.gtk.org/ |
32 Vendor: The Gtk Project |
32 Vendor: The Gtk Project |
33 Packager: OpenPKG Foundation e.V. |
33 Packager: OpenPKG Foundation e.V. |
34 Distribution: OpenPKG Community |
34 Distribution: OpenPKG Community |
35 Class: BASE |
35 Class: BASE |
36 Group: Algorithm |
36 Group: Algorithm |
37 License: GPL |
37 License: GPL |
38 Version: %{V_glib2_major}.%{V_glib2_minor} |
38 Version: %{V_major}.%{V_minor} |
39 Release: 20101020 |
39 Release: 20120713 |
40 |
40 |
41 # package options |
41 # package options |
42 %option with_threads yes |
42 %option with_threads yes |
43 |
43 |
44 # list of sources |
44 # list of sources |
45 Source0: ftp://ftp.gnome.org/pub/gnome/sources/glib/%{V_glib2_major}/glib-%{version}.tar.gz |
45 Source0: http://ftp.gnome.org/pub/gnome/sources/glib/%{V_major}/glib-%{version}.tar.xz |
46 Patch0: glib2.patch |
46 Patch0: glib.patch |
47 |
47 |
48 # build information |
48 # build information |
49 Prefix: %{l_prefix} |
49 BuildPreReq: OpenPKG, openpkg >= 20120101, perl, make |
50 BuildRoot: %{l_buildroot} |
50 PreReq: OpenPKG, openpkg >= 20120101, perl |
51 BuildPreReq: OpenPKG, openpkg >= 20100101, perl, make, pkgconfig |
51 BuildPreReq: gettext, libiconv, pcre, pcre::with_utf8 = yes, libffi |
52 PreReq: OpenPKG, openpkg >= 20100101, perl |
52 PreReq: gettext, libiconv, pcre, pcre::with_utf8 = yes, libffi |
53 BuildPreReq: gettext, libiconv, pcre, pcre::with_utf8 = yes |
|
54 PreReq: gettext, libiconv, pcre, pcre::with_utf8 = yes |
|
55 |
53 |
56 %description |
54 %description |
57 GLib is the low-level core library that originally was split out |
55 GLib is the low-level core library that originally was split out |
58 from Gtk+. It provides data structure handling for C, portability |
56 from Gtk+. It provides data structure handling for C, portability |
59 wrappers, and interfaces for such runtime functionality as an event |
57 wrappers, and interfaces for such runtime functionality as an event |
60 loop, threads, dynamic loading, and an object system. |
58 loop, threads, dynamic loading, and an object system. |
61 |
59 |
62 %track |
60 %track |
63 prog glib2 = { |
61 prog glib = { |
64 version = %{version} |
62 version = %{version} |
65 url = ftp://ftp.gnome.org/pub/gnome/sources/glib/%{V_glib2_major}/ |
63 url = http://ftp.gnome.org/pub/gnome/sources/glib/%{V_major}/ |
66 regex = glib-(__VER__)\.tar\.(gz|bz2) |
64 regex = glib-(__VER__)\.tar\.(gz|bz2) |
67 } |
65 } |
68 |
66 |
69 %prep |
67 %prep |
70 %setup -q -n glib-%{version} |
68 %setup -q -n glib-%{version} |
81 -e 's;/gobject-2\.0\.pc;/gobject-x.x.pc;g' \ |
79 -e 's;/gobject-2\.0\.pc;/gobject-x.x.pc;g' \ |
82 -e 's;/gthread-2\.0\.pc;/gthread-x.x.pc;g' \ |
80 -e 's;/gthread-2\.0\.pc;/gthread-x.x.pc;g' \ |
83 -e 's;/gmodule-2\.0\.pc;/gmodule-x.x.pc;g' \ |
81 -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' \ |
82 -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' \ |
83 -e 's;/gio-2\.0\.pc;/gio-x.x.pc;g' \ |
86 -e 's;/glib-2\.0;/glib2;g' \ |
84 -e 's;/glib-2\.0;/glib;g' \ |
87 -e 's;/gobject-2\.0;/gobject2;g' \ |
85 -e 's;/gobject-2\.0;/gobject;g' \ |
88 -e 's;/gthread-2\.0;/gthread2;g' \ |
86 -e 's;/gthread-2\.0;/gthread;g' \ |
89 -e 's;/gmodule-2\.0;/gmodule2;g' \ |
87 -e 's;/gmodule-2\.0;/gmodule;g' \ |
90 -e 's;/gio-unix-2\.0;/gio-unix2;g' \ |
88 -e 's;/gio-unix-2\.0;/gio-unix;g' \ |
91 -e 's;/gio-2\.0;/gio2;g' \ |
89 -e 's;/gio-2\.0;/gio;g' \ |
92 -e 's;/glib-x\.x\.pc;/glib-2.0.pc;g' \ |
90 -e 's;/glib-x\.x\.pc;/glib-2.0.pc;g' \ |
93 -e 's;/gobject-x\.x\.pc;/gobject-2.0.pc;g' \ |
91 -e 's;/gobject-x\.x\.pc;/gobject-2.0.pc;g' \ |
94 -e 's;/gthread-x\.x\.pc;/gthread-2.0.pc;g' \ |
92 -e 's;/gthread-x\.x\.pc;/gthread-2.0.pc;g' \ |
95 -e 's;/gmodule-x\.x\.pc;/gmodule-2.0.pc;g' \ |
93 -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' \ |
94 -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' \ |
95 -e 's;/gio-x\.x\.pc;/gio-2.0.pc;g' \ |
98 -e 's;lib\(g[a-z]*\)-2\.0;lib\12;g' \ |
96 -e 's;lib\(g[a-z]*\)-2\.0;lib\1;g' \ |
99 `find . -name Makefile.in -print` \ |
97 `find . -name Makefile.in -print` \ |
100 m4macros/glib-2.0.m4 |
98 m4macros/glib-2.0.m4 |
101 %{l_shtool} subst \ |
99 %{l_shtool} subst \ |
102 -e 's;/glib-2\.0;/glib2;g' \ |
100 -e 's;/glib-2\.0;/glib;g' \ |
103 -e 's;/gobject-2\.0;/gobject2;g' \ |
101 -e 's;/gobject-2\.0;/gobject;g' \ |
104 -e 's;/gthread-2\.0;/gthread2;g' \ |
102 -e 's;/gthread-2\.0;/gthread;g' \ |
105 -e 's;/gmodule-2\.0;/gmodule2;g' \ |
103 -e 's;/gmodule-2\.0;/gmodule;g' \ |
106 -e 's;/gio-unix-2\.0;/gio-unix2;g' \ |
104 -e 's;/gio-unix-2\.0;/gio-unix;g' \ |
107 -e 's;/gio-2\.0;/gio2;g' \ |
105 -e 's;/gio-2\.0;/gio;g' \ |
108 -e 's;-l\(g[a-z]*\)-2\.0;-l\12;g' \ |
106 -e 's;-l\(g[a-z]*\)-2\.0;-l\1;g' \ |
109 *-2.0.pc.in |
107 *-2.0.pc.in |
110 libs="" |
108 libs="" |
111 %if "%{with_threads}" == "yes" |
109 %if "%{with_threads}" == "yes" |
112 case "%{l_platform -t}" in |
110 case "%{l_platform -t}" in |
113 *-netbsd* ) libs="-lpthread" ;; |
111 *-netbsd* ) libs="-lpthread" ;; |
116 CC="%{l_cc}" \ |
114 CC="%{l_cc}" \ |
117 CFLAGS="%{l_cflags -O}" \ |
115 CFLAGS="%{l_cflags -O}" \ |
118 CPPFLAGS="%{l_cppflags}" \ |
116 CPPFLAGS="%{l_cppflags}" \ |
119 LDFLAGS="%{l_ldflags}" \ |
117 LDFLAGS="%{l_ldflags}" \ |
120 LIBS="$libs" \ |
118 LIBS="$libs" \ |
|
119 LIBFFI_CFLAGS="%{l_cppflags}" \ |
|
120 LIBFFI_LIBS="%{l_ldflags} -lffi" \ |
|
121 PCRE_CFLAGS="%{l_cppflags pcre .}" \ |
|
122 PCRE_LIBS="%{l_ldflags} -lpcre" \ |
121 PERL="%{l_prefix}/bin/perl" \ |
123 PERL="%{l_prefix}/bin/perl" \ |
122 PERL_PATH="%{l_prefix}/bin/perl" \ |
124 PERL_PATH="%{l_prefix}/bin/perl" \ |
123 GREP="grep" \ |
125 GREP="grep" \ |
124 ./configure \ |
126 ./configure \ |
125 --prefix=%{l_prefix} \ |
127 --prefix=%{l_prefix} \ |
126 --mandir=%{l_prefix}/man \ |
128 --mandir=%{l_prefix}/man \ |
127 --with-libiconv=gnu \ |
129 --with-libiconv=gnu \ |
128 --disable-debug \ |
|
129 --disable-shared \ |
|
130 --with-pcre=system \ |
130 --with-pcre=system \ |
131 %if "%{with_threads}" == "yes" |
131 %if "%{with_threads}" == "yes" |
132 --enable-threads \ |
132 --with-threads=posix \ |
133 %else |
|
134 --disable-threads \ |
|
135 %endif |
133 %endif |
136 --disable-gtk-doc \ |
134 --disable-gtk-doc \ |
137 --disable-dtrace |
135 --disable-dtrace \ |
|
136 --disable-fam \ |
|
137 --disable-debug \ |
|
138 --disable-shared |
138 |
139 |
139 # build package |
140 # build package |
140 %{l_make} %{l_mflags} |
141 %{l_make} %{l_mflags} |
141 |
142 |
142 %install |
143 %install |
143 rm -rf $RPM_BUILD_ROOT |
|
144 |
|
145 # install package |
144 # install package |
146 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
145 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
147 |
146 |
148 # strip down installation |
147 # strip down installation |
149 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir |
148 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir |
150 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias |
149 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/charset.alias |
151 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale |
150 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale |