]> git.pld-linux.org Git - packages/mujs.git/commitdiff
- new auto/th/mujs-0-0.20141118.1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 29 Nov 2014 17:28:32 +0000 (18:28 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 29 Nov 2014 17:28:32 +0000 (18:28 +0100)
mujs-shared.patch [new file with mode: 0644]
mujs.spec [new file with mode: 0644]

diff --git a/mujs-shared.patch b/mujs-shared.patch
new file mode 100644 (file)
index 0000000..1881366
--- /dev/null
@@ -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)
diff --git a/mujs.spec b/mujs.spec
new file mode 100644 (file)
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
This page took 0.19713 seconds and 4 git commands to generate.