]> git.pld-linux.org Git - packages/cjs.git/blob - cjs.spec
6e11fb6dc9687c3df69434e64e1ed0aab13ba881
[packages/cjs.git] / cjs.spec
1 #
2 # Conditional build:
3 %bcond_without  systemtap       # systemtap/dtrace trace support
4 %bcond_with     tests           # JS tests (upstream failed to update them, e.g. tests for version < 4.0.0; some require $DISPLAY)
5
6 Summary:        Javascript Bindings for Cinnamon
7 Summary(pl.UTF-8):      Wiązania JavaScriptu dla środowiska Cinnamon
8 Name:           cjs
9 Version:        4.6.0
10 Release:        1
11 Group:          Libraries
12 # The following files contain code from Mozilla which
13 # is triple licensed under MPL1.1/LGPLv2+/GPLv2+:
14 # The console module (modules/console.c)
15 # Stack printer (gjs/stack.c)
16 License:        MIT and (MPL v1.1 or GPL v2+ or LGPL v2+)
17 #Source0Download: https://github.com/linuxmint/cjs/releases
18 Source0:        https://github.com/linuxmint/cjs/archive/%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5:  dd6c63134494c328886ffe34abadbf98
20 URL:            https://github.com/linuxmint/Cinnamon
21 BuildRequires:  autoconf >= 2.64
22 BuildRequires:  automake >= 1:1.11.1
23 BuildRequires:  cairo-gobject-devel
24 BuildRequires:  glib2-devel >= 1:2.42.0
25 BuildRequires:  gobject-introspection-devel >= 1.46.0
26 BuildRequires:  gtk+3-devel >= 3.14.0
27 BuildRequires:  libffi-devel >= 3.0
28 BuildRequires:  libtool >= 2:2.2.0
29 BuildRequires:  libstdc++-devel >= 6:4.7
30 BuildRequires:  mozjs52-devel >= 52
31 BuildRequires:  pkgconfig >= 1:0.14.0
32 BuildRequires:  readline-devel
33 %{?with_systemtap:BuildRequires:        systemtap-sdt-devel}
34 Requires:       glib2 >= 1:2.42.0
35 Requires:       gobject-introspection >= 1.46.0
36 Requires:       gtk+3 >= 3.14.0
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 Cjs allows using Cinnamon libraries from Javascript. It's based on the
41 Spidermonkey Javascript engine from Mozilla and the GObject
42 introspection framework.
43
44 %package devel
45 Summary:        Development package for cjs
46 Summary(pl.UTF-8):      Pakiet programistyczny cjs
47 Group:          Development/Libraries
48 Requires:       %{name} = %{version}-%{release}
49 Requires:       cairo-gobject-devel
50 Requires:       glib2-devel >= 1:2.42.0
51 Requires:       gobject-introspection-devel >= 1.46.0
52 Requires:       gtk+3-devel >= 3.14.0
53 Requires:       libffi-devel >= 3.0
54 Requires:       mozjs52-devel >= 52
55
56 %description devel
57 Files for development with cjs.
58
59 %description devel -l pl.UTF-8
60 Pliki do tworzenia oprogramowania z użyciem cjs
61
62 %package tests
63 Summary:        Tests for the cjs package
64 Summary(pl.UTF-8):      Testy dla pakietu cjs
65 Group:          Development/Libraries
66 Requires:       %{name}-devel = %{version}-%{release}
67
68 %description tests
69 The cjs-tests package contains tests that can be used to verify the
70 functionality of the installed cjs package.
71
72 %description tests -l pl.UTF-8
73 Ten pakiet zawiera testy, których można użyć do sprawdzenia
74 funkcjonalności zainstalowanego pakietu cjs.
75
76 %package -n systemtap-cjs
77 Summary:        systemtap/dtrace probes for cjs
78 Summary(pl.UTF-8):      Sondy systemtap/dtrace dla cjs
79 Group:          Development/Tools
80 Requires:       %{name} = %{version}-%{release}
81 Requires:       systemtap-client
82
83 %description -n systemtap-cjs
84 systemtap/dtrace probes for cjs.
85
86 %description -n systemtap-cjs -l pl.UTF-8
87 Sondy systemtap/dtrace dla cjs.
88
89 %prep
90 %setup -q
91
92 %build
93 %{__libtoolize}
94 %{__aclocal} -I m4
95 %{__autoconf}
96 %{__autoheader}
97 %{__automake}
98 %configure \
99         --enable-installed-tests \
100         --disable-silent-rules \
101         %{?with_systemtap:--enable-systemtap}
102
103 %{__make}
104
105 %if %{with tests}
106 %{__make} check
107 %endif
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111
112 %{__make} install \
113         DESTDIR=$RPM_BUILD_ROOT
114
115 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
116 cp -p examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
117
118 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcjs.la
119 %{__rm} $RPM_BUILD_ROOT%{_libdir}/cjs/lib*.la
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %post   -p /sbin/ldconfig
125 %postun -p /sbin/ldconfig
126
127 %files
128 %defattr(644,root,root,755)
129 %doc COPYING NEWS README.md debian/changelog
130 %attr(755,root,root) %{_bindir}/cjs
131 %attr(755,root,root) %{_bindir}/cjs-console
132 %attr(755,root,root) %{_libdir}/libcjs.so.*.*.*
133 %ghost %{_libdir}/libcjs.so.0
134 %dir %{_libdir}/cjs
135 %dir %{_libdir}/cjs/girepository-1.0
136 %{_libdir}/cjs/girepository-1.0/CjsPrivate-1.0.typelib
137
138 %files devel
139 %defattr(644,root,root,755)
140 %attr(755,root,root) %{_libdir}/libcjs.so
141 %{_includedir}/cjs-1.0
142 %{_pkgconfigdir}/cjs-1.0.pc
143 %{_examplesdir}/%{name}-%{version}
144
145 %files tests
146 %defattr(644,root,root,755)
147 %attr(755,root,root) %{_libdir}/cjs/libgimarshallingtests.so
148 %attr(755,root,root) %{_libdir}/cjs/libregress.so
149 %attr(755,root,root) %{_libdir}/cjs/libwarnlib.so
150 %dir %{_libexecdir}/cjs
151 %{_libexecdir}/cjs/installed-tests
152 # FIXME: this is common dir for installed-tests, move to common package (or don't package installed-tests at all)
153 %dir %{_datadir}/installed-tests
154 %{_datadir}/installed-tests/cjs
155
156 %if %{with systemtap}
157 %files -n systemtap-cjs
158 %defattr(644,root,root,755)
159 %{_datadir}/systemtap/tapset/cjs.stp
160 %endif
This page took 0.080276 seconds and 2 git commands to generate.