[packages/mujs] - new
qboosh
qboosh at pld-linux.org
Sat Nov 29 18:28:32 CET 2014
commit ed69f59ab5b004dff50e164d83dcbabc141b4447
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Nov 29 18:28:32 2014 +0100
- new
mujs-shared.patch | 49 ++++++++++++++++++++++++++++++
mujs.spec | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 138 insertions(+)
---
diff --git a/mujs.spec b/mujs.spec
new file mode 100644
index 0000000..fcf5ab0
--- /dev/null
+++ b/mujs.spec
@@ -0,0 +1,89 @@
+Summary: MuJS - lightweight, embeddable JavaScript interpreter in C
+Summary(pl.UTF-8): MuJS - lekki, osadzalny interpreter JavaScriptu napisany w C
+Name: mujs
+Version: 0
+%define snap 20141118
+Release: 0.%{snap}.1
+License: AGPL v3+
+Group: Development/Languages
+# git clone git://git.ghostscript.com/mujs.git
+# tar cJf mujs.tar.xz mujs
+Source0: %{name}.tar.xz
+# Source0-md5: 36b3cce9191c6788ab72dd72e97d6f72
+Patch0: %{name}-shared.patch
+URL: http://www.mujs.com/
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+MuJS is a lightweight JavaScript interpreter designed for embedding in
+other software to extend them with scripting capabilities.
+
+%description -l pl.UTF-8
+MuJS to lekki interpreter JavaScriptu zaprojektowany do osadzania w
+innych programach w celu rozszerzenia ich o obsługę skryptów.
+
+%package devel
+Summary: Header files for MuJS library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki MuJS
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files for MuJS library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki MuJS.
+
+%package static
+Summary: Static MuJS library
+Summary(pl.UTF-8): Statyczna biblioteka MuJS
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static MuJS library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka MuJS.
+
+%prep
+%setup -q -n %{name}
+%patch0 -p1
+
+%build
+%{__make} \
+ CC="%{__cc}" \
+ CFLAGS="%{rpmcflags} %{rpmcppflags} -std=c99 -Wall -Wextra -Wno-unused-parameter -Wunreachable-code" \
+ LDFLAGS="%{rpmldflags}" \
+ libdir=%{_libdir}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT \
+ prefix=%{_prefix} \
+ libdir=%{_libdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS README
+%attr(755,root,root) %{_bindir}/mujs
+%attr(755,root,root) %{_libdir}/libmujs.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libmujs.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libmujs.so
+%{_libdir}/libmujs.la
+%{_includedir}/mujs.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libmujs.a
diff --git a/mujs-shared.patch b/mujs-shared.patch
new file mode 100644
index 0000000..1881366
--- /dev/null
+++ b/mujs-shared.patch
@@ -0,0 +1,49 @@
+--- mujs/Makefile.orig 2014-11-29 10:26:09.000000000 +0100
++++ mujs/Makefile 2014-11-29 18:04:50.775023210 +0100
+@@ -1,6 +1,6 @@
+ SRCS := $(wildcard js*.c utf*.c regex.c)
+ HDRS := $(wildcard js*.h mujs.h utf.h regex.h)
+-OBJS := $(SRCS:%.c=build/%.o)
++LOBJS := $(SRCS:%.c=build/%.lo)
+
+ prefix ?= /usr/local
+ bindir ?= $(prefix)/bin
+@@ -9,6 +9,8 @@
+
+ CC := clang
+ CFLAGS := -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter -Wunreachable-code
++LTCC = libtool --mode=compile --tag=CC $(CC)
++LTLINK = libtool --mode=link --tag=CC $(CC)
+
+ ifeq "$(build)" "debug"
+ CFLAGS += -g
+@@ -41,11 +43,14 @@
+ build/%.o: %.c $(HDRS)
+ $(CC) $(CFLAGS) -o $@ -c $<
+
+-build/libmujs.a: $(OBJS)
+- ar cru $@ $^
++build/%.lo: %.c $(HDRS)
++ $(LTCC) $(CFLAGS) -o $@ -c $<
+
+-build/mujs: build/main.o build/libmujs.a
+- $(CC) $(LDFLAGS) -o $@ $^ -lm
++build/libmujs.la: $(LOBJS)
++ $(LTLINK) $(LDFLAGS) -o $@ $^ -rpath $(libdir) -lm
++
++build/mujs: build/main.o build/libmujs.la
++ $(LTLINK) $(LDFLAGS) -o $@ $^ -lm
+
+ build/mujsone: build/main.o build/one.o
+ $(CC) $(LDFLAGS) -o $@ $^ -lm
+@@ -55,8 +60,8 @@
+ install -d $(DESTDIR)$(libdir)
+ install -d $(DESTDIR)$(bindir)
+ install -t $(DESTDIR)$(incdir) mujs.h
+- install -t $(DESTDIR)$(libdir) build/libmujs.a
+- install -t $(DESTDIR)$(bindir) build/mujs
++ libtool --mode=install install build/libmujs.la $(DESTDIR)$(libdir)
++ libtool --mode=install install build/mujs $(DESTDIR)$(bindir)
+
+ VERSION = $(shell git describe --tags --always)
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mujs.git/commitdiff/ed69f59ab5b004dff50e164d83dcbabc141b4447
More information about the pld-cvs-commit
mailing list