]> git.pld-linux.org Git - SPECS.git/blob - js187.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / js187.spec
1 # NOTE: JavaScript version is 1.8.7, implementation version is 1.0.0; what should be package version?
2 # Some paths (library name, .pc file) seem intentionally not conflict with js < 1.8,
3 # but some still do (includes path, js-config, js shell).
4 # It's somehow messy, so let's put this version in separate js187 package for now,
5 # until upstream decides which way to go in the future.
6 #
7 # Conditional build:
8 %bcond_without  default_js      # build as default js package
9
10 Summary:        SpiderMonkey JavaScript 1.8.7 implementation
11 Summary(pl.UTF-8):      Implementacja SpiderMonkey języka JavaScript 1.8.7
12 Name:           js187
13 Version:        1.0.0
14 Release:        6
15 License:        MPL 1.1 or GPL v2+ or LGPL v2.1+
16 Group:          Development/Languages
17 #Source0:       http://ftp.mozilla.org/pub/mozilla.org/js/%{name}-%{version}.tar.gz
18 Source0:        %{name}-%{version}.tar.gz
19 # Source0-md5:  9399466aa36e98e157cb3780c3f96dde
20 Patch0:         %{name}-install.patch
21 Patch1:         %{name}-x32.patch
22 URL:            http://www.mozilla.org/js/
23 BuildRequires:  libstdc++-devel
24 BuildRequires:  nspr-devel >= 4.7.0
25 BuildRequires:  perl-base >= 1:5.6
26 BuildRequires:  python >= 1:2.5
27 BuildRequires:  readline-devel
28 BuildRequires:  rpm-perlprov
29 BuildRequires:  rpmbuild(macros) >= 1.294
30 BuildRequires:  sed >= 4.0
31 Requires:       %{name}-libs = %{version}-%{release}
32 %if %{with default_js}
33 Provides:       js = 2:1.8.7
34 Obsoletes:      js < 2:1.8.7
35 %endif
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 JavaScript Reference Implementation (codename SpiderMonkey). The
40 package contains JavaScript runtime (compiler, interpreter,
41 decompiler, garbage collector, atom manager, standard classes) and
42 small "shell" program that can be used interactively and with .js
43 files to run scripts.
44
45 %description -l pl.UTF-8
46 Wzorcowa implementacja JavaScriptu (o nazwie kodowej SpiderMonkey).
47 Pakiet zawiera środowisko uruchomieniowe (kompilator, interpreter,
48 dekompilator, odśmiecacz, standardowe klasy) i niewielką powłokę,
49 która może być używana interaktywnie lub z plikami .js do uruchamiania
50 skryptów.
51
52 %package libs
53 Summary:        SpiderMonkey JavaScript 1.8.7 library
54 Summary(pl.UTF-8):      Biblioteka SpiderMonkey JavaScript 1.8.7
55 Group:          Libraries
56 Requires:       nspr >= 4.7.0
57 Conflicts:      js187 < 1.0.0-2
58
59 %description libs
60 SpiderMonkey JavaScript 1.8.7 library.
61
62 %description libs -l pl.UTF-8
63 Biblioteka SpiderMonkey JavaScript 1.8.7.
64
65 %package devel
66 Summary:        Header files for JavaScript 1.8.7 reference library
67 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki JavaScript 1.8.7
68 Group:          Development/Libraries
69 Requires:       %{name}-libs = %{version}-%{release}
70 Requires:       libstdc++-devel
71 Requires:       nspr-devel >= 4.7.0
72 %if %{with default_js}
73 Provides:       js-devel = 2:1.8.7
74 Obsoletes:      js-devel < 2:1.8.7
75 %endif
76
77 %description devel
78 Header files for JavaScript 1.8.7 reference library.
79
80 %description devel -l pl.UTF-8
81 Pliki nagłówkowe biblioteki JavaScript 1.8.7.
82
83 %package static
84 Summary:        Static JavaScript 1.8.7 reference library
85 Summary(pl.UTF-8):      Statyczna biblioteka JavaScript 1.8.7
86 Group:          Development/Libraries
87 Requires:       %{name}-devel = %{version}-%{release}
88 %if %{with default_js}
89 Provides:       js-static = 2:1.8.7
90 Obsoletes:      js-static < 2:1.8.7
91 %endif
92
93 %description static
94 Static version of JavaScript 1.8.7 reference library.
95
96 %description static -l pl.UTF-8
97 Statyczna wersja biblioteki JavaScript 1.8.7.
98
99 %prep
100 %setup -q -n js-1.8.7
101 %patch0 -p1
102 %patch1 -p1
103
104 sed -i -e 's/-O3//' js/src/Makefile.in js/src/config/Makefile.in
105
106 %build
107 export CXXFLAGS="%{rpmcxxflags} -fpermissive"
108 cd js/src
109 %configure2_13 \
110         --enable-readline \
111         --enable-threadsafe \
112         --enable-system-ffi \
113         --disable-methodjit \
114         --with-system-nspr
115
116 %{__make} \
117         HOST_OPTIMIZE_FLAGS= \
118         MOZILLA_VERSION=%{version}
119
120 %install
121 rm -rf $RPM_BUILD_ROOT
122
123 %{__make} -j1 -C js/src install \
124         DESTDIR=$RPM_BUILD_ROOT \
125         MOZILLA_VERSION=%{version} \
126         MODULE=%{name}
127
128 # not installed by make install
129 cp -aL js/src/dist/include/{ds,gc,js,mozilla,vm} $RPM_BUILD_ROOT%{_includedir}/js187
130
131 # not installed by make install in new buildsystem
132 install js/src/shell/js $RPM_BUILD_ROOT%{_bindir}/js187
133
134 %{__mv} $RPM_BUILD_ROOT%{_bindir}/js-config $RPM_BUILD_ROOT%{_bindir}/js187-config
135
136 # fix symlinks pointing to buildroot
137 ln -sf libmozjs187.so.1.0 $RPM_BUILD_ROOT%{_libdir}/libmozjs187.so
138 ln -sf libmozjs187.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/libmozjs187.so.1.0
139
140 %if %{with default_js}
141 # provide symlinks as default js implementation
142 # (don't provide libjs.so.1 as the libraries are not binary-compatible)
143 ln -sf libmozjs187.so $RPM_BUILD_ROOT%{_libdir}/libjs.so
144 ln -sf libmozjs187-1.0.a $RPM_BUILD_ROOT%{_libdir}/libjs.a
145 ln -sf js187 $RPM_BUILD_ROOT%{_includedir}/js
146 ln -sf js187 $RPM_BUILD_ROOT%{_bindir}/js
147 ln -sf js187-config $RPM_BUILD_ROOT%{_bindir}/js-config
148 %else
149 %{__sed} -i -e 's,/js$,/js187,' $RPM_BUILD_ROOT%{_pkgconfigdir}/mozjs187.pc
150 %endif
151
152 %clean
153 rm -rf $RPM_BUILD_ROOT
154
155 %post   libs -p /sbin/ldconfig
156 %postun libs -p /sbin/ldconfig
157
158 %if %{with default_js}
159 %pretrans devel
160 if [ -d %{_includedir}/js ] && [ ! -L %{_includedir}/js ]; then
161         rm -rf /usr/include/js
162 fi
163 %endif
164
165 %files
166 %defattr(644,root,root,755)
167 %doc js/src/README.html
168 %attr(755,root,root) %{_bindir}/js187
169 %if %{with default_js}
170 %attr(755,root,root) %{_bindir}/js
171 %endif
172
173 %files libs
174 %defattr(644,root,root,755)
175 %attr(755,root,root) %{_libdir}/libmozjs187.so.*.*.*
176 %attr(755,root,root) %ghost %{_libdir}/libmozjs187.so.1.0
177
178 %files devel
179 %defattr(644,root,root,755)
180 %attr(755,root,root) %{_bindir}/js187-config
181 %attr(755,root,root) %{_libdir}/libmozjs187.so
182 %{_includedir}/js187
183 %{_pkgconfigdir}/mozjs187.pc
184 %if %{with default_js}
185 %attr(755,root,root) %{_bindir}/js-config
186 %attr(755,root,root) %{_libdir}/libjs.so
187 %{_includedir}/js
188 %endif
189
190 %files static
191 %defattr(644,root,root,755)
192 %{_libdir}/libmozjs187-1.0.a
193 %if %{with default_js}
194 %{_libdir}/libjs.a
195 %endif
This page took 0.561916 seconds and 3 git commands to generate.