]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - pygobject3/pygobject3.nm
libuecc: New package
[people/ms/ipfire-3.x.git] / pygobject3 / pygobject3.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = pygobject3
7 version = %{ver_major}.%{ver_minor}
8 ver_major = 3.7
9 ver_minor = 4
10 release = 2
11
12 groups = Development/Tools
13 url = http://www.pygtk.org/
14 license = LGPLv2+
15 summary = Python 2 bindings for GObject.
16
17 description
18 The %{name} package provides a convenient wrapper for the GObject library
19 for use in Python programs.
20 end
21
22 thisapp = pygobject-%{version}
23
24 source_dl = http://ftp.gnome.org/pub/GNOME/sources/pygobject/%{ver_major}/
25 sources = %{thisapp}.tar.xz
26
27 build
28 requires
29 cairo-gobject-devel >= 1.12.12
30 chrpath
31 glib2-devel >= 2.34.2
32 gobject-introspection-devel >= 1.34.2
33 pkg-config
34 python-cairo-devel
35 python3-cairo-devel
36 python-devel
37 python3-devel
38 end
39
40 DIR_APP3 = %{DIR_APP}-python3
41
42 prepare_cmds
43 cp -av %{DIR_APP} %{DIR_APP3}
44
45 pushd %{DIR_APP3}
46 find -name '*.py' | xargs sed -i '1s|^#!python|#!%{python3}|'
47 popd
48
49 find -name '*.py' | xargs sed -i '1s|^#!python|#!%{python}|'
50 end
51
52 build
53 pushd %{DIR_APP3}
54 export PYTHON=%{python3}
55 ./configure %{configure_options}
56 make %{PARALLELISMFLAGS}
57 popd
58
59 export PYTHON=%{python}
60 ./configure %{configure_options}
61 make %{PARALELLISMFLAGS}
62 end
63
64 install
65 pushd %{DIR_APP3}
66 export PYTHON=%{python3}
67 make install DESTDIR=%{BUILDROOT}
68 chrpath --delete %{BUILDROOT}%{python3_sitearch}/gi/{*.so,*/*.so}
69 popd
70
71 export PYTHON=%{python}
72 make install DESTDIR=%{BUILDROOT}
73 chrpath --delete %{BUILDROOT}%{python_sitearch}/gi/{*.so,*/*.so}
74 end
75 end
76
77 packages
78 package python-gobject3
79 requires
80 gobject-introspection >= 1.34.2
81 python-cairo
82 end
83
84 files += \
85 {libdir}/*python2*.so.*
86 end
87
88 package python3-gobject3
89 template PYTHON3
90
91 requires
92 gobject-introspection >= 1.34.2
93 python3-cairo
94 end
95
96 files += \
97 %{libdir}/*python3*.so.*
98 end
99
100 package %{name}-devel
101 template DEVEL
102
103 provides
104 python-gobject3-devel
105 python3-gobject3-devel
106 end
107
108 requires
109 glib2-devel
110 gobject-introspection-devel >= 1.34.2
111 end
112
113 files += \
114 %{libdir}/*python3*.so
115 end
116
117 package %{name}-debuginfo
118 template DEBUGINFO
119 end
120 end