]>
Commit | Line | Data |
---|---|---|
95911c7e JB |
1 | # |
2 | # Conditional build: | |
aee54d63 | 3 | %bcond_without sysprof # sysprof profiling |
95911c7e | 4 | %bcond_without systemtap # systemtap/dtrace trace support |
68e1bbed | 5 | # |
d1e21e3e | 6 | Summary: JavaScript bindings for GNOME |
ae612451 | 7 | Summary(pl.UTF-8): Wiązania JavaScriptu dla GNOME |
d1e21e3e | 8 | Name: gjs |
0d5ba1f5 | 9 | Version: 1.70.0 |
e3f8969d | 10 | Release: 1 |
ae612451 | 11 | License: MIT and (MPL v1.1 or GPL v2+ or LGPL v2+) |
d1e21e3e | 12 | Group: Libraries |
0d5ba1f5 JB |
13 | Source0: https://download.gnome.org/sources/gjs/1.70/%{name}-%{version}.tar.xz |
14 | # Source0-md5: cbf534f8bc13b359160d4be5d2c40462 | |
c4adf36e | 15 | URL: https://wiki.gnome.org/Projects/Gjs |
9762e2fa MB |
16 | BuildRequires: autoconf >= 2.64 |
17 | BuildRequires: automake >= 1:1.11.1 | |
d2570104 AF |
18 | BuildRequires: cairo-devel |
19 | BuildRequires: cairo-gobject-devel | |
dee0d724 | 20 | BuildRequires: gettext-tools |
b905d295 JB |
21 | BuildRequires: glib2-devel >= 1:2.66.0 |
22 | BuildRequires: gobject-introspection-devel >= 1.66.1 | |
118870d4 | 23 | BuildRequires: libffi-devel |
e3f8969d | 24 | BuildRequires: libstdc++-devel >= 6:7.0 |
ee5cf52a | 25 | BuildRequires: libtool >= 2:2.2.0 |
e3f8969d | 26 | BuildRequires: meson >= 0.52.0 |
0d5ba1f5 | 27 | BuildRequires: mozjs78-devel >= 78.2.0 |
f7239c5e | 28 | BuildRequires: ninja >= 1.5 |
d1e21e3e | 29 | BuildRequires: pkgconfig |
d2570104 | 30 | BuildRequires: readline-devel |
b905d295 | 31 | BuildRequires: rpm-build >= 4.6 |
f7239c5e | 32 | BuildRequires: rpmbuild(macros) >= 1.736 |
e3f8969d JB |
33 | # pkgconfig(sysprof-capture-4) |
34 | %{?with_sysprof:BuildRequires: sysprof-devel >= 3.36} | |
95911c7e | 35 | %{?with_systemtap:BuildRequires: systemtap-sdt-devel} |
1c06e8ee JB |
36 | BuildRequires: tar >= 1:1.22 |
37 | BuildRequires: xz | |
b905d295 | 38 | Requires: glib2 >= 1:2.66.0 |
d1e21e3e MB |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | %description | |
42 | Gjs allows using GNOME libraries from JavaScript. It is mainly based | |
43 | on Spidermonkey JavaScript engine and the GObject introspection | |
44 | framework. | |
45 | ||
46 | %description -l pl.UTF-8 | |
ae612451 JB |
47 | Gjs pozwala używać bibliotek GNOME z JavaScriptem. Jest oparty głównie |
48 | na silniku JavaScriptu Spidermonkey i systemie GObject introspection. | |
d1e21e3e MB |
49 | |
50 | %package devel | |
51 | Summary: Header files for gjs library | |
52 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki gjs | |
53 | Group: Development/Libraries | |
54 | Requires: %{name} = %{version}-%{release} | |
ee5cf52a JB |
55 | Requires: cairo-devel |
56 | Requires: cairo-gobject-devel | |
b905d295 JB |
57 | Requires: glib2-devel >= 1:2.66.0 |
58 | Requires: gobject-introspection-devel >= 1.66.0 | |
ee5cf52a | 59 | Requires: libffi-devel |
0d5ba1f5 | 60 | Requires: mozjs78-devel >= 78.2.0 |
d1e21e3e MB |
61 | |
62 | %description devel | |
63 | Header files for gjs library. | |
64 | ||
65 | %description devel -l pl.UTF-8 | |
66 | Pliki nagłówkowe biblioteki gjs. | |
67 | ||
95911c7e JB |
68 | %package -n systemtap-gjs |
69 | Summary: systemtap/dtrace probes for gjs | |
70 | Summary(pl.UTF-8): Sondy systemtap/dtrace dla gjs | |
71 | Group: Development/Tools | |
72 | Requires: %{name} = %{version}-%{release} | |
73 | Requires: systemtap-client | |
b905d295 | 74 | BuildArch: noarch |
95911c7e JB |
75 | |
76 | %description -n systemtap-gjs | |
77 | systemtap/dtrace probes for gjs. | |
78 | ||
79 | %description -n systemtap-gjs -l pl.UTF-8 | |
80 | Sondy systemtap/dtrace dla gjs. | |
81 | ||
d1e21e3e MB |
82 | %prep |
83 | %setup -q | |
84 | ||
85 | %build | |
a9efafad JR |
86 | %meson build \ |
87 | -Dprofiler=%{?with_sysprof:enabled}%{!?with_sysprof:disabled} \ | |
88 | -Dsystemtap=%{__true_false systemtap} \ | |
89 | -Ddtrace=%{__true_false systemtap} | |
90 | ||
91 | %ninja_build -C build | |
d1e21e3e MB |
92 | |
93 | %install | |
94 | rm -rf $RPM_BUILD_ROOT | |
0a8630ec | 95 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
d1e21e3e | 96 | |
a9efafad | 97 | %ninja_install -C build |
d1e21e3e | 98 | |
aee54d63 | 99 | cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
d1e21e3e | 100 | |
aee54d63 JB |
101 | # belongs to installed-tests |
102 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas/org.gnome.GjsTest.gschema.xml | |
e3f8969d | 103 | %{__rm} -r $RPM_BUILD_ROOT{%{_datadir},%{_libexecdir}}/installed-tests |
d1e21e3e MB |
104 | |
105 | %clean | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | ||
108 | %post -p /sbin/ldconfig | |
109 | %postun -p /sbin/ldconfig | |
110 | ||
111 | %files | |
112 | %defattr(644,root,root,755) | |
a9efafad | 113 | %doc COPYING NEWS README.md |
d1e21e3e MB |
114 | %attr(755,root,root) %{_bindir}/gjs |
115 | %attr(755,root,root) %{_bindir}/gjs-console | |
d1e21e3e MB |
116 | %attr(755,root,root) %{_libdir}/libgjs.so.*.*.* |
117 | %attr(755,root,root) %ghost %{_libdir}/libgjs.so.0 | |
1ec4cb2a ŁK |
118 | %dir %{_libdir}/gjs |
119 | %dir %{_libdir}/gjs/girepository-1.0 | |
120 | %{_libdir}/gjs/girepository-1.0/GjsPrivate-1.0.typelib | |
e8f0ae7c | 121 | %{_datadir}/gjs-1.0 |
d1e21e3e MB |
122 | |
123 | %files devel | |
124 | %defattr(644,root,root,755) | |
d1e21e3e | 125 | %attr(755,root,root) %{_libdir}/libgjs.so |
d1e21e3e MB |
126 | %{_includedir}/gjs-1.0 |
127 | %{_pkgconfigdir}/gjs-1.0.pc | |
d1e21e3e | 128 | %{_examplesdir}/%{name}-%{version} |
95911c7e | 129 | |
ab1adb5b | 130 | %if %{with systemtap} |
95911c7e JB |
131 | %files -n systemtap-gjs |
132 | %defattr(644,root,root,755) | |
133 | %{_datadir}/systemtap/tapset/gjs.stp | |
ab1adb5b | 134 | %endif |